function chkNumeric(strString)
   //  check for valid numeric strings	
 {
var strValidChars = "0123456789";
var strChar;
var blnResult = true;

   if (strString.length == 0) 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;
        }
      }
   return blnResult;
   }


function validate(installersearch){

	if (document.installersearch.installer_suburb.value=="") {
	 alert ("Please enter [Suburb]");
	     
	    return  false;
       } 

	if (document.installersearch.installer_state.value=="") {
	 alert ("Please select [State]");
	     
	    return  false;
       } 
	if (document.installersearch.installer_postcode.value=="") {
		
          
	}
	else
	{
		
		if (chkNumeric(document.installersearch.installer_postcode.value) == false) {

			alert ("[Postcode] must be numeric")
	     		return  false
    		}
		
	}

	installersearch.submit();	

}

