
 function checkEmail (correo)
    {
	    var filter  = /^([a-zA-Z0-9_\.\-%%])+\@(([a-zA-Z0-9\-%%])+\.)+([a-zA-Z0-9]{2,4})+$/;
	    if (filter.test(correo))
	    {
		    return true;
		}
	    else 
	    {
		    return false;
		}
    }

 function SuscribeNews()
 {
	o_TxtMail = document.getElementById("txtCajaEmailNews");
	strAlerta="";
	if (o_TxtMail.value=="")
	{
		strAlerta = "El e-mail es obligatorio \n";
	}
	else
	{
		if (!checkEmail(o_TxtMail.value))
			strAlerta = strAlerta + "El e-mail tiene un formato incorrecto \n";
	}
	if (strAlerta!="")
		alert(strAlerta);
	else
	{
		document.location="/newsletter.asp?e="+o_TxtMail.value;
	}

 }
 
 function CargaNuevoVideo (idvideo) 
 {
	 var objIframe = document.getElementById("frmComentVideos"); 
	 objIframe.src="comentariosvideos.asp?idv=" + idvideo;
 }
 
 function VisibilidadLogin (estado)
 {
	 var capaLogin = document.getElementById("login"); 
	 var capaBloggers = document.getElementById("accesoBloggers"); 
	 
	 if (estado=="visible")
	 {
		 capaLogin.style.display="block";
		 capaBloggers.style.display="none";
	 }
	 else
	 {
		 capaLogin.style.display="none";
		 capaBloggers.style.display="block";
	 }
 }
 
 function PedirPassword()
{
	var o_CapaRecuperaPss=document.getElementById("RecuperaPss");
	var o_CapaLogin=document.getElementById("login")
	
	o_CapaLogin.style.display="none";
	o_CapaRecuperaPss.style.display="block";
}

	function setTildes(TextoOrig)
	{
		Texto=TextoOrig;
		Texto=Texto.replace("á","&aacute;");
		Texto=Texto.replace("Á","&Aacute;");
		Texto=Texto.replace("é","&eacute;");
		Texto=Texto.replace("É","&Eacute;");
		Texto=Texto.replace("í","&iacute;");
		Texto=Texto.replace("Í","&Iacute;");
		Texto=Texto.replace("ó","&oacute;");
		Texto=Texto.replace("Ó","&Oacute;");
		Texto=Texto.replace("ú","&uacute;");
		Texto=Texto.replace("Ú","&Uacute;");
		Texto=Texto.replace("ü","&uuml;");
		Texto=Texto.replace("Ü","&Uuml;");
		Texto=Texto.replace("Ç","&Ccedil;");
		Texto=Texto.replace("ç","&ccedil;");
		Texto=Texto.replace("ñ","&ntilde;");
		Texto=Texto.replace("Ñ","&Ntilde;");
		Texto=Texto.replace("¿","&iquest;"),
		Texto=Texto.replace("€","&euro;");
		Texto=Texto.replace("´","&acute;");
		Texto=Texto.replace("¡","&iexcl;");
		return(Texto)
	}

 function SimularEnterForm(miCampo)
 {
	if (window.event && window.event.keyCode == 13)
	{
		if (ValidaLogin())
		{
			miCampo.form.submit();
			return false;
		}
		else
			return true;
	}
	else
		return true;
 } 

function OcultaCapaPrincipal ()
{
	var o_CapaPrius=document.getElementById("promoPrius");
	o_CapaPrius.style.display="none";

}

