var latlng;
function ajaxInfoWindow(p_action, p_postData, p_latlng)
{
	latlng = p_latlng;
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return false;
	}
	
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("POST",p_action,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", p_postData.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(p_postData);
	return false;
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		map.openInfoWindow(latlng, xmlHttp.responseText);
		return false;
	}
}

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;
}