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 windowOpener(fileName, w, h, l, t){
window.open(fileName,"winName","width="+w+",height="+h+",left="+l+",top="+t+",toolbar=0,directories=0,menubar=0,resizable=0,location=0,scrollbars=0,copyhistory=0");
}

function windowOpener1(fileName, w, h, l, t){
	return window.open(fileName,"winName","width="+w+",height="+h+",left="+l+",top="+t+",toolbar=0,directories=0,menubar=0,resizable=0,location=0,scrollbars=0,copyhistory=0");
}

function windowWSOpener(fileName, w, h, l, t){
	return 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,s){
	l=(SWidth()-w);	l=(l<0) ? 0 : parseInt(l/2);
	t=(SHeight()-h); t=(t<0) ? 0 : parseInt(t/2);
	if (s)	windowWSOpener(fileName, w, h, l, t);
	else windowOpener(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);
	windowOpener(fileName, w, h, l, t);
}
// open/reopen popup window with scrollbar centered on desktop
var msgwin
function windowCReOpener(fileName, w, h,s){
	l=(SWidth()-w);	l=(l<0) ? 0 : parseInt(l/2);
	t=(SHeight()-h); t=(t<0) ? 0 : parseInt(t/2);
	if (msgwin)
	{
		if (!msgwin.closed)	msgwin.close();
	};
	if (s)	msgwin=windowWSOpener(fileName, w, h, l, t);
	else 	msgwin=windowOpener1(fileName, w, h, l, t);
}
// open/reopen popup window with scrollbar centered on browser window
var msgwin1
function windowBCReOpener(fileName, w, h){
	l=(ClientWidth()-w);	l=(l<0) ? 0 : parseInt(l/2);
	t=(ClientHeight()-h); t=(t<0) ? 0 : parseInt(t/2);
	if (msgwin1)
	{
		if (!msgwin1.closed)	msgwin1.close();
	};
	msgwin1 = windowOpener1(fileName, w, h, l, t);
}