
function BrowserCheck(){
	if(window.defaultStatus){window.defaultStatus="";}
	var b=navigator.appName
	if(b=="Netscape") this.b="ns"
	else if(b=="Microsoft Internet Explorer") this.b="ie"
	else this.b=b
	this.version=navigator.appVersion
	this.useragent=navigator.userAgent
	this.v=parseInt(this.version)
	this.ns=(this.b=="ns"&&this.v>=4)
	this.ns3=(this.b=="ns"&&this.v>=3)
	this.ns4=(this.b=="ns"&&this.v==4)
	this.ns5=(this.b=="ns"&&this.v==5)
	this.ns6=(this.b=="ns"&&(navigator.userAgent.indexOf('Netscape6')>0))
	this.ns7=(this.b=="ns"&&((navigator.userAgent.indexOf('Netscape7')>0)||(navigator.userAgent.indexOf('Netscape/7')>0)))
	this.ie=(this.b=="ie"&&this.v>=4)
	this.ie4=(this.version.indexOf('MSIE 4')>0)
	this.ie5=(this.version.indexOf('MSIE 5')>0)
	this.ie6=(this.version.indexOf('MSIE 6')>0) // not tested yet
	this.moz=((navigator.appName=="Netscape")&&(navigator.appVersion.substring(0,1) >= "5"))
	this.opera=((navigator.appName=="Opera")||(navigator.userAgent.indexOf("Opera")>0))
	this.opera6=((this.opera)&&((navigator.appVersion.substring(0,1) >= "6")||(navigator.userAgent.indexOf("Opera 6")>0)))
	this.DOMsupport=(this.moz||this.opera)
	this.min=(this.ns||this.ie)
	// Opera pretends to be another Browser
	if(this.opera){
		this.ns=false;
		this.ns4=false;
		this.ns5=false;
		this.ie=false;
		this.ie4=false;
		this.ie5=false;
		this.moz=false;
	}
		this.win=(navigator.appVersion.indexOf("Windows")==-1)?false:true;
}

function switchCSS(element,classname){
is=new BrowserCheck();
	if(is.ie){
	 	obj=document.all[element];
	 	if(obj){
			obj.className=classname;
		}
	}
	if(is.moz||is.opera||is.opera6||is.ns6||is.ns7){
		obj=document.getElementById(element);
	 	if(obj){
			obj.className=classname;
		}
	}
}

function TdLinkClick(id){
	if(is.ie)obj=document.all[id];
	if(is.moz||is.opera||is.ns) var obj=document.getElementById(id);
	if (obj){
		var as=obj.getElementsByTagName("A");
		if(as){
                                   var pdLink=as[0].href;
                                   if (as[0].target=="_blank"){
                                          window.open(pdLink);
                                   }
                                   else{
                                         location.href=pdLink;
                                   } 
                    }
           }
}
