// JavaScript Document

//===========================================================================//
// START roll over functionality
//
// Takes any object with these functions attached to them and adds rollover
// functionallity to them by adding or removing "Over" from the className. Both
// classes will need to be created within the CSS in order to work properly.
//
// Also takes into account a className with "Selected" appended to the end of 
// of it and prevents rollover functionality for that element. 
// 
// This function is neccesary as MSIE does not allow for complex layering of
// css styles utilizing :hover.
//---------------------------------------------------------------------------//
function buttonOver(myObject){
	if(myObject.className.indexOf("Selected")==-1 && myObject.className.indexOf("Over")==-1){
		myObject.className=myObject.className+"Over";
	}
}
function buttonOut(myObject){
	if(myObject.className.indexOf("Selected")==-1 && myObject.className.indexOf("Over")!=-1){
		myObject.className=myObject.className.substr(0,myObject.className.indexOf("Over"));
	}
}
//---------------------------------------------------------------------------//
// END roll over functionality
//===========================================================================//


//===========================================================================//
// START handle user selection of nav element
//
// Since the <div> element cannot have an href assigned to it, and the <a> tag
// may not occupy the entire size of the <div> element, the user could click on
// a section of the <div> element which hi-lites on roll over and not be sent to
// the corresponding page.
// This function handles the user clicking any area of the <div> not occupied by 
// the <a> tag and sends them to the correct location by getting the href from 
// the child <a> tag.
//---------------------------------------------------------------------------//
function buttonSelect(myObject){
	var myURL;
	for(var i=0; i<myObject.childNodes.length; i++){
		if(myObject.childNodes[i].nodeName=="A"){
			myURL=myObject.childNodes[i].href;
			window.location.href=myURL;
		}
	}
}
//---------------------------------------------------------------------------//
// END handle user selection of nav element
//===========================================================================//