// JavaScript Document
function limpiar(idCampo, valor){
	campo=document.getElementById(idCampo);
	if (campo.value==valor) campo.value="";
	}
	
function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function enter(){
	if (event.keyCode==13){
		submitMailing();
		return false;
		}
	return true;
	}
	
function submitMailing(){
	var email=document.getElementById("E-mail").value;
	if (!isValidEmail(email)){
		alert("Sorry, your e-mail is not valid. Please try again.");
		return;
		}
	sendRequest();
	}
	
function submitMailing_es(){
	var email=document.getElementById("E-mail").value;
	if (!isValidEmail(email)){
		alert("Lo sentimos, su email no es válido. Inténtelo de nuevo.");
		return;
		}
	sendRequest();
	}

function saveResult(resultado){
	alert(resultado);
/*var popUpWin=0;
  if(popUpWin) {
	if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
*/
}