var myRequest = null;

function CreateXmlHttpReq2(handler) {
	var xmlhttp = null;
	try {
		xmlhttp = new XMLHttpRequest();
	} catch(e) {
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e) {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
}
  xmlhttp.onreadystatechange = handler;
  return xmlhttp;
}

function myHandler2() {
	if (myRequest.readyState == 4 && myRequest.status == 200) {
		e = document.getElementById("content2");
		e.innerHTML = myRequest.responseText;
	}
}

function view(value) {
	myRequest = CreateXmlHttpReq2(myHandler2);
	myRequest.open("GET","page.php?function=view&value="+value);
	myRequest.send(null);
}

function viewmappa() {
	if (GBrowserIsCompatible()) {// Display the map, with some controls and set the initial location
		var map = new GMap2(document.getElementById("acgmap"));
		map.setCenter(new GLatLng(44.53903940710957, 11.500883102416992), 15);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
	}
	else {// display a warning if the browser was not compatible
		alert("Sorry, the Google Maps API is not compatible with this browser");
	}
}
