function nuevoAjax()
{ 	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 bloque(pag,block,proyecto)
{	
	var div=document.getElementById("ajax-bloque");
	var ajax=nuevoAjax();
	ajax.open("POST", "http://www.empchile.cl/eseo/ajax/bloque.php", true);
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("pag="+pag+"&proyecto="+proyecto);
		ajax.onreadystatechange=function()
		{
			if (ajax.readyState==4)
			{
				div.innerHTML=ajax.responseText;
			}
		}
}
function bloque_form(idioma)
{	
	var div=document.getElementById("ajax-bloque_form");
	var nombres=document.getElementById("nombres").value;
	var apellidos=document.getElementById("apellidos").value;
	var umail=document.getElementById("umail").value;
	var fono=document.getElementById("fono").value;
	var replicar=document.getElementById("replicar").value;
	var contacto=document.getElementById("contacto").value;
	var tiempo=document.getElementById("tiempo").value;
	var economico=document.getElementById("economico").value;
	var posibilidades=document.getElementById("posibilidades").value;
	var otras=document.getElementById("otras").value;
	var ajax=nuevoAjax();
	ajax.open("POST", "http://www.empchile.cl/eseo/ajax/bloque_forms.php", true);
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("nombres="+nombres+"&apellidos="+apellidos+"&umail="+umail+"&fono="+fono+"&idioma="+idioma+"&replicar="+replicar+"&contacto="+contacto+"&tiempo="+tiempo+"&economico="+economico+"&posibilidades="+posibilidades+"&otras="+otras);
		ajax.onreadystatechange=function()
		{
			if (ajax.readyState==4)
			{
				div.innerHTML=ajax.responseText;
			}
		}
}
function comentarios_form(idioma,proyecto)
{	
	var div=document.getElementById("bbcomentarios");
	var nombres=document.getElementById("comment_nombres").value;
	var umail=document.getElementById("comment_umail").value;
	var titulo=document.getElementById("comment_titulo").value;
	var comentario=document.getElementById("comment_comentario").value;
	var ajax=nuevoAjax();
	ajax.open("POST", "http://www.eseo.cl/ajax/bloque_comentarios.php", true);
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	//alert("nombres="+nombres+"&umail="+umail+"&titulo="+titulo+"&comentario="+comentario+"&idioma="+idioma+"&proyecto="+proyecto);
	ajax.send("comment_nombres="+nombres+"&comment_umail="+umail+"&comment_titulo="+titulo+"&comment_comentario="+comentario+"&idioma="+idioma+"&proyecto="+proyecto);
		ajax.onreadystatechange=function()
		{
			if (ajax.readyState==4)
			{
				div.innerHTML=ajax.responseText;
			}
		}
}