var jsItemAddonsArray = new Array(); var jsAddonsAva = new Array(); var selectedAddons = new Array(); var selectedAvas = new Array(); var selectedAdditionalField = new Array(); var itm_price = "1666.00"; var currentDays; if (!jsAddonsAva[1681]) jsAddonsAva[1681] = Array(); if (!jsAddonsAva[1681][7308]) jsAddonsAva[1681][7308] = Object(); jsAddonsAva[1681][7308]["avaDays"] = '7'; jsAddonsAva[1681][7308]["avaText"] = 'ca. 7 Tage'; jsAddonsAva[1681][7308]["avaIcon"] = '/pictures/availability/2/'; jsAddonsAva[1681][7308]["price"] = '0.00'; if (!jsAddonsAva[1681]) jsAddonsAva[1681] = Array(); if (!jsAddonsAva[1681][7309]) jsAddonsAva[1681][7309] = Object(); jsAddonsAva[1681][7309]["avaDays"] = '7'; jsAddonsAva[1681][7309]["avaText"] = 'ca. 7 Tage'; jsAddonsAva[1681][7309]["avaIcon"] = '/pictures/availability/2/'; jsAddonsAva[1681][7309]["price"] = '175.00'; if (!jsAddonsAva[1681]) jsAddonsAva[1681] = Array(); if (!jsAddonsAva[1681][7310]) jsAddonsAva[1681][7310] = Object(); jsAddonsAva[1681][7310]["avaDays"] = '7'; jsAddonsAva[1681][7310]["avaText"] = 'ca. 7 Tage'; jsAddonsAva[1681][7310]["avaIcon"] = '/pictures/availability/2/'; jsAddonsAva[1681][7310]["price"] = '350.00'; if (!jsItemAddonsArray[1681]) jsItemAddonsArray[1681] = Array(); if (!jsItemAddonsArray[1681][7308]) jsItemAddonsArray[1681][7308] = Array(); jsItemAddonsArray[1681][7308]["price"] = '0.00'; if (!jsItemAddonsArray[1681][7309]) jsItemAddonsArray[1681][7309] = Array(); jsItemAddonsArray[1681][7309]["price"] = '175.00'; if (!jsItemAddonsArray[1681][7310]) jsItemAddonsArray[1681][7310] = Array(); jsItemAddonsArray[1681][7310]["price"] = '350.00'; if (!jsItemAddonsArray[1681][7308]) jsItemAddonsArray[1681][7308] = Array(); jsItemAddonsArray[1681][7308]["picture"] = '/pictures/itemAddon/1/Ohne_zusaetzliche_Rauchmelder_4bb1c97918aa1.jpg'; if (!jsItemAddonsArray[1681][7309]) jsItemAddonsArray[1681][7309] = Array(); jsItemAddonsArray[1681][7309]["picture"] = '/pictures/itemAddon/1/1_Stueck_Rauchmelder_zusaetzlich_incl_Deckensockel_64bfaa78a3158.jpg'; if (!jsItemAddonsArray[1681][7310]) jsItemAddonsArray[1681][7310] = Array(); jsItemAddonsArray[1681][7310]["picture"] = '/pictures/itemAddon/1/2_Stueck_Rauchmelder_zusaetzlich_incl_Deckensockel_64bfaa78c6756.jpg'; if (!jsItemAddonsArray[1681][7308]) jsItemAddonsArray[1681][7308] = Array(); jsItemAddonsArray[1681][7308]["text"] = '
Die Auslieferung erfolgt mit einem Rauchmelder ORS 142.
Für zusätzliche Rauchmelder wählen Sie eine der folgenden Optionen.
Die Auslieferung erfolgt mit einem zusätzlichen Rauchmelder ORS 142 mit dem Deckensockel Modell 143 A. Insgesamt sind es 2 Stück Rauchmelder und einDeckensockel 143 A und ein Wand- und Sturzsockel 143 W.
'; if (!jsItemAddonsArray[1681][7310]) jsItemAddonsArray[1681][7310] = Array(); jsItemAddonsArray[1681][7310]["text"] = 'Die Auslieferung erfolgt mit zwei zusätzlichen Rauchmeldern ORS 142 mit Deckensockel Modell 143 A. Insgesamt sind es 3 Stück Rauchmelder und zwei Deckensockel 143 A und ein Wand- und Sturzsockel 143 W.
'; function changeAddons (dd) { var strpos1 = strpos (dd.name, "["); var strpos2 = strpos (dd.name, "]"); var showWarn; var iagId; var iaoId; iagId = dd.name.substring(strpos1+1, strpos2); iaoId = dd.options[dd.selectedIndex].value; setPrice (iagId,iaoId); showAddonPrice (iagId,iaoId); showAddonPicture (iagId,iaoId); showAddonText (iagId,iaoId); showAddonAdditionalField(iagId,iaoId); setAva (iagId,iaoId); showFloater(); } function showAddonPrice (iagId,iaoId) { var id = 'addonPrice_'+ iagId; var price = parseFloat(jsItemAddonsArray[iagId][iaoId]["price"]); if (jsItemAddonsArray[iagId][iaoId]["price"]*1 > 0) { document.getElementById(id).value = price.toFixed(2)+" €"; document.getElementById(id+"_div").innerHTML = price.toFixed(2)+" €"; } else { document.getElementById(id).value = ""; document.getElementById(id+"_div").innerHTML = ""; } } function showAddonPicture (iagId,iaoId) { var picture = 'pictureItemAddon_'+ iagId; if (this.document.images[picture]) this.document.images[picture].src = jsItemAddonsArray[iagId][iaoId]["picture"]; } function showAddonText (iagId,iaoId) { var id = 'addonText_'+ iagId; var text = jsItemAddonsArray[iagId][iaoId]["text"]; document.getElementById(id).innerHTML = text; } function showAddonAdditionalField (iagId,iaoId) { var id = 'addonAdditionalField_'+ iagId; var divId = 'addonAdditionalFieldText_'+ iagId; var divId2 = 'addonAdditionalFieldText2_'+ iagId; var text = jsItemAddonsArray[iagId][iaoId]["additionalFieldText"]; var wrapper = '#aAFWrapper_'+ iagId; if (text == undefined) { if (document.getElementById(id) != null) { document.getElementById(id).value = ""; document.getElementById(id).style.visibility = 'hidden'; document.getElementById(divId).style.display = 'none'; document.getElementById(divId2).style.display = 'none'; $(wrapper).css('display', 'none'); } } else { document.getElementById(divId).style.display = 'inline'; document.getElementById(divId2).style.display = 'inline'; document.getElementById(divId).innerHTML = text; document.getElementById(id).style.visibility = 'visible'; $(wrapper).css('display', 'block'); } } function setPrice (iagId,iaoId) { var actualPrice; var variantPrice; var price; selectedAddons[iagId] = jsItemAddonsArray[iagId][iaoId]["price"]*1; variantPrice = 0; for (iag in selectedAddons){ price = parseFloat(selectedAddons[iag]); variantPrice = variantPrice + price; } actualPrice = variantPrice + parseFloat(itm_price); if (actualPrice != itm_price) $("#price").html("Preis inkl. Artikelvarianten & Zubehör: " + actualPrice.toFixed(2)+" €"); else $("#price").html(""); $("#priceFloater").html(actualPrice.toFixed(2)+" €"); } function setAva (iagId,iaoId) { var selectedDays = parseInt(0); if(jsAddonsAva[iagId]== null) return true; selectedAvas[iagId] = iaoId; for (iagId in selectedAvas){ iaoId = selectedAvas[iagId]; if (selectedDays <= parseInt(jsAddonsAva[iagId][iaoId]["avaDays"])){ selectedDays = parseInt(jsAddonsAva[iagId][iaoId]["avaDays"]); selectedIagId = iagId; selectedIaoId = iaoId; } } if (selectedDays == 0) { var token = "defaultIaoId_" + iagId; var defIaoId = this.document.form1.elements[token].value document.getElementById('avaText').innerHTML = this.document.form1.defaultText.value; document.getElementById('avaText2').innerHTML = this.document.form1.defaultText.value; document.getElementById('avaText3').innerHTML = this.document.form1.defaultText.value; this.document.form1.actualDays.value = jsAddonsAva[iagId][defIaoId]["avaDays"]; $("#avaWarn").html("").hide(); $("#avaWarn2").html("").hide(); } else if (this.document.form1.defaultDays.value < selectedDays) { document.getElementById('avaText').innerHTML = jsAddonsAva[selectedIagId][selectedIaoId]["avaText"]; document.getElementById('avaText2').innerHTML = jsAddonsAva[selectedIagId][selectedIaoId]["avaText"]; document.getElementById('avaText3').innerHTML = jsAddonsAva[selectedIagId][selectedIaoId]["avaText"]; this.document.form1.actualDays.value = jsAddonsAva[selectedIagId][selectedIaoId]["avaDays"]; $("#avaWarn").html("Achtung die Versandzeit wurde geändert").show(); $("#avaWarn2").html("Achtung die Versandzeit wurde geändert").show(); } else if (this.document.form1.defaultDays.value == selectedDays) { document.getElementById('avaText').innerHTML = jsAddonsAva[selectedIagId][selectedIaoId]["avaText"]; document.getElementById('avaText2').innerHTML = jsAddonsAva[selectedIagId][selectedIaoId]["avaText"]; document.getElementById('avaText3').innerHTML = jsAddonsAva[selectedIagId][selectedIaoId]["avaText"]; this.document.form1.actualDays.value = jsAddonsAva[selectedIagId][selectedIaoId]["avaDays"]; $("#avaWarn").html("").hide(); $("#avaWarn2").html("").hide(); } else { $("#avaWarn").html("").hide(); $("#avaWarn2").html("").hide(); document.getElementById('avaText').innerHTML = this.document.form1.defaultText.value; document.getElementById('avaText2').innerHTML = this.document.form1.defaultText.value; document.getElementById('avaText3').innerHTML = this.document.form1.defaultText.value; } } function strpos(str, ch) { for (var i = 0; i < str.length; i++) { if (str.substring(i, i+1) == ch) return i; } } function showFloater() { document.getElementById('divItemFloater').style.display = "block"; } function toggleFloatersize() { if (document.getElementById('divItemFloaterContent').style.display == "block") { document.getElementById('divItemFloaterContent').style.display = "none"; $("#floaterButton").html(''); } else { document.getElementById('divItemFloaterContent').style.display = "block"; $("#floaterButton").html(''); } }