﻿// If the length of the element's string is 0 then display helper message
function isEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		return true;
	}
	return false;
}

function validStateCheck()
{
	var valid = true;
	
	// validate ddl
	if (document.srchParishState.ddl_pState.selectedIndex == 0)
	{
		alert("Please select a State");
		valid = false;
	}
	return valid;
}

function validArchDioCheck()
{
	var valid = true;
	
	// validate ddl
	if (document.srchParishArchDiocese.ddl_ArchDiocese.selectedIndex == 0)
	{
		alert("Please select an Arch/Dioces");
		valid = false;
	}	
	return valid;
}