// JavaScript Document
function delFoto(id,idref){
	http.open("GET","apagaFotos.php?id="+id+"&idref="+idref,true);
	http.onreadystatechange = function(){
		if(http.readyState==4){
			document.getElementById('ttfoto').innerHTML=http.responseText;
		}
	}
	http.send(null);
}

function getAjax(){
	ajax = null;
	try{
		ajax = new XMLHttpRequest();
		}catch(e){
			try{
				ajax = new ActiveXObject("Microsoft.XMLHttp");
			}catch(e){
				try{
					ajax = new ActiveXObject("MSXML2.XMLHttp");
				}catch(e){
					alert("Seu navegador não suporta Ajax");
				}
			}
	    }
	return ajax;
}

var http = getAjax();
