function Is(){
   var brName =		navigator.appName.toLowerCase();
   this.agent = 	navigator.userAgent.toLowerCase();
   this.apVer =		parseInt(navigator.appVersion);
   this.fullApVer =	parseFloat(navigator.appVersion);
   this.net =		(brName.indexOf('netscape')!=-1);
   this.ns =		(brName.indexOf('netscape')!=-1);
   this.explor =	(brName.indexOf('explorer')!=-1);
   this.ie =	(brName.indexOf('explorer')!=-1);
   this.net4Buggy =	(this.net && (this.fullApVer < 4.04));
   this.net4 =		(this.net && (this.apVer >= 4));
   this.ns4 =		(this.net && (this.apVer >= 4));
   this.explor4 =	(this.explor && (this.apVer >= 4));
   this.ie4 =	(this.explor && (this.apVer >= 4));
   this.win =		(this.agent.indexOf('win')!=-1);
}
is = new Is();

function popMe(where,who,dX,dY) {
	var newwin=open(where,who,"width="+dX+",height="+dY+",scrollbars=yes,status=no,resize=no,toolbar=no");
}

function popMe_tool(where,who,dX,dY) {
	var newwin=open(where,who,"width="+dX+",height="+dY+",scrollbars=yes,status=no,resize=no,toolbar=yes");
}

function popMe_ret(where,who,dX,dY) {
	var newwin=open(where,who,"width="+dX+",height="+dY+",scrollbars=yes,status=no,resize=no,toolbar=no");

		return newwin;
}

function showLayer(id) {
	if(is.net) document.layers[id].visibility="show";
	if(is.explor) document.all[id].style.visibility='visible';
}

function hideLayer(id) {
	if(is.net) document.layers[id].visibility="hide";
	if(is.explor) document.all[id].style.visibility='hidden';
}

function toCurrency(n) {
	if(n>0) {
		nn=String(n);
		nnn=String();

		if(nn.indexOf('.')==-1) nnn=nn+".00";
		if(nn.indexOf('.')==nn.length-1) nnn=n+"0";
		if(nn.indexOf('.')==nn.length-2) nnn=n;
		if(nn.indexOf('.')<nn.length-2) 
			for(x=0;x<nn.indexOf('.')+3;x++) nnn=nnn+nn[x];
	}
	return nnn;
}
