var mouseoverColor
var mouseoutColor
var thisScreenColor
var savedNavItem

function changeColor(navLine, which)
{		
		if (navLine==savedNavItem)
		{
			//alert("do not change color")
		}
		else
		{
			//navigation mouseover color
			if (which == 1)
			{
				navLine.style.color=mouseoverColor
			}
			//navigation mouseout color
			if (which == 2)
			{
				navLine.style.color=mouseoutColor
			}
			//navigation this screen color (current page)
			if (which == 3)
			{
				navLine.style.color=thisScreenColor
			}
		}
}

function pageColors(mouseover, mouseout, thisScreen, navItem, siteMap)
{

//Parameters are: 
//                Mouse over color, Mouse out color, This page item color
//		  					Nav text to look for to highlight
//                className for Site Map and Guest Book Nav Items,
	 
//Set the color for the navigation bar - mouseover and mouseout and this page/screen
	mouseoverColor=mouseover
	mouseoutColor=mouseout
	thisScreenColor=thisScreen
	var navigationElements = document.getElementById("leftNavText")
	var navDivLength = navigationElements.children.length
	//skip over the First Two Divs (image and search) 
	for (i=2; i<navDivLength; i++)
	{
		var navTextLength = navigationElements.children[i].children.length
		//Set color for the links
		for (j=0; j<navTextLength; j++)
		{	

			if (navigationElements.children[i].children[j].tagName=="A")
			{
			//alert(navigationElements.children[i].children[j].innerText)
			//Highlight current page in left navigation bar
				if  (navigationElements.children[i].children[j].innerText==navItem)
				{
					var thisNavItem = navigationElements.children[i].children[j]
					changeColor(thisNavItem,3)
					savedNavItem = thisNavItem
					thisNavItem.style.cursor = "default"
				}
				else
				{
					var thisNavItem = navigationElements.children[i].children[j]
					changeColor(thisNavItem,2)
				}
			}
		}
	}
}

var message="Right Click function has been disabled."
if (document.layers)
{
	document.captureEvents(Event.MOUSEDOWN);
}

function captureMousedown(evt)
{
	if (evt)
	{
		mouseClick = evt.which
	}
	else
	{
		mouseClick = window.event.button
	}
	if(mouseClick==2 || mouseClick == 3)
	{
		alert(message)
		return false
	}
}

