function MostrarAcces(){
	document.getElementById('f_ad_email').style.visibility = "visible";
}
function OcultarAcces(){
	document.getElementById('f_ad_email').style.visibility = "hidden";
}
function mail(texto){

    var mailres = true;            
    var cadena = "abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ1234567890@._-";
    
    var arroba = texto.indexOf("@",0);
    if ((texto.lastIndexOf("@")) != arroba) arroba = -1;
    
    var punto = texto.lastIndexOf(".");
                
     for (var contador = 0 ; contador < texto.length ; contador++){
        if (cadena.indexOf(texto.substr(contador, 1),0) == -1){
            mailres = false;
            break;
     }
    }

    <!--if ((arroba > 1) && (arroba + 1 < punto) && (punto + 1 < (texto.length)) && (mailres == true) && (texto.indexOf("..",0) == -1))-->
	if((arroba != -1) && (punto != -1)){
     mailres = true;
	}else{
     mailres = false;
	}
    return mailres;
} 

function Accept(){
	if(document.getElementById('id_email').value == ''){
		alert("The email cannot be empty.");
	}else{
		if(!mail(document.getElementById('id_email').value)){
			alert("Incorrect email.");
		}else{
			document.getElementById('usr_email').method ="post";
			document.getElementById('usr_email').action ="caracteristicas_programa.php?v=1"	
			document.getElementById('usr_email').submit();	
		}
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}
function cerrarPopup(pid){
	
	document.getElementById(pid).style.visibility = 'hidden';      
}
function validar(){
	if(document.forms[0].acceptar.checked){
		document.location.href= '../php/down.php';
	}else{
		window.alert("In order to unload the program it must read the general Conditions and \nmark to the square 'I accept the General Conditions'.");
	}
}