//
// CUSTOM APIs
//


var pathtoimages = "images/";
var pathtomainnavbarimages = pathtoimages+"/mainnavbar/";
var pathtosubnavbarimages = pathtoimages+"/subnavbar/";
var nscp = (navigator.appName == "Netscape")
var ismc = (navigator.appVersion.indexOf("Mac") != -1)
var vers = parseFloat(navigator.appVersion.substring(22,25))
var IE4 = (document.all) ? 1 : 0;       					// initialize browser..
var NS4 = (document.layers) ? 1 : 0;    					// identification and...
var browser=false;
if (nscp) { 
	var nav_ver = parseFloat(navigator.appVersion.substring(0,3));
	if (nav_ver == "5.0") { IE4=1 }
}

if((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)>=3)||(parseInt(navigator.appVersion)>=4)) browser=true;


function getObj(obj)
{	if (nscp)
	{	compLayr = document.layers[obj]
	}
	else
	{	compLayr = eval("document.all." + obj + ".style")
	}
	return compLayr
}


function setLeft(layr,num)
{	obj = getObj(layr)
	if (nscp)
	{	obj.left = num
	}
	else
	{	obj.posLeft = num
	}
}

function incTop(layr,num)
{	obj = getObj(layr)
	if (nscp)
	{	obj.top = obj.top + num
	}
	else
	{	a = eval(layr + ".offsetTop")
		obj.top = a + num
	}
}

function incLeft(layr,num)
{	obj = getObj(layr)
	if (nscp)
	{	obj.left = obj.left + num
	}
	else
	{	a = eval(layr + ".offsetLeft")
		obj.left = a + num
	}
}

function getLeft(layr)
{	obj = getObj(layr)
	if (nscp)
	{	return (obj.left)
	}
	else
	{	x = eval(layr + ".offsetLeft")
		return (x)
	}
}


function show(layr)
{	obj = getObj(layr)
	obj.visibility = "visible"
}

function hide(layr)
{	obj = getObj(layr)
	obj.visibility = "hidden"
}




function screenWidth()
{	avail = (nscp) ? window.innerWidth : document.body.clientWidth
	return avail
}

// BrowserCheck Object
function BrowserCheck() {
	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.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	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.min = (this.ns||this.ie)
	this.pc = (this.version.indexOf('Windows')>0)
	this.mac = (this.version.indexOf('Macintosh')>0)
}
is = new BrowserCheck()

// if (is.pc) document.write("<LINK href=\"common/pcstyle.css\" rel=stylesheet>");
// if (is.mac) document.write("<LINK href=\"common/macstyle.css\" rel=stylesheet>");
