function echeck(str)
{
		var at="@";
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1)
                {
		   alert("Formato incorrecto en e-mail")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Formato incorrecto en e-mail")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Formato incorrecto en e-mail")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Formato incorrecto en e-mail")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Formato incorrecto en e-mail")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Formato incorrecto en e-mail")
		    return false
		 }

		 if (str.indexOf(" ")!=-1){
		    alert("Formato incorrecto en e-mail")
		    return false
		 }
 		 return true
	}

function validaPerfil()
{
	var emailID=document.frmSample.email
        var nombre=document.frmSample.nombre

	if ((emailID.value==null)||(emailID.value==""))
        {
		alert("Debe introducir su dirección de e-mail");
		emailID.focus();
		return false;
	}
	if ((nombre.value==null)||(nombre.value==""))
        {
		alert("Debe introducir su nombre");
		emailID.focus();
		return false;
	}

	if (echeck(emailID.value)==false)
        {
		emailID.value="";
		emailID.focus();
		return false;
	}
	return true;
 }


 function validaRegistro()
{
	var emailID=document.frmSample.email;
        var nombre=document.frmSample.nombre;
        var clave=document.frmSample.clave;
        var clave2=document.frmSample.clave2;
        var nick_poker=document.frmSample.nick_poker;

	if ((emailID.value==null)||(emailID.value==""))
        {
		alert("Debe introducir su dirección de e-mail");
		emailID.focus();
		return false;
	}
        /*
	if ((nombre.value==null)||(nombre.value==""))
        {
		alert("Debe introducir su nombre");
		emailID.focus();
		return false;
	}
        */
	if (echeck(emailID.value)==false)
        {
		emailID.value="";
		emailID.focus();
		return false;
	}
        if (nick_poker.value=="")
        {
            alert("Debe introducir su nick en Paradise Poker");
            nick_poker.focus();
            return false;
        }

        if (clave.value=="")
        {
            alert("Debe introducir la contraseña deseada");
            clave.focus();
            return false;
        }
        if (clave.value!=clave2.value)
        {
            alert("Las contraseñas introducidas no coinciden");
            clave.focus();
            return false;
        }

	return true;
 }

function validaRecordatorio()
{
	var emailID=document.frmSample.email
        var nick_poker=document.frmSample.nick_poker

	if ((emailID.value==null)||(emailID.value==""))
        {
		alert("Debe introducir su dirección de e-mail");
		emailID.focus();
		return false;
	}
        if (nick_poker.value=="")
        {
            alert("Debe introducir su nick en Paradise Poker");
            nick_poker.focus();
            return false;
        }

	if (echeck(emailID.value)==false)
        {
		emailID.value="";
		emailID.focus();
		return false;
	}
	return true;
 }
