mBrowser = function(){ this.agent = navigator.userAgent.toLowerCase(); // Platform this.mac = this.agent.indexOf("mac")!=-1; this.win = this.agent.indexOf("win")!=-1; this.win32 = this.win && this.agent.indexOf("16bit")==-1; this.unix = this.agent.indexOf("x11")!=-1 || this.agent.indexOf("linux")!=-1; // Browser this.w3c = document.getElementById ?true:false; this.iex = document.all ?true:false; this.ie4 = this.iex && !this.w3c; this.ie5up = this.iex && this.w3c; this.ns4 = document.layers ?true:false; this.ns6up = !this.iex && !this.ns4 && this.w3c; this.nsx = this.ns4 || this.ns6up; }; mBrowser.prototype.dump = function(){ var html = ""; for(i in this) if(typeof(this[i]) != "function") html += i+" = "+this[i]+"
"; document.write(html); }; mBrowser = new mBrowser();