function postcode_checker(){
	var xmlHttp=GetXmlHttpObject();
	var postcode = document.getElementById("postcode").value;
	var url = "../../../productcart/pc/ajax/postcode/postcode.asp";
	var params = "postcode="+postcode;
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.onreadystatechange = function() {
		if(xmlHttp.readyState == 4 && xmlHttp.status == 200) {
			if(xmlHttp.responseText == 1){
				document.getElementById("postal_status").innerHTML = "<p>Thank you. You have successfully added your post code.</p>";
			} else {
				document.getElementById("postal_status").innerHTML =  xmlHttp.responseText;
			}
		}
	}
	xmlHttp.send(params);
}

function GetXmlHttpObject(){
  var xmlHttp=null;
  try{
  	xmlHttp=new XMLHttpRequest();
  } catch (e){
  try{
  	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e){
  	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
}
return xmlHttp;
}
