function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
		//alert("Firefox or Opera");
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			//alert("IE");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}
function checkVerify(val)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 

  var xmlHttp;
  xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
        	document.getElementById('verify').innerHTML=xmlHttp.responseText;
			
			if(xmlHttp.responseText!="<font color='#ff0000;'>Verification success.</font>")
			{
				document.getElementById('verify_img').innerHTML="<img src='Cap_Img.php'>";
				document.f1.number.focus();
			}
        }
      }	  	  
	  url="checkVerify.php?code="+val;
	 //alert(url);
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);  
}
function imageValue(val)
{
	//alert(document.getElementById('').innerHTML);
	document.f1.number.value=val;
}
