function frmAdvancedSearch_Validator(theForm)
{
if (theForm.a.selectedIndex == 0 && theForm.ex.selectedIndex == 0 && theForm.s.selectedIndex == 0 && theForm.c.selectedIndex == 0 && theForm.j.selectedIndex == 0 && theForm.yr.selectedIndex == 0 && theForm.k.value == "") 
{	
alert("Please specify at least one search criterion."); 
return false;
}
	
if (!theForm.p.checked && !theForm.w.checked && !theForm.g.checked && !theForm.u.checked) 
{
alert("Please specify at least one type of research."); 
return false;
}

return true;
}

function frmFacultySearch_Validator(theForm)
{
if (theForm.a.selectedIndex == 0 && theForm.s.selectedIndex == 0 && theForm.c.selectedIndex == 0 && theForm.yr.selectedIndex == 0 && theForm.k.value == "") 
{	
alert("Please specify at least one search criterion."); 
return false;
}
	
return true;
}

function frmSearchResults_Validator(theForm)
{
if (theForm.z.value == "")
{
alert("Please enter a keyword.");
theForm.z.focus();
return false;
}

return true;
}

function frmFacultySubject_Validator(theForm)
{
if (theForm.subjectArea.selectedIndex == 0)
{
alert("Please select a subject area.");
theForm.subjectArea.focus();
return false;
}

return true;
}

function frmFacultyName_Validator(theForm)
{
if (theForm.surname.selectedIndex == 0)
{
alert("Please select a surname.");
theForm.surname.focus();
return false;
}

return true;
}


function openPopup(url,name) {
newWindow = window.open(url, name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,height=325,width=600');
window_open = newWindow.opener;
if (!window_open) {
	newWindow.opener = window;
} 
newWindow.focus();
}


