function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ie5p=(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 
} 
bw=new verifyCompatibleBrowser();

function SWidth()
{
	w= (screen) ? screen.width : 0;
	return w;
}
function SHeight()
{
	h= (screen) ? screen.height : 0;
	return h;
}
function ClientWidth()
{
	w=(bw.ie4 || bw.ie5p || bw.ie5) ? document.body.clientWidth : (bw.ns5 || bw.ns4) ? innerWidth : 0;
	return w;
}
function ClientHeight()
{
	h=(bw.ie4 || bw.ie5p || bw.ie5) ? document.body.clientHeight : (bw.ns5 || bw.ns4) ? innerHeight : 0;
	return h;
}

function windowSOpener(fileName, w, h, l, t){
	msgWindow=window.open(fileName,"winName","width="+w+",height="+h+",left="+l+",top="+t+",toolbar=0,directories=0,menubar=0,resizable=0,location=0,scrollbars=1,copyhistory=0");
}

// open popup window with scrollbar centered on desktop
function windowCOpener(fileName, w, h){
	l=20;
	t=20;
	windowSOpener(fileName, w, h, l, t);
}
// open popup window with scrollbar centered on browser window
function windowBCOpener(fileName, w, h){
	l=(ClientWidth()-w);	l=(l<0) ? 0 : parseInt(l/2);
	t=(ClientHeight()-h); t=(t<0) ? 0 : parseInt(t/2);
	windowSOpener(fileName, w, h, l, t);
}
