var xmlHttp

function GetXmlHttpObject() {
	var objXMLHttp=null
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest()
	} else if (window.ActiveXObject) {
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}


 function showCont(murl,tipo, id, idA, foto) {

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)	{
		alert ("Browser does not support HTTP Request")
		return
	}

	document.getElementById('contImmagini').innerHTML="In caricamento..."

	var url=murl+'/include/'+tipo+'.php?id='+id+'&idA='+idA+'&foto='+foto;

	xmlHttp.onreadystatechange=stateChangedCont
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}



function stateChangedCont() {
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		document.getElementById('contImmagini').innerHTML=xmlHttp.responseText
	}
	//if (!document.getElementById('overlay')){
		initLightbox();
	//}
}