function ajaxFunction()
{
	var xmlhttp;
	if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
  }
		else if (window.ActiveXObject)
  {
  // code for IE6, IE5
	 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	else
  {
	// The browser doesn't support Ajax, so die silently
  }


	if (google.loader.ClientLocation &&
		google.loader.ClientLocation.address.region) {

		var region = google.loader.ClientLocation.address.region.toUpperCase();

	}


	var ref = encodeURIComponent(document.referrer);
	var my_page = encodeURIComponent(window.location.href);
	var region = encodeURIComponent(region);

	if(ref) {
		var queryString = "?ref=" + ref + "&my_page=" + my_page + "&region=" + region;
		xmlhttp.open("GET","/rank_extractor_ajax.php" + queryString,true);
		xmlhttp.send(null);
	}
}
window.onload=function() {
	ajaxFunction();
}
