function BrowserCheck() {
  var b = navigator.appName;
  if (b == "Netscape") this.b = "NS";
  else if (b == "Microsoft Internet Explorer") this.b = "IE";
  else this.b = b;
  this.v = parseInt(navigator.appVersion);
  this.NS = (this.b == "NS" && this.v>=4);
  this.NS4 = (this.b == "NS" && this.v == 4);
  this.NS5 = (this.b == "NS" && this.v == 5);
  this.IE = (this.b == "IE" && this.v>=4);
  this.IE4 = (navigator.userAgent.indexOf('MSIE 4')>0);
  this.IE5 = (navigator.userAgent.indexOf('MSIE 5')>0);
  if (this.IE5 || this.NS5) this.VER5 = true;
  if (this.IE4 || this.NS4) this.VER4 = true;
  this.OLD = (! this.VER5 && ! this.VER4) ? true : false;
  this.min = (this.NS||this.IE);
}
is = new BrowserCheck();

function findObj(n, d) {
  var p, i, x;
  if(!d) d = document;
  if((p = n.indexOf("?")) > 0 && parent.frames.length) {
    d = parent.frames[n.substring(p+1)].document;
    n = n.substring(0, p);
  }
  if(!(x = d[n]) && d.all)
    x = d.all[n];
  for (i = 0; !x && i < d.forms.length; i++)
    x = d.forms[i][n];
  for(i = 0; !x && d.layers && i < d.layers.length; i++)
    x = findObj(n, d.layers[i].document);
  if(!x && d.getElementById)
    x = d.getElementById(n);
  return x;
}

function getInnerH() {
  var h = 0;

  if (document) {
    if (document.body) {
      if (document.body.offsetHeight)
        h = document.body.offsetHeight;
    }
    if (document.documentElement) {
      if (document.documentElement.clientHeight)
        h = document.documentElement.clientHeight;
    }
  }
  if (window) {
    if (window.innerHeight)
      h = window.innerHeight;
  }
  return parseInt(h);
}

function getObjH(e) {
  var h = 0;
  if (e) {
    if (e.clip && e.clip.height)
      h = e.clip.height;
    if (e.style && e.style.pixelHeight)
      h = e.style.pixelHeight;
    if (e.offsetHeight)
      h = e.offsetHeight;
  }
  return parseInt(h);
}

function getYOffset() {
  var y = 0;
  if (document) {
    if (document.body) {
      if (document.body.scrollTop)
        y = document.body.scrollTop;
    }
    if (document.documentElement ) {
      if (document.documentElement.scrollTop)
        y = document.documentElement.scrollTop;
    }
  }
  if (window) {
    if (window.pageYOffset)
      y = window.pageYOffset;
  }
  return parseInt(y);
}





