

function CheckBrowser(){

  this.win=(navigator.userAgent.indexOf("Win") >= 0)?1:0;

  this.ver=navigator.appVersion;

  this.dom=document.getElementById?1:0; 

  this.ie5=(this.ver.indexOf("MSIE")>-1 && this.dom)?1:0; 

  this.ie4=(document.all && !this.dom)?1:0;

  this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

  this.ns4=(document.layers && !this.dom)?1:0;

  this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);

  return this;

}



function GetDivObject(obj,cont){

  cont=(!cont) ? '':'document.'+cont+'.';

  this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(cont+'document.'+obj):0;

  this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(cont+'document.'+obj):0;

  this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight;

  this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight;

  this.ChangeDiv = ChangeDiv;

  this.x;

  this.y; 

  this.obj = obj + "Object";

  eval(this.obj + "=this");

  return this;

}



function ChangeDiv(msg_){

  var msg=msg_;

  if(bw.ns4){

    this.el.document.open("text/html");

    this.el.document.write(msg);

    this.el.document.close();

  }else{

    this.el.innerHTML = msg;

  }

}

function SelectCss(dir){
  if(bw.win && bw.ns4){
    document.write("<LINK REL=STYLESHEET HREF=\""+dir+"css/w_ns4_style.css\" TYPE=\"text/css\">");
  }else{
    document.write("<LINK REL=STYLESHEET HREF=\""+dir+"css/style.css\" TYPE=\"text/css\">");
  }
}

function Popupwindow(link,width,height){
 var newwin = window.open(link,"NewWindow", "toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,location=no,resizable=yes,width="+width+",height="+height);  

}

function Popupwindow2(link,width,height){
 var newwin = window.open(link,"NewWindow2", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,location=no,resizable=yes,width="+width+",height="+height);  

}

function Popupwindow3(link,width,height){
 var newwin = window.open(link,"NewWindow3", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,location=no,resizable=yes,width="+width+",height="+height);  

}
function Printwindow(link){
 var newwin = window.open(link,"NewWindow", "toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,location=no,resizable=yes,width=600,height=400");  
}

function PrintPg(url){
 window.open(url,"PrintPg", "toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,location=no,resizable=yes,width=750,height=410"); 
}
