// JAVASCRIPT

// THIS MAKES THE DATE WHENEVER A PAGE IS LOADED (AND, THEREFORE, THE SCRIPT IS LOADED)

	month = new Array(12)
	month[0] = "January";
	month[1] = "February";
	month[2] = "March";
	month[3] = "April";
	month[4] = "May";
	month[5] = "June";
	month[6] = "July";
	month[7] = "August";
	month[8] = "September";
	month[9] = "October";
	month[10] = "November";
	month[11] = "December";

	now = new Date(Date.parse(document.lastModified));				// GET THE LAST-MODIFIED TIMESTAMP
	theMonth = month[now.getMonth()];							// MAKE THE MONTH, USING ARRAY
	theDate = now.getDate();								// GET THE MONTH DAY
	theYear = now.getYear();								// GET THE YEAR
	theYear = "" + theYear;									// FORCE THE YEAR VALUE TO BE A STRING
	theYear="20" + theYear.substring (theYear.length-2, theYear.length);	// MAKE THE YEAR MILLENIUM 2
	theDateline = theMonth + " " + theDate + ", " + theYear;			// BUILD THE STRING
	theDateline = theDateline.toUpperCase();						// MAKE UPPERCASE


// THIS CHANGES THE BACKGROUND IMAGE AND POINTER FOR THE TOP LINKS. 
// "obj" is the TD asking to be changed
function setBG(obj)
	{
	var theclass = "";
	theclass=obj.className;
	if(theclass.indexOf("OVER")>-1)			// classname contains "OVER"
		{
		theclass = theclass.replace("OVER", "UP")
		}
		else
		{
		theclass = theclass.replace("UP", "OVER")
		}
	obj.className = theclass;
	}

function dropmenu(mnu)
	{
	var whichmenu = mnu;											// WHICH MENU
	var visibleState = "";
	var whichclass = "";

	if(isNaN(whichmenu))												// NOT A NUMBER - MUST BE ASKING TO CHANGE SUBMENU BACKGROUND
		{
		whichclass = whichmenu.className;								// GET THE CLASS NAME and SWITCH
		if(whichclass == "dropTDup")	
			{
			whichclass = "dropTDover";
			}
			else
			{
			whichclass = "dropTDup";
			}
		whichmenu.className=whichclass;			
		return;
	}

	whichmenu = "layerMenu" + mnu;
	visibleState = document.getElementById(whichmenu).style.visibility;
	if(visibleState == "hidden")
		{
		document.getElementById(whichmenu).style.visibility = "visible";
		}
		else
		{
		document.getElementById(whichmenu).style.visibility = "hidden";
		}

	}	



// CONTROL FOLLOVERS AND CLICKS ON BOARD MEMBERS
// THE ACTION CAN BE "over" or "click"

function board(obj,action)
	{


	var member=obj;
	var theaction=action;
	var temp="";
	if(theaction=="over")					// MOUSE OVER OR OUT
		{
		temp=member.style.backgroundColor;
		temp =temp.replace(" ","");			// SQUEEZE OUT THE SPACES
		temp =temp.replace(" ","");
		temp = temp.toUpperCase();			// MAKE UPPER CASE FOR COMPARISON SAKE
		if(temp  == "RGB(32,162,200)" || temp == "#20A2C8")		// COLOR IS LIGHT BLUE
			{
			member.style.backgroundColor = "#1B66AB";		// switch to DARK BLUE
			}
			else
			{
			member.style.backgroundColor = "#20A2C8";	// switch to LIGHT BLUE blue
			}
		}

	}

// DROP DOWNS



// ==================================================================================================================================
// SWITCH VISIBLE DIVS
// ==================================================================================================================================

/*   SWITCHDIVS: Switches visible divs, and arrows if requested
     divs must be named "div1, div2, div3, etc."

     Parameters:
     wo = the number of the div to change
     hm = how many divs there are, total
	px = div name prefix
*/

function switchDivs(wo,hm,px)
	{
	var howmany=hm;
	var whichone=wo;
	var prefix = px;
// alert ("how many " + howmany + "\nwhich one " + whichone + "\npefix " + prefix);

	// reset all
	for(x=1;x<howmany+1;x++)
		{
		temp=prefix + x;
		document.getElementById(temp).style.display="none";
		}

	// set specified div 

	temp=prefix + whichone;
	document.getElementById(temp).style.display="block";
	}

function showhidediv(wd)
	{
	var whichdiv=wd;
	var temp;
	temp = document.getElementById(whichdiv).style.display;
	if(temp=="block")
		{
		document.getElementById(whichdiv).style.display="none";
		}
		else
			{
			document.getElementById(whichdiv).style.display="block";
			}
		
	}
	
	




// HELPERS

function pause(milliseconds)
	{
	var dt = new Date();
	while ((new Date()) - dt <= milliseconds)
		{
		 /* Do nothing */
		}
	}

















