function over(item, infix) { if (!infix) infix = '_over'; var img; if (document.getElementById) img = document.getElementById(item); else if (document.all) img = document.all[item]; if (img) { pos = img.src.lastIndexOf('_out'); if (pos<0) { return false; } basename = img.src.substr(0,pos); extension = img.src.substr(pos+4); img.src = basename + infix + extension; } return true; } function out(item, infix) { if (!infix) infix = '_over'; var img; if (document.getElementById) img = document.getElementById(item); else if (document.all) img = document.all[item]; if (img) { pos = img.src.lastIndexOf(infix); if (pos<0) return; basename = img.src.substr(0,pos); extension = img.src.substr(pos+infix.length); img.src = basename + '_out' + extension; } return true; } function on(item) { if (item==document.active) return; out(document.active, '_on'); out(item); over(item, '_on'); document.active = item; return true; } function showLayer(name, show) { if (document.getElementById) layer = document.getElementById(name); else if (document.all) layer = document.all[name]; else { alert('layer ' + name + ' not found!'); return; } layer.style.visibility = show ? 'visible' : 'hidden'; } function activateSubSub(id, p) { var d = p ? parent.document : document; var pstr = p ? 'parent.' : ''; if(d.subsubImg) eval(pstr + "out(d.subsubImg)"); eval(pstr + "over(id); d.subsubImg = id;"); } function activateSub(id) { if(document.subImg) out(document.subImg); over(id); document.subImg = id; if(document.subsubImg) out(document.subsubImg); } function loesungenOver(id) { if(!document.active) { if (document.over) showLayer(document.over, false); document.over = 'd' + id; showLayer('d' + id, true); } } function loesungenClick(id) { if(document.active) showLayer(document.active, false); document.active = 'd' + id; showLayer(document.active, true); } // returns true on success and false otherwise function checkForm(formtype) { if (formtype == 1) { if (!document.searchform.searchterm.value) { alert("Please enter a search term!"); document.searchform.searchterm.focus(); return false; } } else if (formtype == 2) { with (document.dateform) { if (!isDate(fromday[fromday.selectedIndex].value, frommonth[frommonth.selectedIndex].value, fromyear[fromyear.selectedIndex].value)) { alert("Please enter a search term!"); fromday.focus(); return false; } if (!isDate(today[today.selectedIndex].value, tomonth[tomonth.selectedIndex].value, toyear[toyear.selectedIndex].value)) { alert("'till' date is invalid."); document.dateform.today.focus(); return false; } } } else return false; return true; } function isDate(D,M,Y) { if (D==31 && (M==2 || M==4 || M==6 || M==9 || M==11)) { return false; } else if (M==2 && D==30) return false; else if (D==29 && M==2) { if (Y%4 != 0) return false; else if ((Y%100 == 0) && (Y%400 != 0)) { return false; } } return true; } function detail(img) { var x = screen.width/2-100; var y = screen.height/2-100; dt = window.open('/productimg.php?img=' + img, 'detail', 'left='+x+',top='+y+',width=200,height=200,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); dt.focus(); } // changes the text of the element with the given ID to 'Bitte warten...' // and submits the form with the given name. function submitForm(formName, submitId, msg) { if (!msg) msg = 'bitte warten...'; if (elem = document.getElementById(submitId)) { elem.firstChild.nodeValue = msg; elem.style.color = '#FF0000'; } document.forms[formName].submit(); } function checkFrames() { if (top.frames.length == 3) { if (top.frames[0].name == 'blue' && top.frames[1].name == 'header' && top.frames[2].name == 'navimain') { var frame = top.frames[2]; if (frame.frames) { if (frame.frames[0].name == 'navi' && frame.frames[1].name == 'main') { return true; } } } } var url = new URL(location); if (!url.getParam('page')) { var page = url.pathname; page = page.split('/'); page = page[page.length-1]; page = page.substr(0, page.indexOf('.php')); url.setParam('page', page); } url.pathname = '/index.php'; top.location.href = url.toString(); } function URL(url) { this.url = url; this.protocol = this.url.protocol; this.host = this.url.host; this.pathname = this.url.pathname; this.params = new Object(); var qstr = this.url.search; if (qstr.length > 1) qstr = qstr.substring(1); var params = qstr.split('&'); for (i=0;i < params.length;i++) { var param = params[i].split('='); this.params[param[0]] = param[1]; } function getParam(name) { return this.params[name]; } this.getParam = getParam; function setParam(name, value) { this.params[name] = value; } this.setParam = setParam; function toString() { var url = this.protocol + '//' + this.host + this.pathname; var sep = '?'; for (name in this.params) { if (!name) continue; url += sep + name + '=' + this.params[name]; // after the first loop, we change from '?' to '&': sep = '&'; } return url; } this.toString = toString; } function substr_count(haystack, needle) { var matches = 0; var offset = 0; var pos = 0; while ((pos = haystack.indexOf(needle, offset)) >=0) { matches++; offset = pos+1; } return matches; } function toggleDiv(id) { var div = document.getElementById('div_' + id); if (!div) return; var img = document.getElementById('img_' + id); if (!img) return; var folderimg = document.getElementById('folderimg_' + id); if (!folderimg) return; var style = div.style.display; if ('block' == style) { div.style.display = 'none'; img.src = '/images/base/plus.gif'; folderimg.src = '/images/base/folder_closed.gif'; } else { div.style.display = 'block'; img.src = '/images/base/minus.gif'; folderimg.src = '/images/base/folder_open.gif'; } } var firsTruetChange=true; var firsNewSElect=true; var markieren=true; function loadForm() { if(firsTruetChange==false){ var version2=document.getElementById("version"); for (z=version2.length; z > 0; z--) { version2.options[z-1] = null; } firsTruetChange=false; } produkt4= document.getElementById("produkt"); produkt3=produkt4.options[produkt4.selectedIndex].id; pprodukt2=produkt3.split("#"); produkt1=pprodukt2[0]; anzahl=pprodukt2[1]; wahl=pprodukt2[2]; if(firsNewSElect==true){ div = document.getElementById('hotlineDiv'); sel = document.createElement('select'); sel.id = 'version'; sel.name = 'version'; //sel.class='fix'; sel.style.width = '170px'; sel.style.marginTop = '0px'; sel.disabled = false; firsNewSElect=false; firsTruetChange=false; }else{ version1=document.getElementById("version"); sel=version1; } DieVersionen=produkt1.split(","); if(anzahl>>1){ div.appendChild(sel); opt = new Option("Please select","Please select",true,true); sel.options[sel.options.length] = opt; for (i=1; i