var xmlHttp1;


function show(id)
{
	
	
xmlHttp1=createXmlHttpRequestObject3();
xmlHttp1.open("GET", "state.php?id="+id, true);
xmlHttp1.onreadystatechange = handleRequestStateChange3;
xmlHttp1.send(null); 
//document.getElementBy Id("a1").visibility=false;

}
function show1(id)
{
	
	
xmlHttp1=createXmlHttpRequestObject1();
xmlHttp1.open("GET", "state1.php?id="+id, true);
xmlHttp1.onreadystatechange = handleRequestStateChange1;
xmlHttp1.send(null); 
//document.getElementBy Id("a1").visibility=false;

}
function show2(id)
{
	
	
xmlHttp1=createXmlHttpRequestObject1();
xmlHttp1.open("GET", "state2.php?id="+id, true);
xmlHttp1.onreadystatechange = handleRequestStateChange2;
xmlHttp1.send(null); 
//document.getElementBy Id("a1").visibility=false;

}

function createXmlHttpRequestObject3()
{
		try
		{
			// try to create XMLHttpRequest object
			xmlHttp1 = new XMLHttpRequest();
		}
		catch(e)
		{
		 
// assume IE6 or older
var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0",
"MSXML2.XMLHTTP.5.0",
"MSXML2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP");
// try every id until one works
for (var i=0; i<XmlHttpVersions.length && !xmlHttp1; i++)
{
try
{
// try to create XMLHttpRequest object
xmlHttp1 = new ActiveXObject(XmlHttpVersions[i]);
}
catch (e) {} // ignore potential error
}

		}
		// return the created object or display an error message
		return xmlHttp1;
}



function handleRequestStateChange3()
{
// obtain a reference to the <div> element on the page
myDiv = document.getElementById("bb");
// display the status of the request
if (xmlHttp1.readyState == 4)
{
// continue only if HTTP status is "OK"
		if (xmlHttp1.status == 200)
		   {
					try
					{
							// read the message from the server
							response = xmlHttp1.responseText;
							// display the message
							//myDiv.innerHTML += "Request status: 4 (complete). Server said: <br/>";
							myDiv.innerHTML = response;
					}
					catch(e)
					{
						// display error message
						alert("Error reading the response: " + e.toString());
					}
		}

}
}
function createXmlHttpRequestObject1()
{
		try
		{
			// try to create XMLHttpRequest object
			xmlHttp1 = new XMLHttpRequest();
		}
		catch(e)
		{
		 
// assume IE6 or older
var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0",
"MSXML2.XMLHTTP.5.0",
"MSXML2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP");
// try every id until one works
for (var i=0; i<XmlHttpVersions.length && !xmlHttp1; i++)
{
try
{
// try to create XMLHttpRequest object
xmlHttp1 = new ActiveXObject(XmlHttpVersions[i]);
}
catch (e) {} // ignore potential error
}

		}
		// return the created object or display an error message
		return xmlHttp1;
}



function handleRequestStateChange1()
{
// obtain a reference to the <div> element on the page
myDiv = document.getElementById("cc");
// display the status of the request
if (xmlHttp1.readyState == 4)
{
// continue only if HTTP status is "OK"
		if (xmlHttp1.status == 200)
		   {
					try
					{
							// read the message from the server
							response = xmlHttp1.responseText;
							// display the message
							//myDiv.innerHTML += "Request status: 4 (complete). Server said: <br/>";
							myDiv.innerHTML = response;
					}
					catch(e)
					{
						// display error message
						alert("Error reading the response: " + e.toString());
					}
		}

}
}

function createXmlHttpRequestObject2()
{
		try
		{
			// try to create XMLHttpRequest object
			xmlHttp1 = new XMLHttpRequest();
		}
		catch(e)
		{
		 
// assume IE6 or older
var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0",
"MSXML2.XMLHTTP.5.0",
"MSXML2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP");
// try every id until one works
for (var i=0; i<XmlHttpVersions.length && !xmlHttp1; i++)
{
try
{
// try to create XMLHttpRequest object
xmlHttp1 = new ActiveXObject(XmlHttpVersions[i]);
}
catch (e) {} // ignore potential error
}

		}
		// return the created object or display an error message
		return xmlHttp1;
}



function handleRequestStateChange2()
{
// obtain a reference to the <div> element on the page
myDiv = document.getElementById("dd");
// display the status of the request
if (xmlHttp1.readyState == 4)
{
// continue only if HTTP status is "OK"
		if (xmlHttp1.status == 200)
		   {
					try
					{
							// read the message from the server
							response = xmlHttp1.responseText;
							// display the message
							//myDiv.innerHTML += "Request status: 4 (complete). Server said: <br/>";
							myDiv.innerHTML = response;
					}
					catch(e)
					{
						// display error message
						alert("Error reading the response: " + e.toString());
					}
		}

}
}
