function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function runAjax(datos){
	
	ajax=objetoAjax();
	ajax.open("GET", datos);
	ajax.onreadystatechange=function() {

		if (ajax.readyState==4) {
			   
			var fotos = ajax.responseText.split(",");
			for(f=0;f<(fotos.length-1);f++){
				var foto="foto[" + f + "]";
				document.getElementById(foto).src=fotos[f];
				document.getElementById(foto).style.width=180;
				document.getElementById(foto).style.height=145;
			}
			
		}
	
	}
	ajax.send(null);

}


