<!--
/* -------------------------------------------------------------------------- */

//-----------   FUNCTION SEPARATOR   --------------// 

function searchChangeAction(searchtype)
{
	switch (searchtype)
	{
		case '' :
		case 'ecu.edu.au' :
			// Search WWW or ECU
			document.getElementById('searchform').action = "http://www.google.com/u/EdithCowan";
			break;
		
		case 'staff' :
			// Search Staff Directory
			document.getElementById('searchform').action = "http://www.ecu.edu.au/staffdir/search.fcgi";
			break;
			
		default :
			// Set default to search via Google
			document.getElementById('searchform').action = "http://www.google.com/u/EdithCowan";
			break;
	}
}

//-----------   FUNCTION SEPARATOR   --------------//

function logsearch(theLocation)
//log search terms
{
	if (document.getElementById('terms').value.length > 0 )
	{
		var location = theLocation;
		var loggerUrl ='http://www.ecu.edu.au/marketing/w20x/loggers/search_logger.php?terms='+document.getElementById('terms').value+'&sitesearch='+document.getElementById('sitesearch').value+'&location='+location ;
	    document.getElementById('hiddenframe').src=loggerUrl;
		searchChangeAction(document.getElementById('sitesearch').value);
		document.getElementById('searchform').submit();
	return true;
	}	
}

/* -------------------------------------------------------------------------- */
// -->