function checkStockist(){
	var ocountry = document.getElementById("country");
	if(ocountry.selectedIndex == 0){
		alert("Please select a stockist country");
		return false;
	}
	return true;
}

function ajaxcountry(val){
	if(val != ""){
		if($("region")){
			  $('#region >option').remove();
			  $('#region').append(
					$('<option></option').val("").html("Select a state/region")
			  );
			  $('#suburb >option').remove();
			  $('#suburb').append(
					$('<option></option').val("").html("Select a suburb/city")
			  );
			  $.ajax({
				  type: "GET",
				  url: "ajax.asp",
				  data: "ct=" + val,
				  dataType: "text",
				  success: function(msg){
					$('#region').append(msg);

				  }
				}); 
		}
	}
}

function ajaxstate(val){
	var country = document.getElementById("country");
	if(val != ""){
		if($("suburb")){
			  $('#suburb >option').remove();
			  $('#suburb').append(
					$('<option></option').val("").html("Select a suburb/city")
			  );
			  $.ajax({
				  type: "GET",
				  url: "ajax.asp",
				  data: "st=" + val + "&ctr=" + country.value,
				  dataType: "text",
				  success: function(msg){
					$('#suburb').append(msg);
				  }
				}); 
		}
	}
}


