function wrapObjModern(name) {
  this.obj = document.getElementById(name);
  if (this.obj) {
    this.style = this.obj.style;
  } else {
    this.style = null;
  }
}

function wrapObjIE(name) {
  this.obj = document.all[name];
  this.style = document.all[name].style;
}

function wrapObjNN(name) {
  this.obj = document.layers[name];
  this.style = document.layers[name];
}

function b_getObjModern(name) {
    return new wrapObjModern(name);   
}

function b_getObjIE(name) {
    return new wrapObjIE(name);   
}

function b_getObjNN(name) {
    return new wrapObjNN(name);   
}

function b_showObject(name, open) {
  var o = this.getObj(name);
  if (open) { 
    o.style.display = ""; 
  } else { 
    o.style.display = "none"; 
  }
} 

function browserObj() {
   if (document.getElementById) { // DOM level 1 browsers: IE 5+, NN 6+
     this.getObj = b_getObjModern;      
   } else if (document.all) { // IE 4
     this.getObj = b_getObjIE;
   } else if (document.layers)  { // NN 4
     this.getObj = b_getObjNN;
   }
   this.showObj = b_showObject;
}

epBrowser = new browserObj();

