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 Foto(foto, idAnim){
	//donde se mostrará los registros
	divContenido = document.getElementById('contenido_ficha_fotos');

	ajax=objetoAjax();
	//uso del medoto GET
	//indicamos el archivo que realizará el proceso de paginar
	//junto con un valor que representa el nro de pagina
	ajax.open("GET", "animals_animal_ficha_fotos.php?foto="+foto+"&idAnim="+idAnim);
	divContenido.innerHTML= '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td height="1" colspan="3"><div class="line_puntos_gor_maron_4x1"><img src="images/general/spacer.gif" width="1" height="1" alt="" /></div></td></tr><tr><td width="1" class="line_puntos_vert_maron_1x4"><div style="width:1px;"><img src="images/general/spacer.gif" width="1" height="1" alt="" /></div></td><td height="351" valign="middle" align="center" bgcolor="#f2eae1"><img src="images/general/loader_anim_2.gif"></td><td width="1" class="line_puntos_vert_maron_1x4"><div style="width:1px;"><img src="images/general/spacer.gif" width="1" height="1" alt="" /></div></td></tr><tr><td height="1" colspan="3"><div class="line_puntos_gor_maron_4x1"><img src="images/general/spacer.gif" width="1" height="1" alt="" /></div></td></tr></table>';
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			//mostrar resultados en esta capa
			divContenido.innerHTML = ajax.responseText
		}
	}
	//como hacemos uso del metodo GET
	//colocamos null ya que enviamos 
	//el valor por la url ?pag=nropagina
	ajax.send(null)
}
