function strTrim(tmpStr)
{
	var i;
	for (i=0; i < tmpStr.length; ++i)
		if (tmpStr.charAt(i) != " ") break;
	tmpStr = tmpStr.substring(i);
	for (i=tmpStr.length - 1; i >= 0; --i)
		if (tmpStr.charAt(i) != " ") break;
	tmpStr = tmpStr.substring(0, i + 1);
	return tmpStr;
}
//-----------------------------------------------------------
function Search()
{
	if(strTrim(obj.Keywords.value) == "")
	{
		alert("Please enter Keyword(s) to search for.");
		obj.Keywords.focus();
		return;
	}
	if(obj.OrgCategory.options[obj.OrgCategory.selectedIndex].value == "OrgType")
	{
		typeName = obj.OrgCategory.options[obj.OrgCategory.selectedIndex].text
		typeName = typeName.substring(3, typeName.length-3);
		alert("Please select a Category under "+typeName+".");
		obj.OrgCategory.focus();
		return;
	}
	obj.action = 'search_org.php';
	obj.submit();
}

