// background functions function getBrowserType() { // returns browserType: // N4 = Nescape Navigator >4 // N6 = Nescape Navigator >6 // M4 = Mircosoft IExplorer >4 // NN = browser unknown var browserVer=parseInt(navigator.appVersion); var browserType=navigator.appName; var browser = "NN"; if (browserType == "Netscape" && browserVer >= 4) browser = "N4"; if (browserType == "Netscape" && browserVer >= 6) browser = "N6"; if ((browserType.indexOf("Microsoft") != -1) && browserVer >= 4 ) browser = "M4"; return browser; } // common var popupnum = 0; function popup(location) { ref = window.open(location, 'popup'+popupnum, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=330,height=250"); ref.focus(); popupnum++; return false; } function popupSized(location, width, height) { ref = window.open(location, 'popup'+popupnum, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width="+width+",height="+height); ref.focus(); popupnum++; return false; } function popupSizedSame(location, width, height) { ref = window.open(location, 'popup', "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width="+width+",height="+height); ref.focus(); popupnum++; return false; } function popupSizedLocated(location, width, height) { leftPosition = (screen.width) ? (screen.width-width)/2 : 10; topPosition = (screen.height) ? (screen.height-(height+50))/2 : 10; ref = window.open(location, 'popup'+popupnum, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width="+width+",height="+height+",top="+topPosition+",left="+leftPosition); ref.focus(); popupnum++; return false; } function popupLoadResize(location, width, height) { window.lcoation = location; window.resizeTo(width, height); return false; } function ckeckRadiobutton(radiogroup, num) { if(radiogroup.length > 1) { radiogroup[num].checked = true; } } // special functions // PRODUCT PAGES function checkSelection(selectbox, type) { var message; switch (type) { case "product": message = msg['selectProduct']; break; case "pgroup": message = msg['selectProductgroup']; break; default: message = msg['selectOption']; break; } if(selectbox.selectedIndex == 0) { alert(message); return false; } else { return true; } } // closes checkSelction function selectboxNavigation(selectbox, url) { var selectedID = selectbox.selectedIndex; var ID = selectbox.options[selectedID].value; if (ID != 0) { window.location = url + "&" + selectbox.name + "=" + ID; } } function changeProductgroup(selectbox) { var selectedPBID = selectbox.selectedIndex; var PBID = selectbox.options[selectedPBID].value; if (PBID != 0) { window.location = "index.php?cp=products_group&pgroup="+PBID; } } function changeProductcat(selectbox, cf) { var selectedPCID = selectbox.selectedIndex; var PCID = selectbox.options[selectedPCID].value; if (PCID != 0) { window.location = "index.php?cp=products_category&cf="+cf+"&pcat="+PCID; } } function changeProduct(selectbox) { var selectedPID = selectbox.selectedIndex; var PID = selectbox.options[selectedPID].value; if (PID != 0) { window.location = "index.php?cp=products_detail&p="+PID; } } function changeCountry(selectbox) { var selectedID = selectbox.selectedIndex; var ID = selectbox.options[selectedID].value; if (ID != "") { window.location = "index.php?cp=logistics_show&kiehlcountry="+ID; } } function changeBranch(selectbox) { var selectedID = selectbox.selectedIndex; var ID = selectbox.options[selectedID].value; if (ID != "") { window.location = "index.php?cp=logistics_show&kiehlbranch="+ID; } } // promop function promopInit() { promop = new Array(); promop[0] = new Image(); promop[0] = document.promop0; promop[1] = new Image(); promop[1] = document.promop1; promop[2] = new Image(); promop[2] = document.promop2; promop[3] = new Image(); promop[3] = document.promop3; standardBackgroundColor = "#FFFFFF"; standardTextColor = "#515151"; standardHeadlineColor = "#00ACF1"; promopColor = new Array(); promopLightColor = new Array(); promopLightColor[0] = "#D4E2F2"; // light color promopColor[0] = "#00377C"; // dark color promopLightColor[1] = "#DDF5DB"; // light color promopColor[1] = "#32982B"; // dark color promopLightColor[2] = "#FFF1DB"; // light color promopColor[2] = "#FF9C04"; // dark color promopLightColor[3] = "#FFDDDA"; // light color promopColor[3] = "#E72714"; // dark color } function promopHighlight(num) { // rollover image reloadImage = promop[num].src; tmp = reloadImage; rolloverImage = tmp.slice(0,tmp.lastIndexOf(".")); rolloverImage = rolloverImage + "_ro.gif"; //alert(rolloverImage); promop[num].src = rolloverImage; // color/background switch(num) { case 0: document.all.promop0_top.style.backgroundColor = promopColor[0]; document.all.promop0_middle.style.backgroundColor = promopLightColor[0]; document.all.promop0_bottom.style.backgroundColor = promopColor[0]; document.all.promop0_headline.style.color = promopColor[0]; document.all.promop0_copytext.style.color = promopColor[0]; break; case 1: document.all.promop1_top.style.backgroundColor = promopColor[1]; document.all.promop1_middle.style.backgroundColor = promopLightColor[1]; document.all.promop1_bottom.style.backgroundColor = promopColor[1]; document.all.promop1_headline.style.color = promopColor[1]; document.all.promop1_copytext.style.color = promopColor[1]; break; case 2: document.all.promop2_top.style.backgroundColor = promopColor[2]; document.all.promop2_middle.style.backgroundColor = promopLightColor[2]; document.all.promop2_bottom.style.backgroundColor = promopColor[2]; document.all.promop2_headline.style.color = promopColor[2]; document.all.promop2_copytext.style.color = promopColor[2]; break; case 3: document.all.promop3_top.style.backgroundColor = promopColor[3]; document.all.promop3_middle.style.backgroundColor = promopLightColor[3]; document.all.promop3_bottom.style.backgroundColor = promopColor[3]; document.all.promop3_headline.style.color = promopColor[3]; document.all.promop3_copytext.style.color = promopColor[3]; break; } /* var topelem = 'promop'+i+'_top'; var middle = "promop" + i + "_middle"; var bottom = "promop" + i + "_bottom"; var headline = 'promop'+i+'_headline'; var copytext = "promop" + i + "_copytext"; */ //document.all.topelem.style.backgroundColor = promopColor[i]; //document.all.headline.style.color = promopColor[i]; //changeBackgroundColor(top, promopColor[i]) } function changeBackgroundColor(object, color) { document.all.object.style.backgroundColor = color; } function changeColor(object, color) { document.all.object.style.color = color; } function promopDeHighlight(num) { if(reloadImage != "") { promop[num].src = reloadImage; } // color/background switch(num) { case 0: document.all.promop0_top.style.backgroundColor = standardBackgroundColor; document.all.promop0_middle.style.backgroundColor = standardBackgroundColor; document.all.promop0_bottom.style.backgroundColor = standardBackgroundColor; document.all.promop0_headline.style.color = standardHeadlineColor; document.all.promop0_copytext.style.color = standardTextColor; break; case 1: document.all.promop1_top.style.backgroundColor = standardBackgroundColor; document.all.promop1_middle.style.backgroundColor = standardBackgroundColor; document.all.promop1_bottom.style.backgroundColor = standardBackgroundColor; document.all.promop1_headline.style.color = standardHeadlineColor; document.all.promop1_copytext.style.color = standardTextColor; break; case 2: document.all.promop2_top.style.backgroundColor = standardBackgroundColor; document.all.promop2_middle.style.backgroundColor = standardBackgroundColor; document.all.promop2_bottom.style.backgroundColor = standardBackgroundColor; document.all.promop2_headline.style.color = standardHeadlineColor; document.all.promop2_copytext.style.color = standardTextColor; break; case 3: document.all.promop3_top.style.backgroundColor = standardBackgroundColor; document.all.promop3_middle.style.backgroundColor = standardBackgroundColor; document.all.promop3_bottom.style.backgroundColor = standardBackgroundColor; document.all.promop3_headline.style.color = standardHeadlineColor; document.all.promop3_copytext.style.color = standardTextColor; break; } } // PRODUCT SEARCH var standardLabel; var searchboxColor; var inputbox; var subito = false; function showSearchInfo(input) { inputbox = input; searchboxColor = inputbox.style.color; standardLabel = inputbox.value; inputbox.value = ""; inputbox.style.color = "#00ACF1"; //inputbox.value = msg['searchBox']; //setTimeout('searchReadyForInput()', 1000); searchReadyForInput(); } function searchReadyForInput() { if(subito == false) { inputbox.value = ""; inputbox.style.color = searchboxColor; } } function resetSearch(input) { if(input.value == "") { inputbox = input; inputbox.value = standardLabel; inputbox.style.color = searchboxColor; } } function checkSearchstring(input) { inputbox = input; var submitForm; var searchstring = inputbox.value; if(searchstring.length == 0 || searchstring == "// Produktsuche") { alert( msg['searchAdvise'] ); return false; } else { return true; } } function setStandardLabel(input) { standardLabel = input.value; } function subito(input) { inputbox = input; subito = true; inputbox.value = ""; inputbox.style.color = searchboxColor; } // SECOND LEVEL NAVIGATION function highlightOn(object) { object.style.backgroundColor = "#F2FBFE"; object.style.cursor = "hand"; } function highlightOff(object) { object.style.backgroundColor = "#FFFFFF"; object.style.cursor="auto"; } function followLink(url) { if(url != "") { window.location = url; } }