
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()
{
	a = document.getElementsByName("menuitem");

	for( var i = 0; i < a.length; i++ )  
	{
		var cur_url = window.location.href;
		
		// remove everything after ? in cur_url(incase there were passed variables
		var que_index = cur_url.indexOf('?');
		if (que_index!=-1)
			cur_url = cur_url.substring(0,que_index);
			
		// if there is nothing after the last slash in cur_url and a[i].href has default in it, remove everything after the last slash in a[i].href
		var slash_index = a[i].href.lastIndexOf('/');
		if ( ((slash_index+1)==cur_url.length) && (a[i].href.indexOf("default.")!=-1) )
			a[i].href = a[i].href.substring(0,slash_index+1);

		if(a[i].href == cur_url)
		{
			a[i].className = "currentLink";
			break;
		}
	}
}

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; 
}
