var xmlHttp4
var ax = window.screen.availWidth
var xa = window.screen.availHeight - window.screenTop -25
function getVeriSys(str)
{ 
	xmlHttp4=GetXmlHttpObject4();
	if (xmlHttp4==null)
	{
		  alert ("Your browser does not support AJAX!");
		  return;
	} 
	if (str == null || str == ""){
		alert('Please enter the verification code');
	 return false;
	}
	var url="Ajx.asp";
	url=url+"?VeriSys="+str+"&ax="+ax+"&xa="+xa;
	xmlHttp4.onreadystatechange=stateChanged4;
	xmlHttp4.open("GET",url,true);
	xmlHttp4.send(null);
}
function stateChanged4() 
{ 
	if (xmlHttp4.readyState==4)	{ 
		var txt = xmlHttp4.responseText
		if (txt.length > 10){
			document.getElementById('displaybox').style.height = '';
			if(document.getElementById('displaybox').style.display == 'none'){
				document.getElementById('displaybox').style.display = '';
				document.getElementById('displaybox').innerHTML = xmlHttp4.responseText;
				document.getElementById('displaybox').style.height = "100%";
			}
		}
		else {
			alert("Record not found \n\n Please send your certificate details at \n info@nicon.edu.pk \n or call at 0315-8558006 for manual verification of record.");
			return false
		}
	}
}
function GetXmlHttpObject4()
{
	var xmlHttp4=null;
	try
	{
	  // Firefox, Opera 8.0+, Safari
	  xmlHttp4=new XMLHttpRequest();
	}
	catch (e)
	{
	  // Internet Explorer
	try
    {
    	xmlHttp4=new ActiveXObject("Msxml2.XMLHTTP");
    }
	catch (e)
    {
    	xmlHttp4=new ActiveXObject("Microsoft.XMLHTTP");
    }
}
return xmlHttp4;
}

