Index: alt_main.php =================================================================== --- alt_main.php (revision 352) +++ alt_main.php (working copy) @@ -122,6 +122,22 @@ $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout'; $this->mainJScode=' + //browsercheck... + function GL_checkBrowser(){ // + this.dom= (document.getElementById); + this.op= (navigator.userAgent.indexOf("Opera")>-1); + this.op7= this.op && (navigator.appVersion.indexOf("7")>-1); // check for Opera version 7 + this.konq= (navigator.userAgent.indexOf("Konq")>-1); + this.ie4= (document.all && !this.dom && !this.op && !this.konq); + this.ie5= (document.all && this.dom && !this.op && !this.konq); + this.ns4= (document.layers && !this.dom && !this.konq); + this.ns5= (!document.all && this.dom && !this.op && !this.konq); + this.ns6= (this.ns5); + this.bw= (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq); + return this; + } + bw= new GL_checkBrowser(); + /** * Function similar to PHPs rawurlencode(); */ @@ -305,17 +321,22 @@ var HLclass = mainModule ? "c-mainitem-HL" : "c-subitem-HL"; } + if (bw.ie5) { + var classNameLabel = "className"; + } else { + var classNameLabel = "class"; + } + if (docObj) { // Reset old: if (currentlyHighLightedId && docObj.getElementById(currentlyHighLightedId)) { - docObj.getElementById(currentlyHighLightedId).attributes.getNamedItem("class").nodeValue = currentlyHighLighted_restoreValue; + docObj.getElementById(currentlyHighLightedId).setAttribute(classNameLabel, currentlyHighLighted_restoreValue); } // Set new: currentlyHighLightedId = trId; if (currentlyHighLightedId && docObj.getElementById(currentlyHighLightedId)) { - var classAttribObject = docObj.getElementById(currentlyHighLightedId).attributes.getNamedItem("class"); - currentlyHighLighted_restoreValue = classAttribObject.nodeValue; - classAttribObject.nodeValue = HLclass; + currentlyHighLighted_restoreValue = docObj.getElementById(currentlyHighLightedId).getAttribute(classNameLabel); + docObj.getElementById(currentlyHighLightedId).setAttribute(classNameLabel, HLclass); } } } Index: template.php =================================================================== --- template.php (revision 352) +++ template.php (working copy) @@ -1805,6 +1805,27 @@ var DTM_array = new Array(); var DTM_origClass = new String(); + function GL_checkBrowser(){ // + this.dom= (document.getElementById); + this.op= (navigator.userAgent.indexOf("Opera")>-1); + this.op7= this.op && (navigator.appVersion.indexOf("7")>-1); // check for Opera version 7 + this.konq= (navigator.userAgent.indexOf("Konq")>-1); + this.ie4= (document.all && !this.dom && !this.op && !this.konq); + this.ie5= (document.all && this.dom && !this.op && !this.konq); + this.ns4= (document.layers && !this.dom && !this.konq); + this.ns5= (!document.all && this.dom && !this.op && !this.konq); + this.ns6= (this.ns5); + this.bw= (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq); + return this; + } + bw= new GL_checkBrowser(); + + if (bw.ie5) { + var classNameLabel = "className"; + } else { + var classNameLabel = "class"; + } + // if tabs are used in a popup window the array might not exists if(!top.DTM_currentTabs) { top.DTM_currentTabs = new Array(); @@ -1816,7 +1837,7 @@ for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++) { if (DTM_array[idBase][cnt] != idBase+"-"+index) { document.getElementById(DTM_array[idBase][cnt]+"-DIV").style.display = "none"; - document.getElementById(DTM_array[idBase][cnt]+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; + document.getElementById(DTM_array[idBase][cnt]+"-MENU").setAttribute(classNameLabel, "tab"); } } } @@ -1826,7 +1847,7 @@ if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") { document.getElementById(idBase+"-"+index+"-DIV").style.display = "none"; if(DTM_origClass=="") { - document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; + document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tab"); } else { DTM_origClass = "tab"; } @@ -1834,7 +1855,7 @@ } else { document.getElementById(idBase+"-"+index+"-DIV").style.display = "block"; if(DTM_origClass=="") { - document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact"; + document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tabact"); } else { DTM_origClass = "tabact"; } @@ -1848,7 +1869,7 @@ if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") { document.getElementById(idBase+"-"+index+"-DIV").style.display = "none"; if(isInit) { - document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; + document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tab"); } else { DTM_origClass = "tab"; } @@ -1856,7 +1877,7 @@ } else { document.getElementById(idBase+"-"+index+"-DIV").style.display = "block"; if(isInit) { - document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact"; + document.getElementById(idBase+"-"+index+"-MENU").setAttribute(classNameLabel, "tabact"); } else { DTM_origClass = "tabact"; } @@ -1866,12 +1887,12 @@ } function DTM_mouseOver(obj) { // - DTM_origClass = obj.attributes.getNamedItem(\'class\').nodeValue; - obj.attributes.getNamedItem(\'class\').nodeValue += "_over"; + DTM_origClass = obj.getAttribute(classNameLabel); + obj.setAttribute(classNameLabel, DTM_origClass+"_over"); } function DTM_mouseOut(obj) { // - obj.attributes.getNamedItem(\'class\').nodeValue = DTM_origClass; + obj.setAttribute(classNameLabel, DTM_origClass); DTM_origClass = ""; }