/* ================================
    Sitewide JavaScript
   ================================ */

/* If you need to preload images:

if(document.images)
{
	var myImages = new Object();
	preload_image('images/header8.png');
	preload_image('images/header9.png');
}

*/


function navOn(temp, temp2) {	
	//safe function to show an element with a specified id
	var x=temp.getElementsByTagName('ul');
	if(x[0])
	{
		x[0].style.display = 'block';
	}
	x = temp.getElementsByTagName('a');
	if(x[0])
	{
		x[0].className = temp2;
	}
	x = temp.getElementsByTagName('img');
	if(x[1])
	{
		x[0].src = "images/navoverleft.gif";
		x[1].src = "images/navoverright.gif";
	}
}

function navOff(temp, temp2) {
	var x=temp.getElementsByTagName('ul');
	//safe function to hide an element with a specified id
	if(x[0])
	{
		x[0].style.display = 'none';
	}
	x = temp.getElementsByTagName('a');
	if(x[0])
	{
		x[0].className = temp2;
	}
	x = temp.getElementsByTagName('img');
	if(x[1])
	{
		x[0].src = "images/clear.gif";
		x[1].src = "images/clear.gif";
	}
}


function sitewidePageLoaded()
{
	// Insert code for sitewide functionality
}

function styleTo(target_child, style_state)
{
	/* Create more else if conditions with new possible values
	   for more combinations of style assignments.  Below are
	   examples of style assignments.
	
		target_child.style.fontFamily = "Georgia";
		target_child.style.fontWeight = "bold";
		target_child.style.fontStyle = "italic";
		target_child.style.textDecoration = "underline";
		target_child.style.textTransform = "uppercase";
		target_child.style.color = "#ff0000";
		target_child.style.backgroundColor = "#000000";
		target_child.style.backgroundImage = "url(images/clear.gif)";
	*/

	if(style_state==40)
	{
		target_child.style.color = "#000000";
		// Code to change the style for state 0
	}
	else if (style_state==41)
	{
		target_child.style.color = "#333333";
		/* Code to change the style for state 1
		   Add states as needed.  Separate states do
		   not need to be for the same type of HTML
		   element or class; just be sure to that the
		   style_state and target_child correlate for
		   each call. */
	}
}
