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 buscarScripts(elemento)
{
	var script = elemento;
	
	// Mientas haya alguna etiqueta <script>
	while (script.indexOf("<script")!=-1)
	{
		restohtml= script.substring(script.indexOf("/script")+7, script.length);
		script= script.substring(script.indexOf("<script")+7, script.indexOf("/script")-1);

		// Si la etiqueta <script> tiene atributo src se lee su valor y se
		// ejecutan los códigos que contiene el archivo
		if (script.indexOf('src="')!=-1 && script.indexOf('src="')<script.indexOf(">"))
		{
			archivo= script.substring(script.indexOf('src="')+5, script.indexOf('">'));
			cargarDatos('get', archivo, '')
		}
		script= script.substring(script.indexOf(">")+1, script.length);

		// Luego se ejecutan los scripts que hay entre las etiquetas
		instalar(script);
		script= restohtml;
	}
}  
					
function instalar(scripts)
{
		scripts = scripts.replace("<!--","");
		scripts = scripts.replace("//-->","");
		if (window.execScript)
			window.execScript(scripts);
		else
			window.setTimeout(scripts, 0);
}
					
