

function go(thisform) 
{
	if (thisform.options[thisform.selectedIndex].value == "select")
	{
		alert("Choose an option from the list below");
	}
	else if (thisform.options[thisform.selectedIndex].value != "")
	{
		
		top.location.href = thisform.options[thisform.selectedIndex].value
   }
}

function checkquick(thisform)
{
	if (thisform.query.value == null || thisform.query.value == "")
	{
		alert ("Please enter a search term");
		return false;
	}
	
	else if (thisform.type.value == "COURSE")
	{
		val = thisform.query.value;
		if (val.substring(4, 5) != " ")
		{
			thisform.query.value = val.substring(0, 4) + " " + val.substring(4, 99)
		}
		top.location.href = "http://ipac.canterbury.ac.nz/ipac20/ipac.jsp?profile=a&npp=30&ipp=20&spp=20&index=COURSE&term=" + thisform.query.value;
		return false;
	}
	
	else 
	{
		top.location.href = "http://ipac.canterbury.ac.nz/ipac20/ipac.jsp?profile=a&npp=30&ipp=20&spp=20&index=" + thisform.type.value + "&term=" + thisform.query.value;
		return false;
	}
	return true;
}


