//                      #######     #     #          #     #     #     #     #   #  #####     #
//                      #          # #    #         # #    ##   ##    # #    ##  # #         # #
//                      #######   #   #   #        #   #   # # # #   #   #   # # # #        #   #
//                            #  #######  #       #######  #  #  #  #######  #  ## #       #######
//                      ####### #       # ###### #       # #     # #       # #   #  ##### #       #



if (self != top)
top.location = self.location





function verificarfirma(emailStr){


if (document.formadicionarfirma.nombre.value == ""){
alert("Por favor escriba su Nombre");
return false;
}

if (document.formadicionarfirma.apellido.value == ""){
alert("Por favor escriba su Apellido");
return false;
}


/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

alert("Por Favor escriba su Email");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("El Nombre del usuario tiene caracteres incorrectos en el Email.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("El Dominio del Email tiene Caracteres Invalidos.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("El nombre del Usuario del Email parece Incorrecto.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destinacion de dirección IP es invalida!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("El nombre del dominio en Email parece ser no valido.");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("La dirección de Email deberia de terminar en un dominio o \n en la abreviatura de un País");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La dirección de Email no tiene Host!");
return false;
}


if (document.formadicionarfirma.mensaje.value == ""){
alert("Por favor escriba su Mensaje");
return false;
}

// If we've gotten this far, everything's valid!
return true;

}


function postales1() {

serviciorequerido = -1;

for (i=0; i<document.formpostales1.postal.length; i++) {
    if (document.formpostales1.postal[i].checked) {
        serviciorequerido=i;
       
    }
}


if (serviciorequerido == -1) {
alert("Aun no ha seleccionado una Postal \nPor Favor seleccione una antes de Continuar \n\n        GRACIAS !!!!");
return false;
}


// If we've gotten this far, everything's valid!
return true;
}




function postales2() {

if (document.formpostales2.destinatario.value == ""){
alert("Por favor escriba el Nombre de la Persona \na quien le desea enviar la Postal \n\n      GRACIAS !!!");
return false;
}

if (document.formpostales2.emaildedestinatario.value == ""){
alert("Por favor escriba el Email de la Persona \na quien le desea enviar la Postal \n\n      GRACIAS !!!");
return false;
}

if (document.formpostales2.remitente.value == ""){
alert("Por favor escriba Su Nombre \n\n      GRACIAS !!!");
return false;
}


if (document.formpostales2.emailderemitente.value == ""){
alert("Por favor escriba Su Email \n\n      GRACIAS !!!");
return false;
}


if (document.formpostales2.mensajedepostal.value == ""){
alert("Por favor escriba Su Mensaje \n\n      GRACIAS !!!");
return false;
}

// If we've gotten this far, everything's valid!
return true;
}




function accesandoasucuenta() {

if (document.formaccesoacuenta.usuario.value == ""){
alert("Por favor escriba Su Usuario antes de continuar \n\n      GRACIAS !!!");
return false;
}


if (document.formaccesoacuenta.password.value == ""){
alert("Por favor escriba Su Password antes de continuar \n\n      GRACIAS !!!");
return false;
}


// If we've gotten this far, everything's valid!
return true;

}



function recuperaciondepassword() {

if (document.formrecuperarpassword.usuario.value == ""){
alert("Por favor escriba Su Usuario antes de continuar \n\n      GRACIAS !!!");
return false;
}

// If we've gotten this far, everything's valid!
return true;

}

function editardatos(emailStr) {


if (document.formeditardatos.nombre.value == ""){
alert("Por favor escriba Su Nombre \n\n      GRACIAS !!!");
return false;
}


if (document.formeditardatos.apellido.value == ""){
alert("Por favor escriba Su Apellido \n\n      GRACIAS !!!");
return false;
}




/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

alert("Por Favor escriba su Email Correctamente");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("El Nombre del usuario tiene caracteres incorrectos en el Email.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("El Dominio del Email tiene Caracteres Invalidos.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("El nombre del Usuario del Email parece Incorrecto.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destinacion de dirección IP es invalida!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("El nombre del dominio en Email parece ser no valido.");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("La dirección de Email deberia de terminar en un dominio o \n en la abreviatura de un País");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La dirección de Email no tiene Host!");
return false;
}


if (document.formeditardatos.mesdenacimiento.value == ""){
alert("Por favor seleccione Su Mes de Nacimiento \n\n      GRACIAS !!!");
return false;
}


if (document.formeditardatos.diadenacimiento.value == ""){
alert("Por favor seleccione Su Día de Nacimiento \n\n      GRACIAS !!!");
return false;
}


if (document.formeditardatos.deporte.value == ""){
alert("Por favor escriba Su Deporte Favorito \n\n      GRACIAS !!!");
return false;
}

if (document.formeditardatos.formadeser.value == ""){
alert("Por favor Describa SuForma de Ser \nPara que los demás usuarios lo puedan conocer \n\n      GRACIAS !!!");
return false;
}


if (document.formeditardatos.password.value == ""){
alert("Por favor escriba Su Password \nPara darle validez a los cambios \n\n      GRACIAS !!!");
return false;
}

// If we've gotten this far, everything's valid!
return true;

} 



function verificarnuevacuenta(emailStr) {

if (document.formnuevacuenta.nombre.value == ""){
alert("Por favor escriba Su Nombre \n\n      GRACIAS !!!");
return false;
}

if (document.formnuevacuenta.apellido.value == ""){
alert("Por favor escriba Su Apellido \n\n      GRACIAS !!!");
return false;
}


/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

alert("Por Favor escriba su Email Correctamente");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("El Nombre del usuario tiene caracteres incorrectos en el Email.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("El Dominio del Email tiene Caracteres Invalidos.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("El nombre del Usuario del Email parece Incorrecto.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destinacion de dirección IP es invalida!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("El nombre del dominio en Email parece ser no valido.");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("La dirección de Email deberia de terminar en un dominio o \n en la abreviatura de un País");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La dirección de Email no tiene Host!");
return false;
}


if (document.formnuevacuenta.mesdenacimiento.value == ""){
alert("Por favor seleccione Su Mes de Nacimiento \n\n      GRACIAS !!!");
return false;
}

if (document.formnuevacuenta.diadenacimiento.value == ""){
alert("Por favor seleccione Su Día de Nacimiento \n\n      GRACIAS !!!");
return false;
}


if (document.formnuevacuenta.password.value == ""){
alert("Por favor escriba Su Password \n\n      GRACIAS !!!");
return false;
}


if (document.formnuevacuenta.password.value.length < 6) {
alert("El Password debe tener por lo menos 6 caracteres");
return false;
}


for (var z=0; z < document.formnuevacuenta.password.value.length; z++){
 
if (((document.formnuevacuenta.password.value.charCodeAt(z)>1) && (document.formnuevacuenta.password.value.charCodeAt(z)<48)) || ((document.formnuevacuenta.password.value.charCodeAt(z)>57) && (document.formnuevacuenta.password.value.charCodeAt(z)<65)) || ((document.formnuevacuenta.password.value.charCodeAt(z)>90) && (document.formnuevacuenta.password.value.charCodeAt(z)<97)) || ((document.formnuevacuenta.password.value.charCodeAt(z)>122) && (document.formnuevacuenta.password.value.charCodeAt(z)<255))) {
alert("El Password tiene caracteres invalidos");
return false;

  }
}


if (document.formnuevacuenta.password.value != document.formnuevacuenta.password2.value) {
alert("El Password y la Repetición de Password son diferentes \npor favor corrija la escritura");
return false;
}


// If we've gotten this far, everything's valid!
return true;

}







function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}




//document.write('<script language="JavaScript" src="desvanecer.js"></script>');
//document.write('<script language="JavaScript" src="desvanecerimagen.js"></script>');
document.write('<script language="JavaScript1.3" type="text/javascript" src="chatdelaradio.js"></script>');
document.write('<script language="JavaScript" src="style.js"></script>');
document.write('<script language="JavaScript" src="enunciadodemenu.js"></script>');




/////////////////////////////////////////////////////////////////////////////////














