var xmlhttp

function showHint(str)
{
if (str.length==0)
  {
  document.getElementById("txtHint").innerHTML="";
  return;
  }
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }

var url="sim-check-process.php";
var house = document.getElementsByName("house")[0].value;
//var house = "test";
//url=url+"?q="+str+"&house="+house;
url=url+"?q="+str+"&house="+house;

url=url+"&sid="+Math.random();
//alert(url);
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
  {
	var strText=xmlhttp.responseText;	  
	if (strText==1)
	{
		document.getElementById("txtHint").innerHTML="This postcode has requested the maximum number of SIM cards for this promotion.<br/><a href='http://www.lebara-mobile.co.uk/en/' style='color:red; padding-top:5px; font-size:12px; font-family:Verdana, Geneva, sans-serif;' >Back to Home</a>";
 		
		 document.getElementById("btnHide").style.display="none";
	}
	else
	{
		document.getElementById("txtHint").innerHTML="";
		document.getElementById("btnHide").style.display="";
	}
    
  }
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}