function onSubmit(){
			if (validateForm())
			{
				self.document.ezFind.target = "content";
				self.document.ezFind.action = "ezFind.asp?FindFormType=All";
				self.document.ezFind.submit();
			}
		}
		function Check_NameLength()
		{
		     var nameString;
		 	 nameString=document.ezFind.InName.value;
			 
			 if (nameString.length < 3 )
			 {
			  	alert("Name must be at least 3 characters. Please try again.");
			  	document.ezFind.InName.Focus;
				return false;
			 }
			 return true;
		}
		function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
		 	if (validateForm())
			{
				self.document.ezFind.target = "content";
				self.document.ezFind.action = "ezFind.asp?FindFormType=All";
				self.document.ezFind.submit();
			}
			else
			{
			return false;
			}
	} 
	
		else
		return true;
	}      
		function Check_ZipValidation()
		{
			if ( document.ezFind.InZip.value > '9999' ||  document.ezFind.InZip.value < '00001')
			{
				//alert("Zip code must be 3 to 5 numeric characters between 001 and 99999");
				//return false;
			}
			//if ( document.ezFind.InZip.value < 00001)
			//{
			//	alert("Zipcode is numeric charcter between 00001 to 99999.  Please, try it again");
			//	return false
			//}
			 return true;
		}
		function strtrim() {
                return this.replace(/^\s+/,'').replace(/\s+$/,'');
            }
      
	     String.prototype.trim = strtrim;
 
		function validateForm() {
		
			if (emptyForm())
			{
				return false;
			}
			
			if (!isPosInt(document.ezFind.InZip.value))
			{
				//Below line is commented by kavitha 6/16/11
				//alert("Zip Code must contain numbers only");
				alert("The Zip Code must be a 5 digit number.  Please try again.");
				return false;
			}
			 var nameString;
		 	 nameString=document.ezFind.InName.value;
			 nameString = nameString.trim();
             if (nameString != "")
			 {
			 	if (nameString.length < 3 )
			 	{
			  		alert("Name must be at least 3 characters in length. Please try again.");
			  		document.ezFind.InName.Focus;
					return false;
			 	}
			 }	
			 var ZipString;
			 ZipString=document.ezFind.InZip.value;
			 if (ZipString != "")
			 {
			 	if (ZipString.length!=5 )
			 	{
			 	    alert("The Zip Code must be a 5 digit number.  Please try again.");
			  		document.ezFind.InZip.Focus;
					return false;
			 	}
			}	
			if ( document.ezFind.InZip.value > '9999' ||  document.ezFind.InZip.value < '00001')
			{
				//alert("Zip code must be 3 to 5 numeric characters between 001 and 99999");
				//return false;
			}
		 
			 
			
			 return true;
		}
		function onResetButtonClick()
		{
		 	document.ezFind.InName.value='';
			document.ezFind.InZip.value="";
 		 	document.ezFind.InAddress.value="";
		 	document.ezFind.InCity.value="";
		 	document.ezFind.inStalp.value="Anywhere in U.S.";
			document.ezFind.InName.focus()  
			
		 	
		 //inStalp
		}
		function submitReset() {
			self.document.location.replace ("frm_ezfind.asp?FindFormType=All")
		}
		function emptyForm() {
			if ( self.document.ezFind.inStalp.value == "Anywhere in U.S." && self.document.ezFind.InName.value == '' && self.document.ezFind.InAddress.value == '' && self.document.ezFind.InCity.value == ''&& self.document.ezFind.InZip.value == '')
			{
				alert('Please enter your search criteria.');
				return true;
			}
			return false;
		}
		function RefreshFrmInstPage(FromWhere){
			if (FromWhere != "")
			{
				alert("This page will be refreshed due to a change in the " + FromWhere + "\n\nPlease press the OK button to continue and wait until the page has completey reloaded before entering additional criteria.");
			}
			self.document.ezFind.target = "content";
			self.document.ezFind.action = "ezfind.asp?FindFormType=All";
			self.document.ezFind.submit();
		}
		function ChangeHeader() {
			parent.document.getElementById('myFrameset').setAttribute('rows', '149,*', 0);
			parent.header.document.location.replace("BankFind_Header.asp?ShowLink=No");
			parent.document.title='FDIC: Bank Find';
		}

   function IsNumeric(opt)
   {
		var strString
		var strValidChars = "0123456789.-";
		var strChar;
		var blnResult = true;
		if (opt == 1 )
		{
			strString=self.document.ezFind.inAssetsGreaterThan.value;
		}
		if (opt == 2 )
		{
			strString=self.document.ezFind.inAssetsLessThan.value;
		}
			//  test strString consists of valid characters listed above
			for (i = 0; i < strString.length && blnResult == true; i++)
			   {
			   strChar = strString.charAt(i);
			   if (strValidChars.indexOf(strChar) == -1)
				  {
				  blnResult = false;
				  alert("Please enter numeric value!");
				 }
			   }
			return blnResult;
			}
	function zip_IsNumeric(zipCode)
   {

		var strString
		var strValidChars = "0123456789.-";
		var strChar;
		var blnResult = true;
		  if (zipCode==1)
		  {
			 strString=self.document.ezFind.InZip.value
			 self.document.ezFind.InZip.focus;
		  }
		  else
		  {
			 strString=zipCode;
		  }
		  if (strString.length!=5 )
		  {
		      alert("The Zip Code must be a 5 digit number.  Please try again.");
				return false;
		  }
			//  test strString consists of valid characters listed above
			for (i = 0; i < strString.length && blnResult == true; i++)
			   {
			   strChar = strString.charAt(i);
			   if (strValidChars.indexOf(strChar) == -1)
				  {
				  blnResult = false;
				  alert("The Zip Code must be a 5 digit number.  Please try again.");
				 }
			   }
			return blnResult;
			}
		function isPosInt(input){
		for(var i=0; i<input.length; i++)
		{
			var oneChar = input.charAt(i);
			if(oneChar < "0" || oneChar > "9")
				return false;
		}
		return true;
	}
	
