function nuevoAjax()
{ 
	/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo */
	var xmlhttp=false; 
	try 
	{ 
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	catch(e)
	{ 
		try
		{ 
			// Creacion del objet AJAX para IE 
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
		} 
		catch(E) { xmlhttp=false; }
	}
	if (!xmlhttp && typeof XMLHttpRequest!="undefined") { xmlhttp=new XMLHttpRequest(); } 

	return xmlhttp; 
}

function mostrarImagenes(){
	
	var ajax=nuevoAjax();
	ajax.open("GET", "galeria/listado_imagenes.php?", false);
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("categoria_imagen=42");
	
	var nombreArchivo = "";

	if (ajax.readyState==4)
	{
		if(ajax.responseText)
		{
			nombreArchivo = ajax.responseText;
			
			MM_preloadImages(nombreArchivo);
			
			imprimirImagen(nombreArchivo, 0);
			
		}else{
			alert("No existen archivos.");
		}
	}	
}

function imprimirImagen(imagenes, posicion){
	
	var listaImagenes = imagenes.split(",");
	var itemLista = posicion;
		
	document.getElementById("asociados").innerHTML="<a href='ver.php?mod=contenido&identificador=7'><img src='"+listaImagenes[itemLista]+"' width='171' height='155' alt='' border='0'/></a>";
	
	itemLista++;
	
	if(itemLista==listaImagenes.length){
		itemLista=0;
	}
	
	setTimeout("imprimirImagen('"+listaImagenes+"', '"+itemLista+"')", 3500);
}