//                      #######     #     #          #     #     #     #     #   #  #####     #
//                      #          # #    #         # #    ##   ##    # #    ##  # #         # #
//                      #######   #   #   #        #   #   # # # #   #   #   # # # #        #   #
//                            #  #######  #       #######  #  #  #  #######  #  ## #       #######
//                      ####### #       # ###### #       # #     # #       # #   #  ##### #       #



if (self != top)
top.location = self.location

function servicios (emailStr) {

/* 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("Email address seems incorrect (check @ and .'s)");
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("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("The username doesn't seem to be valid.");
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("Destination IP address is invalid!");
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("The domain name does not seem to be valid.");
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("The address must end in a well-known domain or two letter " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This address is missing a hostname!");
return false;
}


if (document.formservicios.nombre.value == "") {
alert("Please Write Your First Name");
return false;
}


if (document.formservicios.apellido.value == "") {
alert("Please Write Your Last Name");
return false;
}

if (document.formservicios.telefono.value == "") {
alert("Please Write Your Phone Number");
return false;
}


 for (var z=0; z < document.formservicios.telefono.value.length; z++){
 
if ((document.formservicios.telefono.value.charCodeAt(z)<48) || (document.formservicios.telefono.value.charCodeAt(z)>57)) {
alert("This Phone Number contains invalid characters\n Please Write Only Numbers 0-9");
return false;

  }
         
}



if (document.formservicios.telefono.value.length == 10) {
numerodetelefono = document.formservicios.telefono.value;
if (numerodetelefono != ""){
     for (var z=0; z < document.formservicios.telefono.value.length; z++){
 
if ((document.formservicios.telefono.value.charCodeAt(z)<48) || (document.formservicios.telefono.value.charCodeAt(z)>57)) {
alert("This Phone Number contains invalid characters\n Please Write Only Numbers 0-9");
return false;

  }
         
}
}
}
else {
         var faltan = 10 - document.formservicios.telefono.value.length;
         var mireelnumero = document.formservicios.telefono.value;
         for (a=0; a<faltan; a++) {
         mireelnumero = mireelnumero+"x";
         }
         alert("The Phone number must contain 10 digits\n Write the "+faltan +" remaining numbers please\n                  " + mireelnumero);
          return false;
       }


if (document.formservicios.direccion.value == "") {
alert("Please Write Your Address");
return false;
}


if (document.formservicios.ciudad.value == "") {
alert("Please Write Your City");
return false;
}



if (document.formservicios.estado.value == "") {
alert("Please Select Your State");
return false;
}


if (document.formservicios.zip.value == "") {
alert("Please Write Your Zip Code");
return false;
}

for (var z=0; z < document.formservicios.zip.value.length; z++){
 
if ((document.formservicios.zip.value.charCodeAt(z)<48) || (document.formservicios.zip.value.charCodeAt(z)>57)) {
alert("This Zip Code contains invalid characters\n Please Write Only Numbers 0-9");
return false;

  }
         
}



if (document.formservicios.zip.value.length == 5) {
numerodezip = document.formservicios.zip.value;
if (numerodezip != ""){
     for (var z=0; z < document.formservicios.zip.value.length; z++){
 
if ((document.formservicios.zip.value.charCodeAt(z)<48) || (document.formservicios.zip.value.charCodeAt(z)>57)) {
alert("This Zip Code contains invalid characters\n Please Write Only Numbers 0-9");
return false;

  }
         
}
}
}
else {
         var faltan = 5 - document.formservicios.zip.value.length;
         var mireelzip = document.formservicios.zip.value;
         for (a=0; a<faltan; a++) {
         mireelzip = mireelzip+"x";
         }
         alert("The Zip Code must contain 5 digits\n Write the "+faltan +" remaining numbers please\n                  " + mireelzip);
          return false;
       }



if (document.formservicios.diadevisita.value == "") {
alert("Please Select Your Appointment Day");
return false;
}


if (document.formservicios.diadevisita.value != document.formservicios.diadevisita2.value ) {
alert("Please Select Date from Calendar\n1. Click On Image Calendar\n2. Select Date ");
return false;
}



if (document.formservicios.horadevisita.value == "") {
alert("Please Select Your Appointment Time");
return false;
}

if (document.formservicios.idioma.value == "") {
alert("Please Select Your Language Preferred");
return false;
}

yapidioservicio=0;

if (!document.formservicios.s1.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s2.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s3.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s4.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s5.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s6.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s7.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s8.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s9.checked)  { }  else { yapidioservicio=1 }
if (!document.formservicios.s10.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s11.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s12.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s13.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s14.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s15.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s16.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s17.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s18.checked) { }  else { yapidioservicio=1 }
if (!document.formservicios.s19.checked) { }  else { yapidioservicio=1 }

if (yapidioservicio==0) {
alert("Please Select the service that You are requesting");
return false;
}


if (document.formservicios.cantidaddecomputadoras.value == "") {
alert("Please write the Number of Computers");
return false;
}

controldecantidad = document.formservicios.cantidaddecomputadoras.value;
if (controldecantidad != ""){
     for (var z=0; z < document.formservicios.cantidaddecomputadoras.value.length; z++){
 
if ((document.formservicios.cantidaddecomputadoras.value.charCodeAt(z)<49) || (document.formservicios.cantidaddecomputadoras.value.charCodeAt(z)>57)) {
if (document.formservicios.cantidaddecomputadoras.value == 0){
alert("This Number of Computers (0) is a invalid Quantity.");
return false;
}
else {
alert("This Number of Computers contains invalid characters.");
return false;
}
  }
         
}
}

if (document.formservicios.marcadecomputadora.value == "") {
alert("Please Select Brand of PC");
return false;
}

if (document.formservicios.fechadecompra.value == "") {
alert("Please Select Year of Purchase or Aproximately");
return false;
}


if ((document.formservicios.marcadecomputadora.value == "Other Brand") && (document.formservicios.otramarca.value == "")) {
alert("You selected Other Brand of Computer\n Please  write the Other Brand");
return false;
}

if (document.formservicios.tipodemaquina.value == "") {
alert("Please Select Type of Computer(s)");
return false;
}


if (document.formservicios.sistemaoperativo.value == "") {
alert("Please Select Operating System of Computer(s)");
return false;
}

if ((document.formservicios.sistemaoperativo.value == "Other Operating System") && (document.formservicios.otrosistemaoperativo.value == "")) {
alert("You selected Other Operating System\n Please   write the Other Operating System");
return false;
}

if (document.formservicios.tienelosdrivers.value == "") {
alert("Please Select If You Have the Drivers or Not");
return false;
}

if ((document.formservicios.tienelosdrivers.value == "No") &&(document.formservicios.driversquefaltan.value == "")){
alert("Please Type which One Don't have");
return false;
}

if (document.formservicios.s1.checked) {
    if (document.formservicios.problemadelapc.value == ""){
           alert("You selected the service of Computer Repair\nPlease explain the problem with your computer");
           return false;
    }
}




// If we've gotten this far, everything's valid!
return true;
}


function verificaformbestpc() {

if (document.formbestpc.quien.value == "") {
alert("Please Select Who's going to use the computer ?");
return false;
}

if (document.formbestpc.donde.value == "") {
alert("Please Select Where are you using the computer ? ");
return false;
}

if (document.formbestpc.paraque.value == "") {
alert("Please Select What are you using the computer for ? ");
return false;
}

// If we've gotten this far, everything's valid!
return true;
}


function verificaformcotizacionbestpc (emailStr) {

/* 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("Email address seems incorrect (check @ and .'s)");
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("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("The username doesn't seem to be valid.");
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("Destination IP address is invalid!");
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("The domain name does not seem to be valid.");
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("The address must end in a well-known domain or two letter " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This address is missing a hostname!");
return false;
}



if (document.formcotizacionbestpc.nombre.value == "") {
alert("Please Write Your First Name");
return false;
}

if (document.formcotizacionbestpc.apellido.value == "") {
alert("Please Write Your Last Name");
return false;
}

// If we've gotten this far, everything's valid!
return true;

}


function contactenos (emailStr) {

/* 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("Email address seems incorrect (check @ and .'s)");
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("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("The username doesn't seem to be valid.");
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("Destination IP address is invalid!");
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("The domain name does not seem to be valid.");
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("The address must end in a well-known domain or two letter " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This address is missing a hostname!");
return false;
}

if (document.formcontactenos.nombre.value == "") {
alert("Please Write Your First Name");
return false;
}


if (document.formcontactenos.apellido.value == "") {
alert("Please Write Your Last Name");
return false;
}


if (document.formcontactenos.comentariosopreguntas.value == "") {
alert("Please Write Your Comments or Questions");
return false;
}


// If we've gotten this far, everything's valid!
return true;
}


function piedepagina(){
document.write('<table width="100%"  cellspacing="0" cellpadding="0"><td height="5"></td></table><table width="99%"  cellspacing="0"  cellpadding="0"><tr><td bgcolor="eeefff" width="600"> <font size=2 face=arial><b><ul><li><a href="formbestpc.php">Which computer is best for me ?</a><li><a href="services.php?enviar=">Services at SalamancaNetwork<sup>®</sup></a></b><font color=darkred size=1 face=verdana> ( Only for New York )</font><b><font size=1><ol><li><a href="services.php?enviar=">Addition and configuration of components </a><li><a href="services.php?enviar=">Instalation of Operating System and Components configuration  </a><li><a href="services.php?enviar=">Computer Repair  </a><li><a href="services.php?enviar=">Computer Maintenance </a>   <li><a href="services.php?enviar=">Maintenance Contract</a></ol></font><li><a href="contactus.php">Contact Us</a></b></font></td><td align="right"><img src="imagenes/tecnico.jpg" vspace="0" hspace="0"></td></tr></table> <center><font color=white size=3 face=arial><b>SALAMANCA NETWORK<sup>®</sup>,<font size=2> All rights reserved 2004</font></b></font></center>');
}




function concolor(lr)
      {
         lr.style.backgroundColor="cccfff";
           lr.style.color = "white";
       }

   function sincolor(lr)
      {
         lr.style.backgroundColor="f0f0f0";
           lr.style.color = "black";
       }



function about(){
var aboutfile="aboutsalamancanetwork.php"
if (document.all)
aboutwindow=window.open(aboutfile,"","width=445,height=250,left=200,top=200,scrollbars=no,statusbar=no")
else
aboutwindow=window.open(aboutfile,"","width=445,height=250,left=200,top=200,scrollbars=no,statusbar=no")
}













document.write('<script language="javascript" src="calendario.js"></script>');



/////////////////////////////////////////////////////////////////////////////////

function updatedewebsite (emailStr) {

missinginfo = "";


cadena1 = document.updateform.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.updateform.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Your website no start with www.\n   Please write www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.updateform.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.updateform.website.value.length; x++){
                   nombredeextension = document.updateform.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Your website "+ cadena1 +"\n\n have blank space";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Your website have "+ cuenta1 +" dots\n\n Please write only 2 dots \n www.yourbusiness.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.updateform.website.value;
if (cadena2 != ""){
        var calculoext = document.updateform.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.updateform.website.value.length; x++){
                   nombredeextension += document.updateform.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.updateform.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.updateform.website.value.length; x++){
                                nombredeextension += document.updateform.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.updateform.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.updateform.website.value.length; x++){
                                        nombredeextension += document.updateform.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Your website "+cadena2+"\n\n No end with .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Please write correctly";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}




if ((document.updateform.website.value == "") || (document.updateform.website.value == "www.")) {
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}




if (document.updateform.password.value == "") {
alert("Please Write Your Password ");
return false;
}


if (document.updateform.email.value == "") {
alert("Please Write Your E-Mail ");
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("Email address seems incorrect (check @ and .'s)");
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("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("The username doesn't seem to be valid.");
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("Destination IP address is invalid!");
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("The domain name does not seem to be valid.");
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("The address must end in a well-known domain or two letter " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This address is missing a hostname!");
return false;
}


if (document.updateform.mensaje.value == "") {
alert("Please Write Your Message to WebMaster ");
return false;
}

if (document.updateform.fileatt.value == "") {
alert("Please Browse Your File Attachment");
return false;
}




cadena3 = document.updateform.fileatt.value;
if (cadena3 != ""){
        var calculoext = document.updateform.fileatt.value.length - 3
        var nombredeextension = "";   
               for (var x=calculoext; x < document.updateform.fileatt.value.length; x++){
                   nombredeextension += document.updateform.fileatt.value.charAt(x);                
               }
                 if ((nombredeextension == "zip") || (nombredeextension == "ZIP")){
                              
                 }
                  else {
                       missinginfo += "\n File Attachment is not a valid File.zip \n\n Please convert these File to (.zip)";
                       alert(missinginfo);
                       return false;
                       }

}


// If we've gotten this far, everything's valid!
return true;
}


///////////////////////////////////////////////////////////////////////////////////



function verificarnewwebsite(){



missinginfo = "";


cadena1 = document.formnewwebsite.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formnewwebsite.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Your website no start with www.\n   Please write www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formnewwebsite.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite.website.value.length; x++){
                   nombredeextension = document.formnewwebsite.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Your website "+ cadena1 +"\n\n have blank space";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Your website have "+ cuenta1 +" dots\n\n Please write only 2 dots \n www.yourbusiness.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formnewwebsite.website.value;
if (cadena2 != ""){
        var calculoext = document.formnewwebsite.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite.website.value.length; x++){
                   nombredeextension += document.formnewwebsite.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formnewwebsite.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formnewwebsite.website.value.length; x++){
                                nombredeextension += document.formnewwebsite.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formnewwebsite.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formnewwebsite.website.value.length; x++){
                                        nombredeextension += document.formnewwebsite.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Your website "+cadena2+"\n\n No end with .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Please write correctly";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formnewwebsite.website.value.length < 10){
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formnewwebsite.website.value.charCodeAt(z)==45) {
alert("Please, No Start with (-) after www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formnewwebsite.website.value.length; z++){
   if (document.formnewwebsite.website.value.charCodeAt(z)==46){
      banderadeguion=banderadeguion + 1;
     }
 
    if (banderadeguion==2){
     var guion=guion + 1;
     }
    
    if (guion==1){
      guionfinal = z;
      
    }
}


var calculoext = guionfinal;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite.website.value.length; x++){
                   nombredeextension += document.formnewwebsite.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formnewwebsite.website.value.charCodeAt(z)==45) {
alert("Please, No write (-) before "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formnewwebsite.website.value.length; z++){
 
if (((document.formnewwebsite.website.value.charCodeAt(z)>1) && (document.formnewwebsite.website.value.charCodeAt(z)<46)) || ((document.formnewwebsite.website.value.charCodeAt(z)>46) && (document.formnewwebsite.website.value.charCodeAt(z)<48)) || ((document.formnewwebsite.website.value.charCodeAt(z)>57) && (document.formnewwebsite.website.value.charCodeAt(z)<65)) || ((document.formnewwebsite.website.value.charCodeAt(z)>90) && (document.formnewwebsite.website.value.charCodeAt(z)<97)) || ((document.formnewwebsite.website.value.charCodeAt(z)>122) && (document.formnewwebsite.website.value.charCodeAt(z)<256))) {
alert("Website contains invalid characters");
return false;

  }
}



if ((document.formnewwebsite.website.value == "") || (document.formnewwebsite.website.value == "www.")) {
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}






// If we've gotten this far, everything's valid!
return true;

}



///////////////////////////////////////////////////////////////////////////////////



function verificarnewwebsite2(){



missinginfo = "";


cadena1 = document.formnewwebsite2.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formnewwebsite2.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Your website no start with www.\n   Please write www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formnewwebsite2.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite2.website.value.length; x++){
                   nombredeextension = document.formnewwebsite2.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Your website "+ cadena1 +"\n\n have blank space";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Your website have "+ cuenta1 +" dots\n\n Please write only 2 dots \n www.yourbusiness.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formnewwebsite2.website.value;
if (cadena2 != ""){
        var calculoext = document.formnewwebsite2.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite2.website.value.length; x++){
                   nombredeextension += document.formnewwebsite2.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formnewwebsite2.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formnewwebsite2.website.value.length; x++){
                                nombredeextension += document.formnewwebsite2.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formnewwebsite2.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formnewwebsite2.website.value.length; x++){
                                        nombredeextension += document.formnewwebsite2.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Your website "+cadena2+"\n\n No end with .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Please write correctly";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formnewwebsite2.website.value.length < 10){
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formnewwebsite2.website.value.charCodeAt(z)==45) {
alert("Please, No Start with (-) after www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formnewwebsite2.website.value.length; z++){
   if (document.formnewwebsite2.website.value.charCodeAt(z)==46){
      banderadeguion=banderadeguion + 1;
     }
 
    if (banderadeguion==2){
     var guion=guion + 1;
     }
    
    if (guion==1){
      guionfinal = z;
      
    }
}


var calculoext = guionfinal;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite2.website.value.length; x++){
                   nombredeextension += document.formnewwebsite2.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formnewwebsite2.website.value.charCodeAt(z)==45) {
alert("Please, No write (-) before "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formnewwebsite2.website.value.length; z++){
 
if (((document.formnewwebsite2.website.value.charCodeAt(z)>1) && (document.formnewwebsite2.website.value.charCodeAt(z)<46)) || ((document.formnewwebsite2.website.value.charCodeAt(z)>46) && (document.formnewwebsite2.website.value.charCodeAt(z)<48)) || ((document.formnewwebsite2.website.value.charCodeAt(z)>57) && (document.formnewwebsite2.website.value.charCodeAt(z)<65)) || ((document.formnewwebsite2.website.value.charCodeAt(z)>90) && (document.formnewwebsite2.website.value.charCodeAt(z)<97)) || ((document.formnewwebsite2.website.value.charCodeAt(z)>122) && (document.formnewwebsite2.website.value.charCodeAt(z)<256))) {
alert("Website contains invalid characters");
return false;

  }
}



if ((document.formnewwebsite2.website.value == "") || (document.formnewwebsite2.website.value == "www.")) {
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}






// If we've gotten this far, everything's valid!
return true;

}



///////////////////////////////////////////////////////////////////////////////////



function verificarnewwebsite3(){



missinginfo = "";


cadena1 = document.formnewwebsite3.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formnewwebsite3.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Your website no start with www.\n   Please write www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formnewwebsite3.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite3.website.value.length; x++){
                   nombredeextension = document.formnewwebsite3.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Your website "+ cadena1 +"\n\n have blank space";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Your website have "+ cuenta1 +" dots\n\n Please write only 2 dots \n www.yourbusiness.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formnewwebsite3.website.value;
if (cadena2 != ""){
        var calculoext = document.formnewwebsite3.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite3.website.value.length; x++){
                   nombredeextension += document.formnewwebsite3.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formnewwebsite3.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formnewwebsite3.website.value.length; x++){
                                nombredeextension += document.formnewwebsite3.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formnewwebsite3.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formnewwebsite3.website.value.length; x++){
                                        nombredeextension += document.formnewwebsite3.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Your website "+cadena2+"\n\n No end with .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Please write correctly";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formnewwebsite3.website.value.length < 10){
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formnewwebsite3.website.value.charCodeAt(z)==45) {
alert("Please, No Start with (-) after www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formnewwebsite3.website.value.length; z++){
   if (document.formnewwebsite3.website.value.charCodeAt(z)==46){
      banderadeguion=banderadeguion + 1;
     }
 
    if (banderadeguion==2){
     var guion=guion + 1;
     }
    
    if (guion==1){
      guionfinal = z;
      
    }
}


var calculoext = guionfinal;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite3.website.value.length; x++){
                   nombredeextension += document.formnewwebsite3.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formnewwebsite3.website.value.charCodeAt(z)==45) {
alert("Please, No write (-) before "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formnewwebsite3.website.value.length; z++){
 
if (((document.formnewwebsite3.website.value.charCodeAt(z)>1) && (document.formnewwebsite3.website.value.charCodeAt(z)<46)) || ((document.formnewwebsite3.website.value.charCodeAt(z)>46) && (document.formnewwebsite3.website.value.charCodeAt(z)<48)) || ((document.formnewwebsite3.website.value.charCodeAt(z)>57) && (document.formnewwebsite3.website.value.charCodeAt(z)<65)) || ((document.formnewwebsite3.website.value.charCodeAt(z)>90) && (document.formnewwebsite3.website.value.charCodeAt(z)<97)) || ((document.formnewwebsite3.website.value.charCodeAt(z)>122) && (document.formnewwebsite3.website.value.charCodeAt(z)<256))) {
alert("Website contains invalid characters");
return false;

  }
}



if ((document.formnewwebsite3.website.value == "") || (document.formnewwebsite3.website.value == "www.")) {
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}






// If we've gotten this far, everything's valid!
return true;

}



///////////////////////////////////////////////////////////////////////////////////



function verificarnewwebsite4(){



missinginfo = "";


cadena1 = document.formnewwebsite4.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formnewwebsite4.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Your website no start with www.\n   Please write www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formnewwebsite4.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite4.website.value.length; x++){
                   nombredeextension = document.formnewwebsite4.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Your website "+ cadena1 +"\n\n have blank space";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Your website have "+ cuenta1 +" dots\n\n Please write only 2 dots \n www.yourbusiness.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formnewwebsite4.website.value;
if (cadena2 != ""){
        var calculoext = document.formnewwebsite4.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite4.website.value.length; x++){
                   nombredeextension += document.formnewwebsite4.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formnewwebsite4.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formnewwebsite4.website.value.length; x++){
                                nombredeextension += document.formnewwebsite4.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formnewwebsite4.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formnewwebsite4.website.value.length; x++){
                                        nombredeextension += document.formnewwebsite4.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Your website "+cadena2+"\n\n No end with .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Please write correctly";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formnewwebsite4.website.value.length < 10){
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formnewwebsite4.website.value.charCodeAt(z)==45) {
alert("Please, No Start with (-) after www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formnewwebsite4.website.value.length; z++){
   if (document.formnewwebsite4.website.value.charCodeAt(z)==46){
      banderadeguion=banderadeguion + 1;
     }
 
    if (banderadeguion==2){
     var guion=guion + 1;
     }
    
    if (guion==1){
      guionfinal = z;
      
    }
}


var calculoext = guionfinal;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formnewwebsite4.website.value.length; x++){
                   nombredeextension += document.formnewwebsite4.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formnewwebsite4.website.value.charCodeAt(z)==45) {
alert("Please, No write (-) before "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formnewwebsite4.website.value.length; z++){
 
if (((document.formnewwebsite4.website.value.charCodeAt(z)>1) && (document.formnewwebsite4.website.value.charCodeAt(z)<46)) || ((document.formnewwebsite4.website.value.charCodeAt(z)>46) && (document.formnewwebsite4.website.value.charCodeAt(z)<48)) || ((document.formnewwebsite4.website.value.charCodeAt(z)>57) && (document.formnewwebsite4.website.value.charCodeAt(z)<65)) || ((document.formnewwebsite4.website.value.charCodeAt(z)>90) && (document.formnewwebsite4.website.value.charCodeAt(z)<97)) || ((document.formnewwebsite4.website.value.charCodeAt(z)>122) && (document.formnewwebsite4.website.value.charCodeAt(z)<256))) {
alert("Website contains invalid characters");
return false;

  }
}



if ((document.formnewwebsite4.website.value == "") || (document.formnewwebsite4.website.value == "www.")) {
alert("Please Write Your Website \n www.yourbusiness.com");
return false;
}






// If we've gotten this far, everything's valid!
return true;

}



///////////////////////////////////////////////////////////////////////////////////

function contacto (emailStr) {



if (document.formcontactus.nombre.value == "") {
alert("Please Write Your First Name");
return false;
}


if (document.formcontactus.apellido.value == "") {
alert("Please Write Your Last Name");
return false;
}

if (document.formcontactus.email.value == "") {
alert("Please Write Your Email");
return false;
}
else {

/* 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("Email address seems incorrect (check @ and .'s)");
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("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("The username doesn't seem to be valid.");
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("Destination IP address is invalid!");
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("The domain name does not seem to be valid.");
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("The address must end in a well-known domain or two letter " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This address is missing a hostname!");
return false;
}

}


if (document.formcontactus.telefono.value == "") {
alert("Please Write Your Phone Number");
return false;
}


 for (var z=0; z < document.formcontactus.telefono.value.length; z++){
 
if ((document.formcontactus.telefono.value.charCodeAt(z)<48) || (document.formcontactus.telefono.value.charCodeAt(z)>57)) {
alert("This Phone Number contains invalid characters\n Please Write Only Numbers 0-9");
return false;

  }
         
}



if (document.formcontactus.telefono.value.length == 10) {
numerodetelefono = document.formcontactus.telefono.value;
if (numerodetelefono != ""){
     for (var z=0; z < document.formcontactus.telefono.value.length; z++){
 
if ((document.formcontactus.telefono.value.charCodeAt(z)<48) || (document.formcontactus.telefono.value.charCodeAt(z)>57)) {
alert("This Phone Number contains invalid characters\n Please Write Only Numbers 0-9");
return false;

  }
         
}
}
}
else {
         var faltan = 10 - document.formcontactus.telefono.value.length;
         var mireelnumero = document.formcontactus.telefono.value;
         for (a=0; a<faltan; a++) {
         mireelnumero = mireelnumero+"x";
         }
         alert("The Phone number must contain 10 digits\n Write the "+faltan +" remaining numbers please\n                  " + mireelnumero);
          return false;
       }


if (document.formcontactus.comments.value == "") {
alert("Please Write Message");
return false;
}


// If we've gotten this far, everything's valid!
return true;


}



///////////////////////////////////////////////////////////////////////////////////
document.write('<script language="javascript" src="calendario.js"></script>');
document.write('<script language="JavaScript" src="style.js"></script>');
document.write('<script language="JavaScript" src="enunciadodemenu.js"></script>');


/////////////////////////////////////////////////////////////////////////////////

// Relection

if (!document.myGetElementsByClassName) {
	document.myGetElementsByClassName = function(className) {
		var children = document.getElementsByTagName('*') || document.all;
		var elements = new Array();
	  
		for (var i = 0; i < children.length; i++) {
			var child = children[i];
			var classNames = child.className.split(' ');
			for (var j = 0; j < classNames.length; j++) {
				if (classNames[j] == className) {
					elements.push(child);
					break;
				}
			}
		}
		return elements;
	}
}

var Reflection = {
	defaultHeight : 0.5,
	defaultOpacity: 0.5,
	
	add: function(image, options) {
		Reflection.remove(image);
		
		doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
		if (options) {
			for (var i in doptions) {
				if (!options[i]) {
					options[i] = doptions[i];
				}
			}
		} else {
			options = doptions;
		}
	
		try {
			var d = document.createElement('div');
			var p = image;
			
			var classes = p.className.split(' ');
			var newClasses = '';
			for (j=0;j<classes.length;j++) {
				if (classes[j] != "reflect") {
					if (newClasses) {
						newClasses += ' '
					}
					
					newClasses += classes[j];
				}
			}

			var reflectionHeight = Math.floor(p.height*options['height']);
			var divHeight = Math.floor(p.height*(1+options['height']));
			
			var reflectionWidth = p.width;
			
			if (document.all && !window.opera) {
				/* Fix hyperlinks */
                if(p.parentElement.tagName == 'A') {
	                var d = document.createElement('a');
	                d.href = p.parentElement.href;
                }  
                    
				/* Copy original image's classes & styles to div */
				d.className = newClasses;
				p.className = 'reflected';
				
				d.style.cssText = p.style.cssText;
				p.style.cssText = 'vertical-align: bottom';
			
				var reflection = document.createElement('img');
				reflection.src = p.src;
				reflection.style.width = reflectionWidth+'px';
				reflection.style.display = 'block';
				reflection.style.height = p.height+"px";
				
				reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
				reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
				
				d.style.width = reflectionWidth+'px';
				d.style.height = divHeight+'px';
				p.parentNode.replaceChild(d, p);
				
				d.appendChild(p);
				d.appendChild(reflection);
			} else {
				var canvas = document.createElement('canvas');
				if (canvas.getContext) {
					/* Copy original image's classes & styles to div */
					d.className = newClasses;
					p.className = 'reflected';
					
					d.style.cssText = p.style.cssText;
					p.style.cssText = 'vertical-align: bottom';
			
					var context = canvas.getContext("2d");
				
					canvas.style.height = reflectionHeight+'px';
					canvas.style.width = reflectionWidth+'px';
					canvas.height = reflectionHeight;
					canvas.width = reflectionWidth;
					
					d.style.width = reflectionWidth+'px';
					d.style.height = divHeight+'px';
					p.parentNode.replaceChild(d, p);
					
					d.appendChild(p);
					d.appendChild(canvas);
					
					context.save();
					
					context.translate(0,image.height-1);
					context.scale(1,-1);
					
					context.drawImage(image, 0, 0, reflectionWidth, image.height);
	
					context.restore();
					
					context.globalCompositeOperation = "destination-out";
					var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
					
					gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
					gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
		
					context.fillStyle = gradient;
					context.rect(0, 0, reflectionWidth, reflectionHeight*2);
					context.fill();
				}
			}
		} catch (e) {
	    }
	},
	
	remove : function(image) {
		if (image.className == "reflected") {
			image.className = image.parentNode.className;
			image.parentNode.parentNode.replaceChild(image, image.parentNode);
		}
	}
}

function addReflections() {
	var rimages = document.myGetElementsByClassName('reflect');
	for (i=0;i<rimages.length;i++) {
		var rheight = null;
		var ropacity = null;
		
		var classes = rimages[i].className.split(' ');
		for (j=0;j<classes.length;j++) {
			if (classes[j].indexOf("rheight") == 0) {
				var rheight = classes[j].substring(7)/100;
			} else if (classes[j].indexOf("ropacity") == 0) {
				var ropacity = classes[j].substring(8)/100;
			}
		}
		
		Reflection.add(rimages[i], { height: rheight, opacity : ropacity});
	}
}

var previousOnload = window.onload;
window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }


////////////////////////////////////////////////////////////////////////////////////////////



