# HG changeset patch # User luginbue # Date 1021941645 -7200 # Node ID e6349a389da2522e809bd7605e866f07c6680c24 # Parent d8d68ce457758d2236c1468d4a83e654dd5b9d5b forgot to upload / make it work with opera diff -r d8d68ce45775 -r e6349a389da2 client/digitallibrary/buttons/menu.js --- a/client/digitallibrary/buttons/menu.js Tue May 21 02:32:03 2002 +0200 +++ b/client/digitallibrary/buttons/menu.js Tue May 21 02:40:45 2002 +0200 @@ -1,13 +1,19 @@ -function checkBrowser(){ - this.ver = navigator.appVersion; - this.dom = document.getElementById ? 1 : 0; - this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom) ? 1 : 0; - this.ie4 = (document.all && !this.dom) ? 1 : 0; - this.ns5 = (this.dom && parseInt(this.ver) >= 5) ? 1 : 0; - this.ns4 = (document.layers && !this.dom) ? 1 : 0; - this.ie = (this.ie4 || this.ie5); - return this; -} +function checkBrowser() { + + this.ua = navigator.userAgent; + this.ver = navigator.appVersion; + this.dom = ( document.getElementById ); + this.opera = ( this.dom ) && ( this.ua.toLowerCase().indexOf("opera") > -1 ); + this.ie4 = ( document.all ) && ( !this.dom ); + this.ie5 = ( this.ver.indexOf("MSIE 5") > -1 ) && ( this.dom ); + this.ie6 = ( this.ver.indexOf("MSIE 6") > -1 ) && ( this.dom ); + this.ns4 = ( document.layers ) && ( !this.dom ); + this.ns6 = ( this.dom ) && ( parseInt(this.ver) >= 5 ) && ( !this.opera ); + this.ns = this.ns4 || this.ns6; + this.ie = this.ie4 || this.ie5 || this.ie6; + + return this; +} browser = new checkBrowser(); @@ -63,7 +69,7 @@ } function awayItem(obj) { - changeBc("menu" + obj, ''); + changeBc("menu" + obj, '#666666'); timeID = setTimeout("hideMenu()", 700); } @@ -138,10 +144,17 @@ helpWindow.document.close(); // stupid workaround because of netscape 6, that doesen't know the opener property - // this workaround is still ok cause netscape 6 has eventbuffer checks so no overflow - if (browser.ns5) { + // this workaround is still ok because netscape 6 has eventbuffer checks so no overflow + if (browser.ns6) { semaphor = true; } + + // next stupid workaround because of opera 6, that somehow don't start the 'onLoad'- + // attribute in the body tag (the helpwindow does not finish loading) + if (browser.opera) { + setTimeout("semaphor = true;", 50); + } + } }