/* ======================= *\
HTML/PHP/JS Code by: 
        Stephen Brisee, Programmer, Sr.
        Momentum IT Group, Inc.
        Halifax, Nova Scotia
        B3H 3B7, Canada
        (902) 429-4182
        thebreeze@momentumitgroup.com
        http://momentumitgroup.com/
        Copyright 2000,2001 Momentum IT Group, Inc.
======================= */

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 round(anumber) {
	nn=new String(anumber);
	nn=nn.toString();
	nnn=String();
	nnn=nnn.toString();
	
	if(nn.indexOf('.')==-1) nnn=nn+".00";
	else if(nn.indexOf('.')==nn.length-2) nnn=nn+"0";
	else if(nn.indexOf('.')==nn.length-3) nnn=nn;
	else if(nn.indexOf('.')<nn.length-3) 
		for(x=0;x<nn.indexOf('.')+3;x++) nnn=nnn+''+nn.charAt(x);

	return(nnn);
}

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 button_on ( imgName ) {
	butOn = eval ( imgName + "_on.src" );
	document [imgName].src = butOn;
}

function button_off ( imgName ) {
	butOff = eval ( imgName + "_off.src" );
	document [imgName].src = butOff;
}

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';
}

