function popUpLink(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=700');");
}
function popWin(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=700');");
}
function dosearch()
        {
        form = document.searchform;
        
        var option = "";

        for (i = 0; i < form.srchopt.length; i++) 
                {
                if (form.srchopt[i].checked) 
                        {
                        option = form.srchopt[i].value;
                        }

                }

        //alert ("Option is: " + option);

        if (option == "wp")
                {
                form.action = "http://whitepages.tufts.edu/searchresults.cgi";
                form.search.value = form.q.value;
                }
	else if (option =="here")
		{
		form.proxystylesheet.value = "musicctr_template";
		form.action = "http://googlesearch.tufts.edu/search";
		}
	else
		{
		// default is to search tufts
		form.action = "http://googlesearch.tufts.edu/search";
		form.proxystylesheet.value = "tufts_staging";
		form.as_sitesearch.value = "";		
		}

        form.submit();

        }

		
function checkGoScriptForm(form)
        {
        emptyCount=0;
        for (i=0; i<form.elements.length; i++)
                {
                if (form.elements[i].value=="")
                        {
                        emptyCount++;
                        }
                } 
        if (emptyCount>0)
                {
                alert("Please fill in ALL fields.");
                return false;
                }
        else
                {
                return true;
                }
        }	
