<!--
	function emptyTextBox(id)
	{
		var id = id
		if (id == 1 && document.storeSearch.zipCode.value == "Please enter a post code" )
		{
			document.storeSearch.zipCode.value = "";
		}
		if (id == 2 && document.storeSearch.email.value == "Enter Email Address")
		{
			document.storeSearch.email.value = "";
		}
		if (id == 3 && document.storeSearch.city.value == "enter a suburb")
		{
			document.storeSearch.city.value = "";
		}
	}
	function Trim(TRIM_VALUE)
	{
		if(TRIM_VALUE.length < 1)
		{
			return"";
		}
		TRIM_VALUE = RTrim(TRIM_VALUE);
		TRIM_VALUE = LTrim(TRIM_VALUE);
		if(TRIM_VALUE=="")
		{
			return "";
		}
		else
		{
			return TRIM_VALUE;
		}
	} 

	function RTrim(VALUE)
	{
		var w_space = String.fromCharCode(32);
		var v_length = VALUE.length;
		var strTemp = "";
		if(v_length < 0)
		{
			return"";
		}
		var iTemp = v_length -1;

		while(iTemp > -1)
		{
			if(VALUE.charAt(iTemp) == w_space)
			{
			}
			else
			{
				strTemp = VALUE.substring(0,iTemp +1);
				break;
			}
			iTemp = iTemp-1;

		} 
		return strTemp;

	} 

	function LTrim(VALUE)
	{
		var w_space = String.fromCharCode(32);
		if(v_length < 1)
		{
			return"";
		}
		var v_length = VALUE.length;
		var strTemp = "";
		var iTemp = 0;

		while(iTemp < v_length)
		{
			if(VALUE.charAt(iTemp) == w_space){
		}
		else
		{
			strTemp = VALUE.substring(iTemp,v_length);
			break;
		}
		iTemp = iTemp + 1;
		} 
		return strTemp;
	} 

	
	
	function checkValues()
	{
		document.storeSearch.zipCode.value = Trim(document.storeSearch.zipCode.value)
		document.storeSearch.city.value = Trim(document.storeSearch.city.value)
		if(document.storeSearch.zipCode.value == "Please enter a post code" && (document.storeSearch.city.value == "enter a suburb" || document.storeSearch.city.value == "") && document.storeSearch.state.options[document.storeSearch.state.selectedIndex].value == -1) 
                {
                           alert("Please enter a postal code, city, or state to search. 1");
                           return false; 
                }
                if(document.storeSearch.zipCode.value == "Please enter a post code" || document.storeSearch.zipCode.value == "")
                {
                   if((document.storeSearch.city.value == "" || document.storeSearch.city.value == "enter a suburb") && document.storeSearch.state.options[document.storeSearch.state.selectedIndex].value == -1)
                   {
                       alert("Please enter a postal code, city, or state to search. 2");
                       return false; 
                   }
                }
		
		/*if (document.storeSearch.zipCode.value != "Enter A Postal Code" && document.storeSearch.city.value == "" || document.storeSearch.city.value == "Enter A City" && )
		{
			
			document.storeSearch.zipCode.value = Trim(document.storeSearch.zipCode.value);
			if(document.storeSearch.zipCode.value == "")
			{
			   alert('Please enter a postal code')
			   return false;
			}
			else
			{
			  var len = document.storeSearch.zipCode.value.length
                          var valid = "0123456789";
                          if(len > 4 || len < 3)
                          {
                            alert("Please enter a proper Postal Code");
                            return false;
                          }
                          var count = 0
                          for(count; count < len; count++)
                          {
                           temp = "" + document.storeSearch.zipCode.value.substring(count, count+1);
                           if (valid.indexOf(temp) == "-1")
                           {
                              alert("Invalid characters in your postal code.  Please try again.");
                              return false;
                           }
                          }
                        }
                     }*/
                     
                        return true;
			
		}
			   
	//}
	//-->
