	// browser type

	var bc = new caps();
	var newWindow = null;


	function caps()
	{
		var UA = navigator.appName; //userAgent;
		this.appName = UA;
			
		if(UA.indexOf("MSIE") != -1)
		{
			this.appName = "ie";
			this.ie = true;
			this.appVer = UA.substring(UA.indexOf("MSIE") + 5, UA.indexOf(";", UA.indexOf("MSIE") + 5));
			v = parseInt(this.appVer);
			if(v == 2 ) this.ie2 = true;
			else if(v == 3 ) this.ie3 = true;
			else if(v == 4 ) this.ie4 = true;
			else if(v == 5 ) this.ie5 = true;
			else if(v == 6 ) this.ie6 = true;
			else if(v == 7 ) this.ie7 = true;
			else if(v == 8 ) this.ie8 = true;
			if(this.ie4 || this.ie5 || this.ie6 || this.ie7 || this.ie8) this.ie4p = true;
			if(this.ie5 || this.ie6 || this.ie7 || this.ie8) this.ie5p = true;
			
		}
		else if(UA.indexOf("Firefox") != -1)
		{
			this.appName = "ff";
			this.ff = true;
			this.appVer = UA.substr(UA.indexOf("Firefox") + 8);
			if (this.appVer.indexOf(" ") > -1)
				this.appVer = this.appVer.substring(0, this.appVer.indexOf(" "));
			v = parseInt(this.appVer);
			if(v == 1 ) this.ff1 = true;
			else if(v == 2 ) this.ff2 = true;
			else if(v == 3 ) this.ff3 = true;
			if (this.ff1 || this.ff2 || this.ff3)
				this.ff1p = true;
		}
		else if(UA.indexOf("Mozilla") != -1)
		{
			this.appName = "nav";
			this.nav = true;
			this.appVer = UA.substring(UA.indexOf("Mozilla") + 8, UA.indexOf(" ", UA.indexOf("Mozilla") + 8));
			v = parseInt(this.appVer);
			if(v == 2 ) this.nav2 = true;
			else if(v == 3 ) this.nav3 = true;
			else if(v == 4 ) this.nav4 = true;
			else if(v == 6 || v == 5) this.nav6 = true;
			if (this.nav4 || this.nav6) this.nav4p = true;
		}
		if(UA.indexOf("Windows 95") > 0 || UA.indexOf("Win95") != -1 || UA.indexOf("Win98") != -1 || UA.indexOf("Windows 98") != -1 || UA.indexOf("Windows NT") != -1) this.win32 = true;
		else if(UA.indexOf("Windows 3.1") != -1 || UA.indexOf("Win16") != -1) this.win16 = true;
		else if(UA.indexOf("Mac") != -1) this.anymac = true;
		else if(UA.indexOf("SunOS") != -1 || UA.indexOf("HP-UX") != -1 || UA.indexOf("X11") != -1) this.unix = true;
		else if(UA.indexOf("Windows CE") != -1) this.wince = true;
	}

	function handOpen()
	{
		window.event.srcElement.style.cursor="hand";
	}
	function handClose()
	{
		window.event.srcElement.style.cursor="default";
	}

	function nop()
	{
	}

	function xsubmit(formName, xmode)
	{
		var form = document.forms[formName];
		if (xmode)
			form.mode.value = xmode;
		else
			form.mode.value = "submit";	
		form.submit();
	}

	
	function swapImage(eImg, mode){
		if (mode == 0) 
			eImg.src = eImg.src.replace(/_1/,'_0');
		else
			eImg.src = eImg.src.replace(/_0/,'_1');	
	}
	
	function open_help(help_url)
	{
		var w = window.open(help_url,"help","scrollbars=yes,resizable=yes, width=550,height=400,top=50,left=50,screenX=100,screenY=50");
		w.focus();
	}
	function open_load(url)
	{
		var w = window.open(url,"install","width=1,height=1,top=0,left=0,screenX=0,screenY=0");
		w.focus();
	}

function showDiv(div, bShow)
{
	var colDiv = document.all.tags("DIV");
	var len = colDiv.length;	
	for (i=0; i < len; i++){
		oDiv = colDiv.item(i);

		// make sure its our div
		if (oDiv.id == div){
			if (bShow){
				oDiv.style.display="inline"
			}
			else{
				oDiv.style.display="none"
			}
		}
	}
}
function toggleVisible(parent)
{
	var colTR = document.getElementsByTagName("TR");
	var strParent = parent.id;
	var len = colTR.length;	
	var bVisible = true;
	for (i=0; i < len; i++){
		oTR = colTR.item(i);
		if (oTR.getAttribute("parent") == strParent){
			if (oTR.style.display == "none"){
				oTR.style.display=""
				bVisible = true;
			}
			else {
				oTR.style.display="none"
				bVisible = false;
			}
		}
	}

	// toggle the bullet
	var img = document.getElementById("img_"+strParent);
	if (img)
		img.setAttribute("src", bVisible ? "/images/triangledown.gif" : "/images/triangleright.gif", 0);
}

function replaceImage(node, imagePath)
{
	node.src = imagePath;
}
