function clearSearch(){
	document.frmSearch.orgName.value='';
	document.frmSearch.orgType.selectedIndex=0;
	document.frmSearch.orgCategory.selectedIndex=0;
	document.frmSearch.region.selectedIndex=0;
	document.frmSearch.action='Directory1.php';
	document.frmSearch.submit();
}
function doSearch(){
	var r=true;
	if(trim(document.frmSearch.orgName.value)=='' && document.frmSearch.orgType.selectedIndex==0 && document.frmSearch.orgCategory.selectedIndex==0 && document.frmSearch.region.selectedIndex==0){
		alert('Make a search selection');
		document.frmSearch.orgName.focus();
		r=false;
	}
	return(r);
}
function doLogin(){
	if(trim(document.frmLogin.login_user.value)==''){
		alert('Enter your user name');
		document.frmLogin.login_user.focus();
		return(false);
	}
	else if(trim(document.frmLogin.login_password.value)==''){
		alert('Enter your password');
		document.frmLogin.login_password.focus();
		return(false);
	}
	return(true);
}
function trim(str){
	return(str.replace(/\A\s*(.*\S)\s*\z/g, "\1"));
}