/* 	nav.js - Gives a specified nav item the class name "current".
------------------------------------------------------------------------
	Usage
------------------------------------------------------------------------
   	
   	Each nav item must have the prefix "nav_" followed by a unique name:

		<li id="nav_home">
			<a href="#">home</a>
		</li>
   	
   	Add the onload function to the body element and reference the unique part of the nav id.
   	
		<body onload="highlight('home')">
   	
------------------------------------------------------------------------*/

function highlight(navid, subnavid) {
	if(document.getElementById){
		// Highlight the nav item for this page
		if (navid) {
			if (document.getElementById( 'nav_' + navid )){
				document.getElementById( 'nav_' + navid ).className = 'current';
			}
			
		}
		if(subnavid){
			//highlight subnav if applicable
			if (document.getElementById( 'subnav_' + subnavid )){
				document.getElementById( 'subnav_' + subnavid ).className = 'current';
			}
			
		}
		return;
	}
}


// clears the search field
function clearsearch(){
	if (!document.getElementById("keywords")) return false;
	var field = document.getElementById("keywords");
	field.focus();
}