	//JS Trim function
	function Ck4Spaces(txt,minlength) {
	    chkKeyword = txt.replace(/\s+$/gi, "");
	    chkKeyword = chkKeyword.replace(/^\s*/gi, "");
		if(chkKeyword.length<minlength){
			return false;		
		}
	}

	//Validate Zip Code
	function zipcheck(){
		var OkToSubmit = "no";
		//var MyVal = document.brokerloc.ZipCode.value;
		if(Ck4Spaces(document.brokerloc.ZipCode.value,3)==false){
				alert('Please enter a zip code \(3 character minimum\).	');
				document.brokerloc.ZipCode.focus();
				document.brokerloc.focus();
				return false;
		}else if (isNaN(document.brokerloc.ZipCode.value)==true){
				alert('Please enter a valid zip code \(3 character minimum\).   ');
				document.brokerloc.ZipCode.focus();
				return false;
		}else{
			OkToSubmit = "yes";
		}




		if (OkToSubmit=="yes"){			
			document.brokerloc.submit();
		}
	}