Hallo ihr Lieben,
hat einer von euch ne Ahnung warum meine Navi nicht im NS6.0 funktioniert? In NS4.7 und NS6.2 sowie in allen IE-Versionen geht es ohne Probleme nur im NS6.0 nicht.
Ich kriege noch die Kriese!
<script language="JavaScript" type="text/javascript"> <!-- var menuItemWidth = 200; var menuItemHeight = 13; var menuTimeout = 500;
var menuLengths = new Array(1,3,2,1,2,1); var menuURLs = new Array(menuLengths.length);
for (i=0;i<menuLengths.length;i++) menuURLs[i] = new Array(menuLengths[i]); menuURLs[0][0] = "index.html"; menuURLs[1][0] = "internet.html"; menuURLs[1][1] = "leistung.html"; menuURLs[1][2] = "achtwerte.html"; menuURLs[2][0] = "print.html"; menuURLs[2][1] = "abwicklung.html"; menuURLs[3][0] = "referenz.html"; menuURLs[4][0] = "kontakt.html"; menuURLs[4][1] = "anfahrt.html"; menuURLs[5][0] = "kundenbereich.html"; var menuTimers = new Array(menuLengths.length); function getStyleObj(id) { if (document.getElementById || // DOM-compliant browsers (MSIE5, NSN6, O5) document.all) { // or MSIE 4 return getObj(id).style; } else return getObj(id); // NSN4 }
function getObj(id) { if (document.getElementById) { // DOM-compliant browsers (MSIE5, NSN6, O5) return document.getElementById(id); } else if (document.all) { // MSIE4 return document.all[id]; } else if (document.layers) { // NSN4 return document.layers[id]; } else { // Trap DHTML-impaired browsers alert("Your browser does not support DHTML!"); return false; } }
function showMenu(index) { if (index == -1) return; if (menuTimers[index-1]) clearTimeout(menuTimers[index-1]);
for (i=1; i<=menuLengths.length; i++) if (i!=index) closeMenu(i);
var menu = getStyleObj("menu"+index);
if (menu) menu.visibility = "visible"; } function hideMenu(index) { var dynTimeout; dynTimeout = menuTimeout; if (index == -1) return; if (navigator.appName == "Konqueror") dynTimeout = menuTimeout * 2; if (menuTimers[index-1]) clearTimeout(menuTimers[index-1]); menuTimers[index-1] = setTimeout("closeMenu('"+index+"');", dynTimeout); }
function closeMenu(index) { var menu = getStyleObj("menu"+index); if (menu) menu.visibility = "hidden"; }
function overMenuItem() { this.hilightitem.visibility='visible'; showMenu(this.menuid); }
function outMenuItem() { this.hilightitem.visibility='hidden'; hideMenu(this.menuid); }
function clickMenuItem() { // There is a URL associated with this item if (this.url) window.location = this.url; }
function setupMenus() { if (document.layers) { // This section is for Netscape 4 only for (menuid = 1; menuid<=menuLengths.length; menuid++) { // For each menu var menu = getObj("menu"+menuid);
menu.clip.width = menuItemWidth + 2; menu.clip.height = (menuItemHeight + 1) * menuLengths[menuid - 1] + 1; for (i=1; i<=menuLengths[menuid-1]; i++) { // For each menu item var item = eval("menu.document.menu"+menuid+"item"+i); var onitem = eval("menu.document.menu"+menuid+"item"+i+"on"); item.top = (menuItemHeight + 1) * (i - 1) + 1; onitem.top = (menuItemHeight + 1) * (i - 1) + 1; item.clip.width = menuItemWidth; item.clip.height = menuItemHeight; onitem.clip.width = menuItemWidth; onitem.clip.height = menuItemHeight; item.hilightitem = onitem; onitem.hilightitem = onitem; item.menuid = menuid; onitem.menuid = menuid; var url = menuURLs[menuid-1][i-1]; item.url = url; onitem.url = url; var eTypes = Event.MOUSEOVER | Event.MOUSEOUT | Event.CLICK; item.captureEvents(eTypes); onitem.captureEvents(eTypes); item.onmouseover = overMenuItem; onitem.onmouseover = overMenuItem; item.onmouseout = outMenuItem; onitem.onmouseout = outMenuItem; item.onclick = clickMenuItem; onitem.onclick = clickMenuItem; } } } else { // This section is for all other browsers for (menuid=1;menuid<=menuLengths.length;menuid++) { // For each menu for (i=1;i<=menuLengths[menuid-1];i++) { // For each menu item var item = getObj("menu"+menuid+"item"+i); var onitem = getObj("menu"+menuid+"item"+i+"on"); var itemstyle = getStyleObj("menu"+menuid+"item"+i); var onitemstyle = getStyleObj("menu"+menuid+"item"+i+"on"); itemstyle.top = (menuItemHeight + 1) * (i-1) + 1; onitemstyle.top = (menuItemHeight + 1) * (i-1) + 1;
if (navigator.appName=="Microsoft Internet Explorer") { itemstyle.cursor = "hand"; onitemstyle.cursor = "hand"; }
item.hilightitem = onitemstyle; onitem.hilightitem = onitemstyle;
item.menuid = menuid; onitem.menuid = menuid;
var url = menuURLs[menuid-1][i-1]; item.url = url; onitem.url = url; item.onmouseover = overMenuItem; onitem.onmouseover = overMenuItem; item.onmouseout = outMenuItem; onitem.onmouseout = outMenuItem; item.onclick = clickMenuItem; onitem.onclick = clickMenuItem; } } } }
function handleResize() { location.reload(); return false; }
function projektcolor(tint) { document.all.projekt.bgColor=tint }
if (document.layers) { window.onresize = handleResize; }
window.onload=setupMenus; // Assign to onLoad event handler //--> // Browsertyp ermitteln (und in B_Type speichern) var B_Type = new crossBrowserType(); function crossBrowserType() { this.IE = false; this.NS4 = false; this.NS6 = false; this.id = ""; if (document.all) {this.IE = true; this.id = "IE"; document.write("<link rel=stylesheet href=werbungie.css type=text/css>");} else if (document.getElementById) {this.NS6 = true; this.id = "NS6"; document.write("<link rel=stylesheet href=werbungnss.css type=text/css>");} else if (document.layers) {this.NS4 = true; this.id = "NS4"; document.write("<link rel=stylesheet href=werbungns.css type=text/css>");} }
// Objekt positionieren x/y function crossMoveTo(obj, x, y) { if (B_Type.IE) {obj.style.pixelLeft=x; obj.style.pixelTop=y;} else if (B_Type.NS4) {obj.left=x; obj.top=y;} else if (B_Type.NS6) {obj.style.left=x+"px"; obj.style.top=y+"px";} } </script>