var gpxhr = null;

function processGPReqChange()
{
	var Vpv = document.getElementById("pv")
//	alert("GP problem: " + gpxhr.readyState + ", " + gpxhr.statusText + ", " + gpxhr.status + ", " + gpxhr.responseText);

	if (gpxhr.readyState == 4)	{
	// 4 = "loaded"
	  if (gpxhr.status == 200)	{
		// 200 = "OK"
		Vpv.innerHTML = gpxhr.responseText;
		}
	  else
		{
		alert("GP problem: " + gpxhr.readyState + gpxhr.statusText + gpxhr.status);
		}
	  }
}

function getPageviews(reis)
{

	if (window.XMLHttpRequest) {
	  gpxhr = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
	  gpxhr = new ActiveXObject("Msxml2.XMLHTTP");
	}
	
	if (gpxhr!=null) {
		gpxhr.onreadystatechange = function () {
								processGPReqChange();
								};
		gpxhr.open('get','/asp/travels_pageviews.asp?reis='+reis);
		gpxhr.send(null);

	}
	else {
		alert("Your browser does not support XMLHTTP.");
	}
}


