/** * Popupmenu */ var pln = "PopupLayer"; // Layer-Name var pwi = 200; // Layer-Width var pbg = "#FFFFFF"; // Layer-Background-Color var pbg_o = "#dbdfef"; // Layer-Background-Color-Over var pel = "#F2963A"; // Layer-Lines-Color var ptop = 120; var clnLink2 = "e3"; // Class for Link 2 function getElementPosition(obj) { var x = 0, y = 0; var x1 = null, y1 = null; if (typeof(obj.style) != "undefined") { x1 = obj.style.left; y1 = obj.style.top; } if (x1 != null && x1 != "" && y1 != null && y1 != "") { x = x1; y = y1; } else { do { if (typeof(obj.style) != "undefined") { x1 = obj.style.left; y1 = obj.style.top; } else { x1 = null; y1 = null; } if (x1 != null && x1 != "" && y1 != null && y1 != "") { x1 = x1.replace("px",""); y1 = y1.replace("px",""); x += x1*1; y += y1*1; break; } else if (obj.tagName == "TABLE" || obj.tagName == "TD" || obj.tagName == "TEXTAREA") { x += obj.offsetLeft; y += obj.offsetTop; } if (obj.parentElement) obj = obj.parentElement; else if (obj.parentNode) obj = obj.parentNode; else obj = null; } while(obj != null && obj.tagName != "BODY") } return {x:x, y:y}; } // Popup status var IsOM = false; // Layer erstellen document.writeln(''); var CatMenuARRAY = new Array(); // Tabelle für Menü erstellen function CreateMTab(LinksArray) { var tHTML = ""; tHTML += ""; var j; if (LinksArray.length > 0) { for (j = 0; j < LinksArray.length; j++) { tHTML += ""; } } tHTML += "
" + LinksArray[j][0] + "
"; return tHTML; } // Fensterbreite überprüfen function CheckWinW() { var screenwidth = 1000; if (document.getElementById) { if (navigator.appName == 'Microsoft Internet Explorer' && (navigator.platform.substring(0,3) == 'Win')) { var screenwidth = frames.top.document.body.clientWidth; } else if (navigator.appName == 'Netscape' || navigator.platform == 'MacPPC') { var screenwidth = frames.top.innerWidth; } } return screenwidth; } // Popupmenü für def. Kategorie anzeigen function ShowPp(CatID, eNr) { clearTP(); if (document.getElementById) { if (CatMenuARRAY[CatID].length > 0) { var pleft = 24; if (document.getElementById("tdp_"+CatID)) { /* pleft = document.getElementById("tdp_"+CatID).offsetLeft; if (pleft + pwi > CheckWinW()) { pleft = document.getElementById("tdp_"+CatID).offsetLeft + document.getElementById("tdp_"+CatID).offsetWidth - pwi; } */ var koord = getElementPosition(document.getElementById("tdp_"+CatID)); pleft = koord.x; } document.getElementById(pln).style.left = pleft; document.getElementById(pln).innerHTML = CreateMTab(CatMenuARRAY[CatID]); document.getElementById(pln).style.top = ptop; document.getElementById(pln).style.visibility = "visible"; } else { HidePp(); } } } // Popupmenü ausblenden function HidePp() { if (document.getElementById) { document.getElementById(pln).style.visibility = "hidden"; } } var MyTM = false; function setTP() { MyTM = window.setTimeout("HidePp()", 1000); } function clearTP() { if (MyTM) window.clearTimeout(MyTM); MyTM = false; }