function nuevoAjax()
{ /* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
	lo que se puede copiar tal como esta aqui */
	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 mostrarCeres(valor)
{

		ajax=nuevoAjax();
		var pregunta = document.getElementById('tip_inst');
		//ajax.open('GET','ceres_ies.php', true);
		if (valor  == "CERES")  {
			ajax.open('GET','ceres_ies.php?cod=1', true);
			pregunta.innerHTML = "3. Seleccione un tipo de Instituci&oacute;n: Ceres";	
		}
		else  {
			ajax.open('GET','ceres_ies.php?cod=2.php', true);
			pregunta.innerHTML = "3. Seleccione un tipo de Instituci&oacute;n: IES de T&amp;T";	
		}
		ajax.onreadystatechange=function() 
		{ 
			if (ajax.readyState==1)
			{
				document.getElementById("ceres").innerHTML="Cargando diapositiva";
			}
			if (ajax.readyState==4)
			{ 
				document.getElementById("ceres").innerHTML=ajax.responseText;
			} 
		}
		ajax.send(null);
}


