/**@Class - ClsBrowser()
*
*
* @Methode - getDom() => ermittelt das "Dokument Objekt Modell" f&uuml;r den Browser
*/

ClsBrowser = function  () {
var bro = navigator.appName;
if(bro =="Netscape") {  this.bro="NS";}
 else if (bro=="Microsoft Internet Explorer"){
  this.bro = "IE";}
  else{
 this.bro=bro; }
 this.op3 =(navigator.userAgent.indexOf('Opera')>-1);
 this.ver=parseInt(navigator.appVersion);
 this.NS =(this.bro=="NS" && this.ver>=4);
 this.NS3 =(this.bro=="NS" && this.ver==3);
 this.NS4 =(this.bro=="NS" && this.ver==4);
 this.NS6 =(this.bro=="NS" && this.ver==6);
 this.NS7 =(navigator.userAgent.indexOf('Netscape/7')>-1);
 this.IE =(this.bro=="IE" && this.ver>=4);
 this.OP3 = (this.bro=="NS" && this.op3);
 this.OP = this.op3;
 this.IE4 =(navigator.userAgent.indexOf('MSIE 4')>-1);
 this.IE5 =(navigator.userAgent.indexOf('MSIE 5')>-1);
 this.IE6 =(navigator.userAgent.indexOf('MSIE 6')>-1);
 this.IE7 =(navigator.userAgent.indexOf('MSIE 7')>-1);
// if (this.IE5) {this.ver=4;}
 this.NEWBR =(document.getElementById)?true:false;
 this.XML =  (window.XMLHttpRequest||window.ActiveXObject)? true:false;
 this.DHTML = ((this.NS||this.IE)||this.NEWBR &&(!this.OP3));
 this.XHTML = (this.NS7||this.IE6||(this.NEWBR && this.XML && !this.IE5));
  }
 this.dom = null;


/** Methoden zur Klasse
* @param eb = string  Layer-id
*
*/
ClsBrowser.prototype.getDom  = function (eb) {
// Dokument Objektmodell f&uuml;r IE und NS generieren
if (this.NS4||this.IE4||this.NEWBR){
    var docObj=(document.all)?'':'document';
    var styleObj=(document.all||document.styleSheets)?'.style':'';
    var versteck = (this.NS4) ? "hide" : "hidden"

        if(this.IE) {
           this.dom=eval(docObj+eb+styleObj);
        } else if(this.NS4){
          this.dom=eval(docObj+'.'+eb);
        } else if(this.NEWBR){
          this.dom = eval(docObj+'.getElementById("'+eb+'")'+styleObj);
//alert(docObj+'.getElementById("'+eb+'")'+styleObj);
        }
}
return this.dom;
}
Browser = new ClsBrowser();