
// show div
function show(id) {
	if (document.layers) {
		document.layers[id].visibility = "show";
	}
	else if (document.all) {
		document.all[id].style.visibility = "visible";
	} 
	else if (document.getElementById) {
		document.getElementById(id).style.visibility = "visible";
	}
}

// hide div
function hide(id) {
	if (document.layers) {
		document.layers[id].visibility = "hide";
	}
	else if (document.all) {
		document.all[id].style.visibility = "hidden";
	} 
	else if (document.getElementById) {
		document.getElementById(id).style.visibility = "hidden";
	}
}

// set div position
function setLyr(obj,lyr)
{
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	newY -= 2;
	newX += 166;
	var x = new getObj(lyr);
	x.style.top = newY + 'px';
	x.style.left = newX + 'px';
}

// find object X coord
function findPosX(obj)
{
obj2 = document.getElementById(obj);
	var curleft = 0;
	if (obj2.offsetParent)
	{
			while (obj2.offsetParent)
			{
					curleft += obj2.offsetLeft
					obj2 = obj2.offsetParent;
			}
	}
	else if (obj2.x)
			curleft += obj2.x;
	return curleft;
}

// find object Y coord
function findPosY(obj)
{
obj2 = document.getElementById(obj);
	var curtop = 0;
	if (obj2.offsetParent)
	{
			while (obj2.offsetParent)
			{
					curtop += obj2.offsetTop
					obj2 = obj2.offsetParent;
			}
	}
	else if (obj2.y)
			curtop += obj2.y;
	return curtop;
}

// don't edit this
function getObj(name)
{
 if (document.getElementById)
 {
	   this.obj = document.getElementById(name);
	   this.style = document.getElementById(name).style;
 }
 else if (document.all)
 {
	   this.obj = document.all[name];
	   this.style = document.all[name].style;
 }
 else if (document.layers)
 {
	   if (document.layers[name])
	   {
	   	this.obj = document.layers[name];
	   	this.style = document.layers[name];
	   }
	   else
	   {
	    this.obj = document.layers.testP.layers[name];
	    this.style = document.layers.testP.layers[name];
	   }
 }
}

// change nav

function navOver(id) 
{
	var bgimage = "url(images/navon.gif)"
	// set text color here
	var textcol = "#ffffff";	
	if (document.all)
	{
		document.all[id].style.background = bgimage;
		document.all[id].style.color = textcol;
		}
	else if (document.getElementById)
	{
		document.getElementById(id).style.background = bgimage;
		document.getElementById(id).style.color = textcol;
		}
	else if (document.layers)
	{
		if( document.layers[id] )
		{
			document.layers[id].background = bgimage;
			document.layers[id].color = textcol;
		}  
	}
}

function navOff(id) 
{
	var bgimage = "url(images/navoff.gif)"
	// set text color here
	var textcol = "#7F2A17";	
	if (document.all)
	{
		document.all[id].style.background = bgimage;
		document.all[id].style.color = textcol;
		}
	else if (document.getElementById)
	{
		document.getElementById(id).style.background = bgimage;
		document.getElementById(id).style.color = textcol;
		}
	else if (document.layers)
	{
		if( document.layers[id] )
		{
			document.layers[id].background = bgimage;
			document.layers[id].color = textcol;
		}  
	}
}

function subOver(id) 
{
	var color = '#BD4B32';
	// set text color here
	var textcol = "#ffffff";
	if (document.all)
	{
		document.all[id].style.backgroundColor = color;
		document.all[id].style.color = textcol;
		}
	else if (document.getElementById)
	{
		document.getElementById(id).style.backgroundColor = color;
		document.getElementById(id).style.color = textcol;
		}
	else if (document.layers)
	{
		if( document.layers[id] )
		{
			document.layers[id].bgColor = color;
			document.layers[id].color = textcol;
		}
	}
}

function subOff(id) 
{
	var color2 = '#CCCC99';
	// set text color here
	var textcol = "#7F2A17";	
	if (document.all)
	{
		document.all[id].style.backgroundColor = color2;
		document.all[id].style.color = textcol;
		}
	else if (document.getElementById)
	{
		document.getElementById(id).style.backgroundColor = color2;
		document.getElementById(id).style.color = textcol;
		}
	else if (document.layers)
	{
		if( document.layers[id] )
		{
			document.layers[id].bgColor = color2;
			document.layers[id].color = textcol;
		}  
	}
}