function checkGeoIp(){
 
    var url;
    var pageRequest = false;
    var variables = '';

    url = 'http://' + document.location.host + '/includes/tools/CheckGeoIPValid.asp';  
    
    if (window.XMLHttpRequest) {
        pageRequest = new XMLHttpRequest();
    }
    else if (window.ActiveXObject){
        pageRequest = new ActiveXObject('Msxml2.XMLHTTP');
        if (pageRequest==null)
	        pageRequest = new ActiveXObject("Microsoft.XMLHTTP"); 
    }
    else return false;
    pageRequest.onreadystatechange = function() {
        checkGeoIp_callback(pageRequest);
    }

    pageRequest.open('POST',url,true);

    pageRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
                   
    pageRequest.send('data'); 

}

function checkGeoIp_callback(pageRequest){


     if (pageRequest.readyState == 4)  {
        
        if (pageRequest.status==200) {

            if(!(pageRequest.responseText=="True")){
                postAuditEntry(1,-1,'Refused signup due to IP restriction',9003);
                document.getElementById('signupButton').style.display = 'none'; 
                document.getElementById('errorMsg').innerHTML = 'Sorry, due to the nature of the service this is only available to users based in the UK<br />If you have been shown this message in error please call the number below.';
                document.getElementById('signupError').style.display = 'block';    
            }
            else{
                
            }
          
        }
       
    }    

}