/* ROLLOVER CODE : START
This code applies to stylesheet based rollovers only. 
The code does not work for graphical rollovers. See the function switchImage() below.
To get this code to work, you must create a unique identifier for each table cell you want the rollover action to work for. 
The sample HTML below uses a place holder [uniqueID] to represent this identifier. 
Replace the place holder including the []s with your unique identifiers: 'download', 'archive', etc.

The function rollOver is currently checking for the css styles 'leftNavFilled' and 'leftNavRollOver'. You can swith these to the css styles
you created to represent the on and over states.

Sample HTML Application

<tr>
	<td id="[uniqueID]" name="[uniqueID]" onMouseOver="style.cursor='hand'; rollOver('[uniqueID]',this.className);" onMouseOut="rollOver('[uniqueID]',this.className);" class="leftNavFilled" valign="top" align="left" width="100%">
		<span class="leftNav">
		<a href="wherever.html">whereever</a><br/>
		</span>
	</td>
</tr>

*/
function rollOver(id, currentStyle) {
	if (currentStyle == 'nav1Filled') {
		document.getElementById(id).className = 'nav1RollOver';
	}
	if (currentStyle == 'nav1RollOver') {
		document.getElementById(id).className = 'nav1Filled';
	}
	if (currentStyle == 'nav2Filled') {
		document.getElementById(id).className = 'nav2RollOver';
	}
	if (currentStyle == 'nav2RollOver') {
		document.getElementById(id).className = 'nav2Filled';
	}
	if (currentStyle == 'nav3Filled') {
		document.getElementById(id).className = 'nav3RollOver';
	}
	if (currentStyle == 'nav3RollOver') {
		document.getElementById(id).className = 'nav3Filled';
	}
	if (currentStyle == 'nav4Filled') {
		document.getElementById(id).className = 'nav4RollOver';
	}
	if (currentStyle == 'nav4RollOver') {
		document.getElementById(id).className = 'nav4Filled';
	}
	if (currentStyle == 'nav5Filled') {
		document.getElementById(id).className = 'nav5RollOver';
	}
	if (currentStyle == 'nav5RollOver') {
		document.getElementById(id).className = 'nav5Filled';
	}
}
/* ROLLOVER CODE : STOP */

// gets the layer id and returns document path to layer id
function getCell(id) {
	return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : document.layers ? document['NS' + id].document.layers[0] : null;
}

// open new browser window
function openNewWindow(url,winName,features) { //v2.0
  newwindow=window.open(url,winName,features);
  if (window.focus) { newwindow.focus(); }
}

// places cursor on first form element
// call this function from onload within the body tag
function placeFocus() {
	if (document.forms.length > 0) {
		document.forms[0].elements[0].focus();
	}
}

/*********************************function details*********************************
function:	getToday
desc:		The following functions help generate the current browser time and date
			to be displayed in the browser window.
**********************************************************************************/
function getToday() {
	var thisDate = new Date();
	var months = new makeArray("January", "February", "March",
		"April", "May", "June", "July", "August", "September",
		"October", "November", "December");
	return getDay(thisDate) + ", " +
		months[thisDate.getMonth()] + " " + 
		thisDate.getDate() + " " + getFullYear(thisDate);
}

function getDay(date) {
	var days = new makeArray("Sunday", "Monday",
		"Tuesday", "Wednesday", "Thursday", "Friday",
		"Saturday");
	return days[date.getDay()];
}

function getFullYear(date) {
	year = date.getYear();
	if (year < 1000)
		year += 1900;
	return year;
}

function makeArray() {
	var args = makeArray.arguments;
	for (var i = 0; i < args.length; i++)
		this[i] = args[i];
	this.length = args.length;
}

// Example:
// simplePreload( '01.gif', '02.gif' ); 
function simplePreload() { 
	var args = simplePreload.arguments;
	document.imageArray = new Array(args.length);
	for(var i=0; i<args.length; i++) {
		document.imageArray[i] = new Image();
		document.imageArray[i].src = args[i];
	}
}

/*
Sample HTML: <a href="javascript:nothingMuch();" onMouseOver="switchImage(11,'img1.gif');" onMouseOut="switchImage(11,'img2.gif');"><img src="img1.gif" name="image1"></a>
 */
function switchImage(imgName,imgSrc) {
	if (document.images) {
		if (imgSrc != "none") {
			document.images[imgName].src = imgSrc;
		}
	}
}


// Macromedia Menu Rollover Code
function MM_findObj(n, d) { //v4.01
	var p,i,x;  
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
    	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
  	if(!(x=d[n])&&d.all) x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) 
	if ((obj=MM_findObj(args[i]))!=null) { 
		v=args[i+2];
    	if (obj.style) { 
			obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
		}
		obj.visibility=v; 
	}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0 
 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 
 if (restore) selObj.selectedIndex=0; 
}