var xmlHttp

function ShowImage(str,idx,cnt)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="getimage.asp"
	url=url+"?file="+str
	url=url+"&idx="+idx
	url=url+"&cnt="+cnt

	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

//Note that if you want to POST data, you have to change the MIME type of the request using the following line:
//xmlHTTp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//Otherwise, the server will discard the POSTed data.

}

function stateChanged() 
{ 
//	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	if ((xmlHttp.readyState==4 || xmlHttp.readyState=="complete") && (xmlHttp.status == 200))
	{ 
		document.getElementById("divImage").innerHTML=xmlHttp.responseText 
	} 
} 

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}