
function submitGooglePeopleSearchForm()
{
	if (document.getElementById("webLookup").checked) 
	{
	  var webLookupText=document.getElementById("inputbox").value;
	  var webSearchString='http://www.google.com/u/eku?sitesearch=eku.edu&q='+webLookupText;
	  window.location=webSearchString;
	}

	if (document.getElementById("peopleLookup").checked) 
	{
	  var peopleLookupText=document.getElementById("inputbox").value;
	  var peopleSearchString= 'http://people.eku.edu/?search_by=f&advanced=1&search=Search&area=&search_name='+peopleLookupText;
	  window.location=peopleSearchString;
	}
}

function highlightCurrentLink()
{
	menu = returnObjById('sideMenu');
	if(menu==null)
		return;

	a = menu.getElementsByTagName("a");  

	for( var i = 0; i < a.length; i++ )  
	{
	  if((a[i].href == window.location.href))
	  {
	    //alert("URL: "+a[i].href+"  Node ID: ");
		a[i].className="currentLink";
	  }
	  else
	  {
		 //check a's for current page empty link
		 var sPath = window.location.pathname;
		 //var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
		 var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);	
		 
		 var myOldString=a[i].href;
		 var myNewString = myOldString.replace(sPage, "");

	     if((myNewString == window.location.href))
		 {
			a[i].className="currentLink";
		 }
		 //check url for default page
		 myOldString= window.location.href;
	     if((myOldString == a[i].href+"/"))
		 {
			a[i].className="currentLink";
		 }		 
		 myNewString = myOldString.replace("default.php", "");
	     if((myNewString == a[i].href+"/"))
		 {
			a[i].className="currentLink";
		 }
	 
	  }
	}
}
function returnObjById( id ) 
{ 
    if (document.getElementById) 
        var returnVar = document.getElementById(id); 
    else if (document.all[id]) 
        var returnVar = document.all[id]; 
    else if (document.layers) 
       var returnVar = document.layers[id]; 
    return returnVar; 
}
