//var xmlHttp = new XMLHttpRequest();

function changestat(x)
{

try{ xmlHttp = new XMLHttpRequest();
		}catch(error){
		try{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(error){ xmlHttp = null; return false;
			}

		}
var y=1;		
if(x==0)
{
x="";
y=x;
}

xmlHttp.open('get',x+'test.php?id='+ document.statform.D1.value+'&type='+y); 
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1"); 
xmlHttp.onreadystatechange = handleInfo;
xmlHttp.send(null);
}

function handleInfo()
{
if(xmlHttp.readyState == 1)
{
document.getElementById('drawnstat').innerHTML = '... ... ...';
}

else if(xmlHttp.readyState == 4)
{
var response = xmlHttp.responseText; 
document.getElementById('drawnstat').innerHTML = response; 
}
}
