function searchFormSubmitCheck()
{
	if(!this.asuSearchForm.searchParam.site.checked)
	{
		
		this.asuSearchForm.action="https://sec.was.asu.edu/directory/directorysearch";
		this.asuSearchForm.searchParam.method="post";
		this.asuSearchForm.cn.value=this.asuSearchForm.q.value;
		this.asuSearchForm.submit();
	}
	
	return false;
}

function autoSelectDashboard()
{
	var curURL = window.location+"";
	var urlBreak = curURL.split("\?");
	var dashboard
	if(urlBreak[1]!=null){
		var dashboardSplit = urlBreak[1].split("dashboardname=");
		
		if(dashboardSplit[1]!=null){
			for(i=0; i<document.getElementsByName("DashboardAccessRequest")[0].options.length; i++){
				//alert(document.getElementsByName("DashboardAccessRequest")[0].options[i].value);
				if(dashboardSplit[1]==document.getElementsByName("DashboardAccessRequest")[0].options[i].value) document.getElementsByName("DashboardAccessRequest")[0].options[i].selected=true;
			}
		}
		
	}
}

function addToBookmark(url, title)
{
	url="http://dashboard.asu.edu";
	title="ASU Dashboard Homepage";
	
	if(window.sidebar){
		window.sidebar.addPanel(title, url,"\\");
	}else if(window.external){
		window.external.AddFavorite( url, title);
	}else if(window.opera){
		/*var a=document.createElement("a");
		//a.href=location.href;
		a.href=url;
		a.rel="sidebar";
		a.title=title;
		a.click();*/
	}else if(navigator.platform.substring(0,3) == "Mac"){
		alert("Please press Apple+D to bookmark the dashboard homepage.");
	}else{
		alert("Please press Ctrl+D to bookmark the dashboard homepage.");
	}
}
