var xmlHttp
var myForm
function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
function call_ajax()
	{ 
	
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
			 {
			 alert ("Browser does not support HTTP Request")
			 return
			 }
		
		var url="actvateAccount.php"
		url=url+"?sid="+Math.random()
		
		xmlHttp.onreadystatechange=stateChanged
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}

function stateChanged()
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	//document.getElementById('hello').innerHTML=xmlHttp.responseText;
  document.getElementById('my_form').submit();
	}
else{
	 
	}
   
}
/* for plates*/
var idds=null;
function call_ajax2(idds1,plateId)
	{ 
		idds=idds1;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
			 {
			 alert ("Browser does not support HTTP Request")
			 return
			 }
		
		var url="actvateNumber.php?plateId="+plateId
		url=url+"&sid="+Math.random()
		
		xmlHttp.onreadystatechange=stateChanged2
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}

function stateChanged2()
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
	
  document.getElementById(idds).submit();
	}
else{
	document.getElementById('hello').innerHTML='processing....';	
	}
   
}
/* for wanted*/

function call_ajaxWanted(idds1,plateId)
	{ 
		idds=idds1;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
			 {
			 alert ("Browser does not support HTTP Request")
			 return
			 }
		
		var url="actvateWanted.php?plateId="+plateId
		url=url+"&sid="+Math.random()
		
		xmlHttp.onreadystatechange=stateChangedWanted
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}

function stateChangedWanted()
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
	
  document.getElementById(idds).submit();
	}
else{
	document.getElementById('hello').innerHTML='processing...';	
	}
   
}

