function validarForm()
  {
	if (document.form1.nombre.value=='') 
 	{
	 alert("Debes Ingresar Nombre.");
	  return false;
	}
	if (document.form1.web.value=='') 
	{
	 alert("Debes Ingresar Web.");
	 return false;
	}
	else
	{
	 var gg=/http:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
	 var h=document.form1.web.value;
	 var w=h.match(gg);
	 if(w==null)
	 {
	   alert("Direcci&oacute;n web no valida.");
	   return false;
	 }
	}
	if (document.form1.email.value=='') 
	{
	 alert("Debes Ingresar E-mail.");
	 return false;
	}
	else
	{
	 var strRegExp=/^[a-z0-9][a-z0-9_.\-]*@([a-z0-9]+\.)*[a-z0-9][a-z0-9\-]+\.([a-z]{2,6})$/;
	 var result=strRegExp.test(document.form1.email.value);
	 if(!result)
	 {
	  alert("El email no es valido");
	  return false;
	 }
	}
	if (document.form1.producto.value=='') 
	{
	 alert("Debes Ingresar producto a publicitar.");
	 return false;
	}
	if (document.form1.presupuesto.value=='') 
	{
	 alert("Debes Ingresar presupuesto.");
	 return false;
	}
	if (document.form1.pais.value=='') 
	{
	 alert("Debes Ingresar Pais(es).");
	 return false;
	}
	//var indice = document.form1.tipo.selectedIndex;
    //var tipo = document.form1.tipo.options[indice].text;
	//var subject="Consulta";
    //var cuerpo="<br><strong>Nombre: </strong>"+document.form1.nombre.value+"<br><strong>Cargo: </strong>"+document.form1.cargo.value+"<br><strong>Tipo de campa&ntilde;a: </strong>"+tipo+"<br><strong>Tel&eacute;fono: </strong>"+document.form1.telefono.value+"<br><strong>Web: </strong>"+document.form1.web.value+"<br><strong>Empresa: </strong>"+document.form1.nomEmpresa.value+"<br><strong>E-mail: </strong>"+document.form1.email.value+"<br><strong> Direcci&oacute;n: </strong>"+document.form1.direccion.value+"<br><strong>Producto: </strong>"+document.form1.producto.value+"<br><strong>Presupuesto: </strong>"+document.form1.presupuesto.value+"<br><strong>Pa&iacute;s: </strong>"+document.form1.pais.value;
	//cuerpo+="<br><strong>Comentarios: </strong>"+document.form1.apartado.value;
	var debug = "?start_debug=1&debug_host=192.168.0.188&debug_port=10000&debug_stop=1";
     var ajax = new Ajax.Updater('principal', 'anuncianteMail.php', {method:'post',parameters:Form.serialize($('form1'))});	
	 var ajax2 = new Ajax.Updater('second', 'confirmacion.html', {method:'get',onComplete: function(req){$('second').innerHTML = req.responseText;}});	
	
  return false;
}
function enviarCV(){
	
	if(document.form1.nombre.value=="")
	{
	 alert("Debe Ingresar Nombre.");
	 return false;		
	}
	if(document.form1.apellido.value=="")
	{alert("Debe Ingresar Apellido");
	return false;
	}
	/*if(document.form1.idioma1.value!="")
	{
	 	var ind=document.form1.lH.selectedIndex;
		document.form1.hiddlH.value=document.form1.lH.options[ind].text;
		ind=document.form1.lE.selectedIndex;
		document.form1.hiddlE.value=document.form1.lE.options[ind].text;
	}
	if(document.form1.idioma2.value!="")
	{
	 	var ind=document.form1.llH.selectedIndex;
		document.form1.hidd2H.value=document.form1.llH.options[ind].text;
		ind=document.form1.llE.selectedIndex;
		document.form1.hidd2E.value=document.form1.llE.options[ind].text;
	}*/
	if(document.form1.cv.value=="")
	{alert("Debe Ingresar su Curriculum");
	  return false;
	}
	 //window.open('enviarCV2.php');
	/*var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=495, height=380, top=85, left=140";
    window.open("enviarCV.php?nombre="+document.form1.nombre.value+"&apellido="+document.form1.apellido.value+"&archivo="+document.form1.cv.value,"",opciones);
 return false;*/
 //var debug = "?start_debug=1&debug_host=192.168.0.188&debug_port=10000&debug_stop=1";
 //var ajax = new Ajax.Updater('principal','enviarCV.php'+debug,{method:'get',parameters:Form.serialize($('form1'))});	
 var ajax2 = new Ajax.Updater('principal','confirmacion.html',{method:'get',onComplete: function(req){$('principal').innerHTML = req.responseText;}});	
 return true;
}
function enviarPublisher()
{
	if(document.form1.contacto.value=="")
	{
		alert("Debe ingresar contacto.");
		return false;
	}
	if (document.form1.telefono.value=='') 
 	{
	 alert("Debes Ingresar tel&eacute;fono.");
	  return false;
	}
	if (document.form1.email.value=='') 
	{
	 alert("Debes Ingresar E-mail.");
	 return false;
	}
	else
	{
	 var strRegExp=/^[a-z0-9][a-z0-9_.\-]*@([a-z0-9]+\.)*[a-z0-9][a-z0-9\-]+\.([a-z]{2,6})$/;
	 var result=strRegExp.test(document.form1.email.value);
	 if(!result)
	 {
	  alert("El email no es valido");
	  return false;
	 }
	}
	if (document.form1.web.value=='') 
	{
	 alert("Debes Ingresar Web.");
	 return false;
	}
	else
	{
	 var gg=/http:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
	 var h=document.form1.web.value;
	 var w=h.match(gg);
	 if(w==null)
	 {
	   alert("Direcci&oacute;n web no valida.");
	   return false;
	 }
	}
	if (document.form1.impresiones.value=='') 
	{
	 alert("Debes Ingresar impresiones.");
	 return false;
	}
	if (document.form1.usuarios.value=='') 
	{
	 alert("Debes Ingresar Numero de usuarios &uacute;nicos al mes.");
	 return false;
	}
	if (document.form1.paises.value=='') 
	{
	 alert("Debe Ingresar Pais(es) en los que opera.");
	 return false;
	}
	if (document.form1.demograficos.value=='') 
	{
	 alert("Debe Ingresar datos demograficos de los usuarios.");
	 return false;
	}
	if (document.form1.contenidos.value=='') 
	{
	 alert("Debe Ingresar politica de contenidos.");
	 return false;
	}
	//var subject="Consulta Publisher";
    //var cuerpo="<br><strong>Contacto: </strong>"+document.form1.contacto.value+"<br><strong>Tel&eacute;fono: </strong>"+document.form1.telefono.value+"<br><strong>E-Mail: </strong>"+document.form1.email.value+"<br><strong>Web: </strong>"+document.form1.web.value+"<br><strong>Impresiones: </strong>"+document.form1.impresiones.value+"<br><strong>N&uacute;mero de usuarios &uacute;nicos al mes: </strong>"+document.form1.usuarios.value+"<br><strong>Pa&iacute;ses en los que opera: </strong>"+document.form1.paises.value+"<br><strong> Datos demogr&aacute;ficos de los usuarios: </strong>"+document.form1.demograficos.value+"<br><strong>Pol&iacute;tica de contenidos: </strong>"+document.form1.contenidos.value+"<br><strong>Comentarios: </strong>"+document.form1.comentarios.value;
    var ajax = new Ajax.Updater('principal', 'sendMail.php', {method:'post',parameters:Form.serialize($('form1'))});	
	var ajax2 = new Ajax.Updater('second', 'confirmacion.html', {method:'get', 
    onComplete: function(req){$('second').innerHTML = req.responseText;}});	
	
	return false;

}