//Statuszeile beschreiben function setStatus(val) { window.status=val; return true; } //Statuszeile leeren function clearStatus() { window.status=''; return true; } //Hilfsfunktion für popup() und filledPopup() function getParmArray(w,h,params,center) { Parms = new Array(); if (w>=0) Parms.push("width="+w); if (h>=0) Parms.push("height="+h); if (center && w>=0) { var t=(screen.height)?(screen.height-h)/2:100; Parms.push("top="+t); } if (center && h>=0) { var l=(screen.width)?(screen.width-w)/2:100; Parms.push("left="+l); } if (params) { Parms.push(params); } else { Parms.push("location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,directories=no,copyhistory=no"); } return Parms; } //normales Popup function popup(obj,name,w,h,params,center) { var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href; if (!url) return true; var Parms = getParmArray(w,h,params,center); var win = window.open(url,name,Parms.join(",")); win.focus(); return (win) ? false : true; } //Popup, das keine Url erhält, sondern per Javascript gefüllt wird function filledPopup(body,name,w,h,params,center) { var Parms = getParmArray(w,h,params,center); var popup=window.open("",name,Parms.join(",")); popup.document.write(body); popup.focus(); } //verhindert im IE den gepünktelten Rand beim Anklicken eines Links //Einbinden im a-Tag: onFocus="noBorder(this);" function noBorder(object) { if(document.all) object.blur(); } //scrollt zu einer x/y-Koordinate im aktuellen Fenster function scrollToXY(x,y) { if (this.scrollTo) this.scrollTo(x,y); } //aktiviert ein verstecktes div mit einem Hinweistext "Seite wird geladen ..." function showWaitNotice(myLink) { myLink.style.cursor="wait"; document.getElementsByTagName("html")[0].style.cursor="wait"; setTimeout('document.getElementById("waitnotice").style.display="block"',1000); return true; } //onLoad-events window.onload=function() { if (document.getElementById) { resizeBoxes(); } } //onResize-events window.onresize=function() { if (document.getElementById) { resizeBoxes(); } } //Spaltenhöhen der 2 oder 3 Contentspalten einander angleichen function resizeBoxes() { if (document.getElementById("contentLeftcol") && document.getElementById("contentMidcol") && document.getElementById("contentRightcol")) { var lh=document.getElementById("contentLeftcol").offsetHeight; var mh=document.getElementById("contentMidcol").offsetHeight; var rh=document.getElementById("contentRightcol").offsetHeight; var maxC=Math.max(lh,mh); maxC=Math.max(maxC,rh); if (lh < maxC) { document.getElementById("contentLeftcol").style.height=maxC+"px"; } if (mh < maxC) { document.getElementById("contentMidcol").style.height=maxC+"px"; } if (rh < maxC) { document.getElementById("contentRightcol").style.height=maxC+"px"; } } else if (document.getElementById("contentLeftcol") && document.getElementById("contentMidcol")) { var lh=document.getElementById("contentLeftcol").offsetHeight; var mh=document.getElementById("contentMidcol").offsetHeight; var maxC=Math.max(lh,mh); if (lh < maxC) { document.getElementById("contentLeftcol").style.height=maxC+"px"; } if (mh < maxC) { document.getElementById("contentMidcol").style.height=maxC+"px"; } } } // Artikelanzahl im Warenkorb ändern function changeWkAnzahl(elem,diff) { if (document.getElementById) { var val = parseInt(document.getElementById(elem).value); document.getElementById(elem).value = (val + diff >= 0) ? val + diff : val ; } } // Optionsartikel vom Typ Sync automatisch ändern function syncOptionalItems(elem,id) { var elems = document.getElementsByName('OPTIONSYNCHRON_'+id); var i; for( i = 0; i < elems.length; i++ ) { elems[i].value = parseInt(elems[i].alt) * elem.value; } }