var Doc, Style, Htm, Images; function cNavegador() { this.sNombre = navigator.appName; if ( this.sNombre == "Netscape" ) this.sNombreAbrev = "ns"; else if ( this.sNombre == "Microsoft Internet Explorer" ) this.sNombreAbrev = "ie"; else if ( this.sNombre == "Opera" ) this.sNombreAbrev = "op"; else this.sNombreAbrev = this.sNombre; this.nVersion = navigator.appVersion; this.sAgent = navigator.userAgent; this.sPlataforma = navigator.platform; this.bEsDOM = document.getElementById ? true : false; this.bEsOP = ( this.sNombreAbrev == "op" ); this.bEsOP5 = ( this.bEsOP && this.sAgent.indexOf ("Opera/5") >= 0 ); this.bEsOP6 = ( this.bEsOP && this.sAgent.indexOf ("Opera/6") >= 0 ); this.bEsNS = ( this.sNombreAbrev == "ns" ); this.bEsNS4 = ( this.bEsNS && this.sAgent.indexOf ("Netscape/4") >= 0 ) this.bEsNS5 = ( this.bEsNS && this.sAgent.indexOf ("Netscape/5") >= 0 ); this.bEsNS6 = ( this.bEsNS && this.sAgent.indexOf ("Netscape/6") >= 0 ); this.bEsNS7 = ( this.bEsNS && this.sAgent.indexOf ("Netscape/7") >= 0 ); this.bEsIE = ( this.sNombreAbrev == "ie" ); this.bEsIE4 = ( this.bEsIE && this.sAgent.indexOf ("MSIE 4") >= 0 ); this.bEsIE5 = ( this.bEsIE && this.sAgent.indexOf ("MSIE 5") >= 0 ); this.bEsIE6 = ( this.bEsIE && this.sAgent.indexOf ("MSIE 6") >= 0 ); if (this.bEsNS4) { this.errorHandler = cNavegador_errorHandler; Doc = "document."; Style = ""; Htm = ".document"; Images = "images." window.onerror = this.errorHandler; } else if (this.bEsDOM) { Doc = "document.getElementById('"; Style = "').style"; Htm = ""; Images = "images." } else { Doc = "document.all."; Style = ".style"; Htm = ""; Images = ""; } this.bOK = ( this.bEsIE4 || this.bEsIE5 || this.bEsIE6 || this.bEsNS4 || this.bEsNS5 || this.bEsNS6 || this.bEsNS7 || this.bEsOP5 || this.bEsOP6 ); } function cNavegador_errorHandler (sParError, sParFichero, nParLinea) { alert("Error de Javascript en esta página.\n" + "- Fichero: " + sParFichero + "\n" + "- Línea: " + nParLinea + "\n" + "- Error:" + sParError); return true; } var oNavegador = new cNavegador();