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 = "enews_template";
		form.action = "http://googlesearch.tufts.edu/search";
    //    form.proxystylesheet.value = "enews";
    //    form.action = "http://googlesearch.tufts.edu/search";
    //    form.action = "/search/";
	//	form.proxystylesheet.disabled=true;		
    } else {
        // default is to search tufts
        form.proxystylesheet.value = "tufts_staging";
		form.action = "http://googlesearch.tufts.edu/search";
        //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;
                }
        }	

		
function ContactFormValidator(form)
{

  if (form.Submitter_Name.value == "")
  {
    alert("Please enter your name");
    form.Submitter_Name.focus();
    return (false);
  }  


  if (form.Message.value == "")
  {
    alert("Please enter your message.");
    form.Message.focus();
    return (false);
  }
   
  
  return (true);
  }
  
  
function FeedbackFormValidator(form)
{

  if (form.Submitter_Name.value == "")
  {
    alert("Please enter your name");
    form.Submitter_Name.focus();
    return (false);
  }  

  if (form.Message.value == "")
  {
    alert("Please enter your message.");
    form.Message.focus();
    return (false);
  }
   
  
  return (true);
  }  
