  //browsers.
  d=document;
  l=d.layers; //netscape 4 detection trick.
  op=navigator.userAgent.indexOf('Opera')!=-1;
  //Browsers.
  ie=navigator.userAgent.indexOf("MSIE")!=-1;
  moz=navigator.userAgent.indexOf("Gecko")!=-1;
  moz0=0; moz1=0;kon=0;
  if( moz ) { moz1=navigator.userAgent.indexOf("rv:1")!=-1 };
  if( moz ) { moz0=navigator.userAgent.indexOf("rv:0")!=-1 };
  kon=navigator.userAgent.indexOf("Konqueror")!=-1;
  // Os.
  mac=navigator.platform.indexOf("PPC") !=-1;

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

  //1k DHTML API functions http://www.dithered.com
  function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}
  function sE(e){e.style.visibility='visible';}
  function sX(e,x){op?e.style.pixelLeft=x:e.style.left=x;}
  function sY(e,y){op?e.style.pixelTop=y:e.style.top=y;}

  function gH(){if(ie||moz1) return d.body.scrollHeight; if(kon) return d.body.clientHeight; if(moz0) return window.innerHeight; return 0;};

  function gW(){if(ie||moz1) return d.body.scrollWidth; if(kon) return d.body.clientWidth; if(moz0) return window.innerWidth; return 0;};

 // function displayTopAd() { if(kon){ if( d.body.scrollWidth < 300 || d.body.scrollHeight < 300 ) return 0; return 1; } if( d.body.clientWidth < 300 || d.body.clientHeight < 300 ) return 0; return 1; };

 // function displayAd() {if((ie && !mac)||moz1){ if( d.body.clientWidth < 300 || d.body.clientHeight < 300 ) return 0; return 1;} else if(kon){ if( d.body.scrollWidth < 300 || d.body.scrollHeight < 300 ) return 0; return 1;} return 0;};
