//                      #######     #     #          #     #     #     #     #   #  #####     #
//                      #          # #    #         # #    ##   ##    # #    ##  # #         # #
//                      #######   #   #   #        #   #   # # # #   #   #   # # # #        #   #
//                            #  #######  #       #######  #  #  #  #######  #  ## #       #######
//                      ####### #       # ###### #       # #     # #       # #   #  ##### #       #



if (self != top)
top.location = self.location


//////////////////////////////////////////////////////////////////////////////////


function dominioenencabezado() {

missinginfo = "";

if ((document.formdominioenencabezado.ddomain.value == "") || (document.formdominioenencabezado.ddomain.value == "www.")) {
alert("Por favor escriba su sitio web  \n www.sunegocio.com");
return false;
}


cadena1 = document.formdominioenencabezado.ddomain.value;


cuenta1 = 0;
cadena1 = document.formdominioenencabezado.ddomain.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formdominioenencabezado.ddomain.value.length; x++){
                   nombredeextension = document.formdominioenencabezado.ddomain.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Su sitio web "+ cadena1 +"\n\n tiene espacios en blanco";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                       nombredesite = x
                   }               
               }
                 
     if (cuenta1>1){
           missinginfo += "\n Su sitio web tiene "+ cuenta1 +" puntos\n\n Por favor escriba solamente 1 puntos \n EJ.: www.sunegocio.com ";
           alert(missinginfo);
           return false;       
     }
}






cadena2 = document.formdominioenencabezado.ddomain.value;
if (cadena2 != ""){
        var calculoext = document.formdominioenencabezado.ddomain.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formdominioenencabezado.ddomain.value.length; x++){
                   nombredeextension += document.formdominioenencabezado.ddomain.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formdominioenencabezado.ddomain.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formdominioenencabezado.ddomain.value.length; x++){
                                nombredeextension += document.formdominioenencabezado.ddomain.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org")){
                              
                          }  
                           else { 
                                   var calculoext = document.formdominioenencabezado.ddomain.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formdominioenencabezado.ddomain.value.length; x++){
                                        nombredeextension += document.formdominioenencabezado.ddomain.value.charAt(x);                
                                       } 
                                   
                                           missinginfo += "\n Su sitio web "+cadena2+"\n\n No termina con .com., .net, .org, .info  \n \n Por favor escribalo correctamente";
                                           alert(missinginfo);
                                           return false;
                                          
                        
                                 }
                        }
                        

}





if (nombredesite < 2){
alert("El nombre de Su sitio web \n debe tener ms de 1 caracter antes de "+nombredeextension);
return false;
}



for (var z=0; z < 2; z++){
if (document.formdominioenencabezado.ddomain.value.charCodeAt(z)==45) {
alert("Por favor, No inicie con (-) despus de www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formdominioenencabezado.ddomain.value.length; z++){
   if (document.formdominioenencabezado.ddomain.value.charCodeAt(z)==46){
      banderadeguion=banderadeguion + 1;
     }
 
    if (banderadeguion==1){
     var guion=guion + 1;
     }
    
    if (guion==1){
      guionfinal = z;
      
    }
}


var calculoext = guionfinal;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formdominioenencabezado.ddomain.value.length; x++){
                   nombredeextension += document.formdominioenencabezado.ddomain.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formdominioenencabezado.ddomain.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formdominioenencabezado.ddomain.value.length; z++){
 
if (((document.formdominioenencabezado.ddomain.value.charCodeAt(z)>1) && (document.formdominioenencabezado.ddomain.value.charCodeAt(z)<45)) || ((document.formdominioenencabezado.ddomain.value.charCodeAt(z)>46) && (document.formdominioenencabezado.ddomain.value.charCodeAt(z)<48)) || ((document.formdominioenencabezado.ddomain.value.charCodeAt(z)>57) && (document.formdominioenencabezado.ddomain.value.charCodeAt(z)<65)) || ((document.formdominioenencabezado.ddomain.value.charCodeAt(z)>90) && (document.formdominioenencabezado.ddomain.value.charCodeAt(z)<97)) || ((document.formdominioenencabezado.ddomain.value.charCodeAt(z)>122) && (document.formdominioenencabezado.ddomain.value.charCodeAt(z)<255))) {
alert("El Sitio web tiene caracteres invalidos");
return false;

  }
}








// If we've gotten this far, everything's valid!
return true;
}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function nuevocliente() {

missinginfo = "";

if (document.formlatinoamerica.tipodedominio.value == "") {

missinginfo += "\nPor favor seleccione el tipo de dominio \n\nPor Ejemplo \n\nDominio local es susitioweb.com.mx\nhace referencia a un pas en este caso Mxico\n \nDominio internacional es susitioweb.com\nno hace referencia a un determinado pas";
                       alert(missinginfo);
                       return false;
}





cadena1 = document.formlatinoamerica.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formlatinoamerica.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Su sitio web no inicia con www.\n   Por favor escriba www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formlatinoamerica.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formlatinoamerica.website.value.length; x++){
                   nombredeextension = document.formlatinoamerica.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Su sitio web "+ cadena1 +"\n\n tiene espacios en blanco";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
 
if (document.formlatinoamerica.tipodedominio.value == "internacional"){
                
     if (cuenta1>2){
           missinginfo += "\n Su sitio web tiene "+ cuenta1 +" puntos\n\n Por favor escriba solamente 2 puntos \n EJ.: sunegocio.com ";
           alert(missinginfo);
           return false;       
     }
}
}




if (document.formlatinoamerica.tipodedominio.value == "internacional"){


cadena2 = document.formlatinoamerica.website.value;
if (cadena2 != ""){
        var calculoext = document.formlatinoamerica.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formlatinoamerica.website.value.length; x++){
                   nombredeextension += document.formlatinoamerica.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formlatinoamerica.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formlatinoamerica.website.value.length; x++){
                                nombredeextension += document.formlatinoamerica.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org")){
                              
                          }  
                           else { 
                                   
                                   missinginfo += "\n Su sitio web "+cadena2+"\n\n No termina con .com., .net, .org, .info \n \n Por favor escribalo correctamente";
                                   alert(missinginfo);
                                   return false;
                                          
                        
                                 }
                        }
                        

}


}




if (document.formlatinoamerica.website.value.length < 10){
alert("Por favor escriba su sitio web correctamente");
return false;
}



for (var z=3; z < 5; z++){
if (document.formlatinoamerica.website.value.charCodeAt(z)==45) {
alert("Por favor, No inicie con (-) despus de www.");
return false;

  }
}








if (document.formlatinoamerica.tipodedominio.value == "internacional"){
var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formlatinoamerica.website.value.length; z++){
   if (document.formlatinoamerica.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.formlatinoamerica.website.value.length; x++){
                   nombredeextension += document.formlatinoamerica.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formlatinoamerica.website.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}

}

else {

var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formlatinoamerica.website.value.length; z++){
   if (document.formlatinoamerica.website.value.charCodeAt(z)==46){
      banderadeguion=banderadeguion + 1;
     }
 
    if (banderadeguion==3){
     var guion=guion + 1;
     }
    
    if (guion==1){
      guionfinal = z;
      
    }
}


var calculoext = guionfinal;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formlatinoamerica.website.value.length; x++){
                   nombredeextension += document.formlatinoamerica.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formlatinoamerica.website.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}


}


for (var z=0; z < document.formlatinoamerica.website.value.length; z++){
 
if (((document.formlatinoamerica.website.value.charCodeAt(z)>1) && (document.formlatinoamerica.website.value.charCodeAt(z)<45)) || ((document.formlatinoamerica.website.value.charCodeAt(z)>46) && (document.formlatinoamerica.website.value.charCodeAt(z)<48)) || ((document.formlatinoamerica.website.value.charCodeAt(z)>57) && (document.formlatinoamerica.website.value.charCodeAt(z)<65)) || ((document.formlatinoamerica.website.value.charCodeAt(z)>90) && (document.formlatinoamerica.website.value.charCodeAt(z)<97)) || ((document.formlatinoamerica.website.value.charCodeAt(z)>122) && (document.formlatinoamerica.website.value.charCodeAt(z)<255))) {
alert("El Sitio web tiene caracteres invalidos");
return false;

  }
}



if ((document.formlatinoamerica.website.value == "") || (document.formlatinoamerica.website.value == "www.")) {
alert("Por favor escriba su sitio web  \n www.sunegocio.com");
return false;
}



if (document.formlatinoamerica.website.value != document.formlatinoamerica.website2.value) {
alert("El Sitio web y la Repeticin de Sitio web son diferentes \npor favor repare la escritura si escribe mal su dominio quedar errado\ny no ser nuestra responsabilidad");
return false;
}


// If we've gotten this far, everything's valid!
return true;

}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function nuevohosting() {

missinginfo = "";

if (document.formlatinoamerica.website.value != document.formlatinoamerica.website2.value) {
alert("El Sitio web y la Repeticin de Sitio web son diferentes \npor favor repare la escritura si escribe mal su dominio quedar errado\ny no ser nuestra responsabilidad");
return false;
}


// If we've gotten this far, everything's valid!
return true;

}




/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function dominioyhosting(emailStr) {

missinginfo = "";


cadena1 = document.formdominioyhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formdominioyhosting.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Su sitio web no inicia con www.\n   Por favor escriba www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formdominioyhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formdominioyhosting.website.value.length; x++){
                   nombredeextension = document.formdominioyhosting.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Su sitio web "+ cadena1 +"\n\n tiene espacios en blanco";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Su sitio web tiene "+ cuenta1 +" puntos\n\n Por favor escriba solamente 2 puntos \n EJ.: www.sunegocio.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formdominioyhosting.website.value;
if (cadena2 != ""){
        var calculoext = document.formdominioyhosting.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formdominioyhosting.website.value.length; x++){
                   nombredeextension += document.formdominioyhosting.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formdominioyhosting.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formdominioyhosting.website.value.length; x++){
                                nombredeextension += document.formdominioyhosting.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formdominioyhosting.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formdominioyhosting.website.value.length; x++){
                                        nombredeextension += document.formdominioyhosting.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Su sitio web "+cadena2+"\n\n No termina con .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Por favor escribalo correctamente";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formdominioyhosting.website.value.length < 10){
alert("Por favor escriba su sitio web \n www.sunegocio.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formdominioyhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No inicie con (-) despus de www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formdominioyhosting.website.value.length; z++){
   if (document.formdominioyhosting.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.formdominioyhosting.website.value.length; x++){
                   nombredeextension += document.formdominioyhosting.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formdominioyhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formdominioyhosting.website.value.length; z++){
 
if (((document.formdominioyhosting.website.value.charCodeAt(z)>1) && (document.formdominioyhosting.website.value.charCodeAt(z)<45)) || ((document.formdominioyhosting.website.value.charCodeAt(z)>46) && (document.formdominioyhosting.website.value.charCodeAt(z)<48)) || ((document.formdominioyhosting.website.value.charCodeAt(z)>57) && (document.formdominioyhosting.website.value.charCodeAt(z)<65)) || ((document.formdominioyhosting.website.value.charCodeAt(z)>90) && (document.formdominioyhosting.website.value.charCodeAt(z)<97)) || ((document.formdominioyhosting.website.value.charCodeAt(z)>122) && (document.formdominioyhosting.website.value.charCodeAt(z)<255))) {
alert("El Sitio web tiene caracteres invalidos");
return false;

  }
}



if ((document.formdominioyhosting.website.value == "") || (document.formdominioyhosting.website.value == "www.")) {
alert("Por favor escriba su sitio web  \n www.sunegocio.com");
return false;
}



if (document.formdominioyhosting.password.value.length < 6) {
alert("El Password debe tener por lo menos 6 caracteres");
return false;
}


for (var z=0; z < document.formdominioyhosting.password.value.length; z++){
 
if (((document.formdominioyhosting.password.value.charCodeAt(z)>1) && (document.formdominioyhosting.password.value.charCodeAt(z)<48)) || ((document.formdominioyhosting.password.value.charCodeAt(z)>57) && (document.formdominioyhosting.password.value.charCodeAt(z)<65)) || ((document.formdominioyhosting.password.value.charCodeAt(z)>90) && (document.formdominioyhosting.password.value.charCodeAt(z)<97)) || ((document.formdominioyhosting.password.value.charCodeAt(z)>122) && (document.formdominioyhosting.password.value.charCodeAt(z)<255))) {
alert("El Password tiene caracteres invalidos");
return false;

  }
}


if (document.formdominioyhosting.password.value != document.formdominioyhosting.password2.value) {
alert("El Password y la Repeticin de Password son diferentes \npor favor corrija la escritura");
return false;
}




if (document.formdominioyhosting.nombre.value == "") {
alert("Por Favor escriba su Nombre");
return false;
}


if (document.formdominioyhosting.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 direccin 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 direccin de Email deberia de terminar en un dominio o \n en la abreviatura de un Pas");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direccin de Email no tiene Host!");
return false;
}




if (document.formdominioyhosting.telefono.value == "") {
alert("Por favor escriba su nmero de Telfono");
return false;
}


 for (var z=0; z < document.formdominioyhosting.telefono.value.length; z++){
 
if ((document.formdominioyhosting.telefono.value.charCodeAt(z)<48) || (document.formdominioyhosting.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9");
return false;

  }
         
}



if (document.formdominioyhosting.telefono.value.length == 7) {
numerodetelefono = document.formdominioyhosting.telefono.value;
if (numerodetelefono != ""){
     for (var z=0; z < document.formdominioyhosting.telefono.value.length; z++){
 
if ((document.formdominioyhosting.telefono.value.charCodeAt(z)<48) || (document.formdominioyhosting.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9")
return false;

  }
         
}
}
}
else {
         var faltan = 7 - document.formdominioyhosting.telefono.value.length;
         var mireelnumero = document.formdominioyhosting.telefono.value;
         for (a=0; a<faltan; a++) {
         mireelnumero = mireelnumero+"x";
         }
         alert("El nmero de telfono deberia tener 7 digitos\n Escriba los "+faltan +" nmeros restantes por favor\n                  " + mireelnumero);
          return false;
       }


if (document.formdominioyhosting.direccion.value == "") {
alert("Por favor escriba su direccin");
return false;
}


if (document.formdominioyhosting.ciudad.value == "") {
alert("Por favor escriba su ciudad");
return false;
}



if (document.formdominioyhosting.departamento.value == "") {
alert("Por favor seleccione el departamento donde reside");
return false;
}




if (document.formdominioyhosting.usodewebsite.value == "") {
alert("Por favor seleccione el uso que le dar al sitio web");
return false;
}


if (document.formdominioyhosting.formadepago.value == "") {
alert("Por favor seleccione la Forma de Pago");
return false;
}




// If we've gotten this far, everything's valid!
return true;
}



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function dominiosweb(emailStr) {

missinginfo = "";


cadena1 = document.formdominio.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formdominio.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Su sitio web no inicia con www.\n   Por favor escriba www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formdominio.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formdominio.website.value.length; x++){
                   nombredeextension = document.formdominio.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Su sitio web "+ cadena1 +"\n\n tiene espacios en blanco";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Su sitio web tiene "+ cuenta1 +" puntos\n\n Por favor escriba solamente 2 puntos \n Ej.: www.sunegocio.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formdominio.website.value;
if (cadena2 != ""){
        var calculoext = document.formdominio.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formdominio.website.value.length; x++){
                   nombredeextension += document.formdominio.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formdominio.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formdominio.website.value.length; x++){
                                nombredeextension += document.formdominio.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formdominio.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formdominio.website.value.length; x++){
                                        nombredeextension += document.formdominio.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Su sitio web "+cadena2+"\n\n No termina con .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Por favor escribalo correctamente";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formdominio.website.value.length < 10){
alert("Por favor escriba su sitio web \n www.sunegocio.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formdominio.website.value.charCodeAt(z)==45) {
alert("Por favor, No inicie con (-) despus de www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formdominio.website.value.length; z++){
   if (document.formdominio.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.formdominio.website.value.length; x++){
                   nombredeextension += document.formdominio.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formdominio.website.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formdominio.website.value.length; z++){
 
if (((document.formdominio.website.value.charCodeAt(z)>1) && (document.formdominio.website.value.charCodeAt(z)<45)) || ((document.formdominio.website.value.charCodeAt(z)>46) && (document.formdominio.website.value.charCodeAt(z)<48)) || ((document.formdominio.website.value.charCodeAt(z)>57) && (document.formdominio.website.value.charCodeAt(z)<65)) || ((document.formdominio.website.value.charCodeAt(z)>90) && (document.formdominio.website.value.charCodeAt(z)<97)) || ((document.formdominio.website.value.charCodeAt(z)>122) && (document.formdominio.website.value.charCodeAt(z)<255))) {
alert("El Sitio web tiene caracteres invalidos");
return false;

  }
}



if ((document.formdominio.website.value == "") || (document.formdominio.website.value == "www.")) {
alert("Por favor escriba su sitio web  \n www.sunegocio.com");
return false;
}







if (document.formdominio.nombre.value == "") {
alert("Por Favor escriba su Nombre");
return false;
}


if (document.formdominio.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 direccin 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 direccin de Email deberia de terminar en un dominio o \n en la abreviatura de un Pas");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direccin de Email no tiene Host!");
return false;
}




if (document.formdominio.telefono.value == "") {
alert("Por favor escriba su nmero de Telfono");
return false;
}


 for (var z=0; z < document.formdominio.telefono.value.length; z++){
 
if ((document.formdominio.telefono.value.charCodeAt(z)<48) || (document.formdominio.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9");
return false;

  }
         
}



if (document.formdominio.telefono.value.length == 7) {
numerodetelefono = document.formdominio.telefono.value;
if (numerodetelefono != ""){
     for (var z=0; z < document.formdominio.telefono.value.length; z++){
 
if ((document.formdominio.telefono.value.charCodeAt(z)<48) || (document.formdominio.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9")
return false;

  }
         
}
}
}
else {
         var faltan = 7 - document.formdominio.telefono.value.length;
         var mireelnumero = document.formdominio.telefono.value;
         for (a=0; a<faltan; a++) {
         mireelnumero = mireelnumero+"x";
         }
         alert("El nmero de telfono deberia tener 7 digitos\n Escriba los "+faltan +" nmeros restantes por favor\n                  " + mireelnumero);
          return false;
       }


if (document.formdominio.direccion.value == "") {
alert("Por favor escriba su direccin");
return false;
}


if (document.formdominio.ciudad.value == "") {
alert("Por favor escriba su ciudad");
return false;
}



if (document.formdominio.departamento.value == "") {
alert("Por favor seleccione el departamento donde reside");
return false;
}




if (document.formdominio.usodewebsite.value == "") {
alert("Por favor seleccione el uso que le dar al sitio web");
return false;
}


if (document.formdominio.formadepago.value == "") {
alert("Por favor seleccione la Forma de Pago");
return false;
}




// If we've gotten this far, everything's valid!
return true;
}






////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



function hosting(emailStr) {

missinginfo = "";


var paso=0;

if(document.forms[0].servicio[0].checked) {
   paso=1;
   document.formhosting.tipodeservicio.value="HostingPersonal";
   if (document.formhosting.formadepago.value=="Anual"){
       document.formhosting.costo.value="14.99";
      
   }
}

if(document.forms[0].servicio[1].checked) {
   paso=1;
   document.formhosting.tipodeservicio.value="HostingBasico";
   if (document.formhosting.formadepago2.value=="Anual"){
       document.formhosting.costo.value="29.99";
      
   }
}


if(document.forms[0].servicio[2].checked) {
   paso=1;
   document.formhosting.tipodeservicio.value="HostingProfesional";
   if (document.formhosting.formadepago3.value=='Mensual'){
       document.formhosting.costo.value="4.95";
       
   }
else {
       document.formhosting.costo.value="59.40";
       
   }
}

if(document.forms[0].servicio[3].checked) {
   paso=1;
   document.formhosting.tipodeservicio.value="HostingEmpresarial";
   if (document.formhosting.formadepago4.value=='Mensual'){
       document.formhosting.costo.value="7.50";
       
   }

   if (document.formhosting.formadepago4.value=="Anual"){
       document.formhosting.costo.value="90.00";
       
   }
}

if(document.forms[0].servicio[4].checked) {
   paso=1;
   document.formhosting.tipodeservicio.value="HostingDesarrollador";
   if (document.formhosting.formadepago5.value=='Mensual'){
       document.formhosting.costo.value=="9.99";
       
   }

   if (document.formhosting.formadepago5.value=="Anual"){
       document.formhosting.costo.value="119.88";
       
   }
}


if(paso==0){
   alert('Por Favor seleccione el Servicio de Web Hosting que desea\nGracias !!! ');
   return false;
   }






if (document.formhosting.tipodedominio.value == "Internacional") {

cadena1 = document.formhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Su sitio web no inicia con www.\n   Por favor escriba www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                   nombredeextension = document.formhosting.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Su sitio web "+ cadena1 +"\n\n tiene espacios en blanco";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Su sitio web tiene "+ cuenta1 +" puntos\n\n Por favor escriba solamente 2 puntos \n Ej.: www.sunegocio.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formhosting.website.value;
if (cadena2 != ""){
        var calculoext = document.formhosting.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formhosting.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                                nombredeextension += document.formhosting.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formhosting.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                                        nombredeextension += document.formhosting.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Su sitio web "+cadena2+"\n\n No termina con .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Por favor escribalo correctamente";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formhosting.website.value.length < 10){
alert("Por favor escriba su sitio web \n www.sunegocio.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No inicie con (-) despus de www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formhosting.website.value.length; z++){
   if (document.formhosting.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.formhosting.website.value.length; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formhosting.website.value.length; z++){
 
if (((document.formhosting.website.value.charCodeAt(z)>1) && (document.formhosting.website.value.charCodeAt(z)<45)) || ((document.formhosting.website.value.charCodeAt(z)>46) && (document.formhosting.website.value.charCodeAt(z)<48)) || ((document.formhosting.website.value.charCodeAt(z)>57) && (document.formhosting.website.value.charCodeAt(z)<65)) || ((document.formhosting.website.value.charCodeAt(z)>90) && (document.formhosting.website.value.charCodeAt(z)<97)) || ((document.formhosting.website.value.charCodeAt(z)>122) && (document.formhosting.website.value.charCodeAt(z)<255))) {
alert("El Sitio web tiene caracteres invalidos");
return false;

  }
}


if ((document.formhosting.website.value == "") || (document.formhosting.website.value == "www.")) {
alert("Por favor escriba su sitio web  \n www.sunegocio.com");
return false;
}


}

////////////////////////////////////////////////////////////////  AQUI INICIA EL LOCAL //////////////////////////////////////////////


if (document.formhosting.tipodedominio.value == "") {
missinginfo += "\n Por favor seleccione su Tipo de Dominio";
alert(missinginfo);
return false;
}



if (document.formhosting.tipodedominio.value == "Local") {


cadena1 = document.formhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Su sitio web no inicia con www.\n   Por favor escriba www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                   nombredeextension = document.formhosting.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Su sitio web "+ cadena1 +"\n\n tiene espacios en blanco";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>3){
           missinginfo += "\n Su sitio web tiene "+ cuenta1 +" puntos\n\n Por favor escriba solamente 3 puntos \n Ej.: www.sunegocio.com.SV ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formhosting.website.value;
if (cadena2 != ""){
        var calculoext = document.formhosting.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }
                 
                     
                          var calculoext = document.formhosting.website.value.length - 7
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                                nombredeextension += document.formhosting.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com.sv") || (nombredeextension == ".org.sv") || (nombredeextension == ".gob.sv")){
                              
                          }  
                           else {
                                 missinginfo += "Su Tipo de Dominio es LOCAL (.SV)\n\n Su sitio web  "+cadena2+"\n\n No termina en .com.sv., .org.sv, .gob.sv \n \n Por favor escribalo correctamente";
                                 alert(missinginfo);
                                 return false;
                                }  
                        
}




if (document.formhosting.website.value.length < 10){
alert("Por favor escriba su sitio web \n www.sunegocio.com.sv");
return false;
}



for (var z=3; z < 5; z++){
if (document.formhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No inicie con (-) despus de www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formhosting.website.value.length; z++){
   if (document.formhosting.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.formhosting.website.value.length; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formhosting.website.value.length; z++){
 
if (((document.formhosting.website.value.charCodeAt(z)>1) && (document.formhosting.website.value.charCodeAt(z)<45)) || ((document.formhosting.website.value.charCodeAt(z)>46) && (document.formhosting.website.value.charCodeAt(z)<48)) || ((document.formhosting.website.value.charCodeAt(z)>57) && (document.formhosting.website.value.charCodeAt(z)<65)) || ((document.formhosting.website.value.charCodeAt(z)>90) && (document.formhosting.website.value.charCodeAt(z)<97)) || ((document.formhosting.website.value.charCodeAt(z)>122) && (document.formhosting.website.value.charCodeAt(z)<255))) {
alert("El Sitio web tiene caracteres invalidos");
return false;

  }
}


if ((document.formhosting.website.value == "") || (document.formhosting.website.value == "www.")) {
alert("Por favor escriba su sitio web  \n www.sunegocio.com");
return false;
}


}


////////////////////////////////////////////////////////////////  AQUI TERMINA EL LOCAL //////////////////////////////////////////////

if (document.formhosting.website.value != document.formhosting.website2.value) {
alert("El Dominio y la Repeticin de Dominio son diferentes \npor favor corrija la escritura");
return false;
}

if (document.formhosting.password.value.length < 6) {
alert("El Password debe tener por lo menos 6 caracteres");
return false;
}


for (var z=0; z < document.formhosting.password.value.length; z++){
 
if (((document.formhosting.password.value.charCodeAt(z)>1) && (document.formhosting.password.value.charCodeAt(z)<48)) || ((document.formhosting.password.value.charCodeAt(z)>57) && (document.formhosting.password.value.charCodeAt(z)<65)) || ((document.formhosting.password.value.charCodeAt(z)>90) && (document.formhosting.password.value.charCodeAt(z)<97)) || ((document.formhosting.password.value.charCodeAt(z)>122) && (document.formhosting.password.value.charCodeAt(z)<255))) {
alert("El Password tiene caracteres invalidos");
return false;

  }
}


if (document.formhosting.password.value != document.formhosting.password2.value) {
alert("El Password y la Repeticin de Password son diferentes \npor favor corrija la escritura");
return false;
}

if (document.formhosting.usodewebsite.value == "") {
alert("Por favor seleccione el uso que le dar al sitio web");
return false;
}


if (document.formhosting.tipodepago.value == "") {
alert("Por favor seleccione el Pago de Servicio");
return false;
}




if (document.formhosting.nombre.value == "") {
alert("Por Favor escriba su Nombre");
return false;
}


if (document.formhosting.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("El Email parece incorrecto (Revise @ y .'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("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 direccin 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 direccin de Email deberia de terminar en un dominio o \n en la abreviatura de un Pas");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direccin de Email no tiene Host!");
return false;
}


if (document.formhosting.email.value != document.formhosting.email2.value) {
alert("El Email y la Repeticin de Email son diferentes \npor favor corrija la escritura");
return false;
}


if (document.formhosting.telefono.value == "") {
alert("Por favor escriba su nmero de Telfono");
return false;
}


 for (var z=0; z < document.formhosting.telefono.value.length; z++){
 
if ((document.formhosting.telefono.value.charCodeAt(z)<48) || (document.formhosting.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9");
return false;

  }
         
}



if (document.formhosting.telefono.value.length == 8) {
numerodetelefono = document.formhosting.telefono.value;
if (numerodetelefono != ""){
     for (var z=0; z < document.formhosting.telefono.value.length; z++){
 
if ((document.formhosting.telefono.value.charCodeAt(z)<48) || (document.formhosting.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9")
return false;

  }
         
}
}
}
else {
         var faltan = 8 - document.formhosting.telefono.value.length;
         var mireelnumero = document.formhosting.telefono.value;
         for (a=0; a<faltan; a++) {
         mireelnumero = mireelnumero+"x";
         }
         alert("El nmero de telfono deberia tener 8 digitos\n Escriba los "+faltan +" nmeros restantes por favor\n                  " + mireelnumero);
          return false;
       }


if (document.formhosting.direccion.value == "") {
alert("Por favor escriba su direccin");
return false;
}


if (document.formhosting.ciudad.value == "") {
alert("Por favor escriba su ciudad");
return false;
}



if (document.formhosting.departamento.value == "") {
alert("Por favor seleccione el departamento donde reside");
return false;
}



if (!document.formhosting.agree.checked) {
    alert("Seleccione SI Acepta las Polticas y Terminos de servicio de la Empresa");
    return false
  }





// If we've gotten this far, everything's valid!
return true;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



function dominiosv(emailStr) {

missinginfo = "";


var paso=0;

if(document.formhosting.servicio.checked) {
   paso=1;
   document.formhosting.tipodeservicio.value="Dominio";
   if (document.formhosting.formadepago.value=="Anual"){
       document.formhosting.costo.value="14.99";
      
   }
}



if(paso==0){
   alert('Por Favor seleccione el Servicio de Dominio Web\nGracias !!! ');
   return false;
   }


cadena1 = document.formhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < 4; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }
                 if (nombredeextension == "www."){
                              
                 }
                  else {
                       missinginfo += "\n Su sitio web no inicia con www.\n   Por favor escriba www. ";
                       alert(missinginfo);
                       return false;
                       }

}


cuenta1 = 0;
cadena1 = document.formhosting.website.value;
if (cadena1 != ""){
        var calculoext = 0;
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                   nombredeextension = document.formhosting.website.value.charAt(x);  
                    if (nombredeextension == " "){
                       missinginfo += "\n Su sitio web "+ cadena1 +"\n\n tiene espacios en blanco";
                       alert(missinginfo);
                       return false;            
                   }  
                    if (nombredeextension == "."){
                       cuenta1 = cuenta1 + 1; 
                   }               
               }
                 
     if (cuenta1>2){
           missinginfo += "\n Su sitio web tiene "+ cuenta1 +" puntos\n\n Por favor escriba solamente 2 puntos \n Ej.: www.sunegocio.com ";
           alert(missinginfo);
           return false;       
     }
}





cadena2 = document.formhosting.website.value;
if (cadena2 != ""){
        var calculoext = document.formhosting.website.value.length - 5
        var nombredeextension = "";   
               for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }
                 if (nombredeextension == ".info"){
                              
                 }
                  else {
                     
                          var calculoext = document.formhosting.website.value.length - 4
                          var nombredeextension = "";   
                          for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                                nombredeextension += document.formhosting.website.value.charAt(x);                
                               } 
                          if ((nombredeextension == ".com") || (nombredeextension == ".net") || (nombredeextension == ".org") || (nombredeextension == ".biz")){
                              
                          }  
                           else { 
                                   var calculoext = document.formhosting.website.value.length - 3
                                   var nombredeextension = "";   
                                   for (var x=calculoext; x < document.formhosting.website.value.length; x++){
                                        nombredeextension += document.formhosting.website.value.charAt(x);                
                                       } 
                                   if ((nombredeextension == ".us") || (nombredeextension == ".ws") || (nombredeextension == ".tv") || (nombredeextension == ".cc") || (nombredeextension == ".de") || (nombredeextension == ".jp") || (nombredeextension == ".be") || (nombredeextension == ".at")){
                              
                                    }  
                                    else {
                                           missinginfo += "\n Su sitio web "+cadena2+"\n\n No termina con .com., .net, .org, .biz, .info, .us,\n .ws, .tv, .cc, .de, .jp, .be, .at \n \n Por favor escribalo correctamente";
                                           alert(missinginfo);
                                           return false;
                                          }  
                        
                                 }
                        }
                        

}



if (document.formhosting.website.value.length < 10){
alert("Por favor escriba su sitio web \n www.sunegocio.com");
return false;
}



for (var z=3; z < 5; z++){
if (document.formhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No inicie con (-) despus de www.");
return false;

  }
}









var guion=0;
var banderadeguion=0;
var guionfinal=0;
for (var z=0; z < document.formhosting.website.value.length; z++){
   if (document.formhosting.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.formhosting.website.value.length; x++){
                   nombredeextension += document.formhosting.website.value.charAt(x);                
               }



for (var z=guionfinal-1; z < guionfinal+1; z++){
if (document.formhosting.website.value.charCodeAt(z)==45) {
alert("Por favor, No escriba  (-) antes de "+nombredeextension);
return false;

  }
}


for (var z=0; z < document.formhosting.website.value.length; z++){
 
if (((document.formhosting.website.value.charCodeAt(z)>1) && (document.formhosting.website.value.charCodeAt(z)<45)) || ((document.formhosting.website.value.charCodeAt(z)>46) && (document.formhosting.website.value.charCodeAt(z)<48)) || ((document.formhosting.website.value.charCodeAt(z)>57) && (document.formhosting.website.value.charCodeAt(z)<65)) || ((document.formhosting.website.value.charCodeAt(z)>90) && (document.formhosting.website.value.charCodeAt(z)<97)) || ((document.formhosting.website.value.charCodeAt(z)>122) && (document.formhosting.website.value.charCodeAt(z)<255))) {
alert("El Sitio web tiene caracteres invalidos");
return false;

  }
}


if ((document.formhosting.website.value == "") || (document.formhosting.website.value == "www.")) {
alert("Por favor escriba su sitio web  \n www.sunegocio.com");
return false;
}



if (document.formhosting.website.value != document.formhosting.website2.value) {
alert("El Dominio y la Repeticin de Dominio son diferentes \npor favor corrija la escritura");
return false;
}



if (document.formhosting.usodewebsite.value == "") {
alert("Por favor seleccione el uso que le dar al sitio web");
return false;
}


if (document.formhosting.tipodepago.value == "") {
alert("Por favor seleccione el Pago de Servicio");
return false;
}




if (document.formhosting.nombre.value == "") {
alert("Por Favor escriba su Nombre");
return false;
}


if (document.formhosting.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("El Email parece incorrecto (Revise @ y .'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("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 direccin 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 direccin de Email deberia de terminar en un dominio o \n en la abreviatura de un Pas");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direccin de Email no tiene Host!");
return false;
}


if (document.formhosting.email.value != document.formhosting.email2.value) {
alert("El Email y la Repeticin de Email son diferentes \npor favor corrija la escritura");
return false;
}


if (document.formhosting.telefono.value == "") {
alert("Por favor escriba su nmero de Telfono");
return false;
}


 for (var z=0; z < document.formhosting.telefono.value.length; z++){
 
if ((document.formhosting.telefono.value.charCodeAt(z)<48) || (document.formhosting.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9");
return false;

  }
         
}



//if (document.formhosting.telefono.value.length == 8) {
//numerodetelefono = document.formhosting.telefono.value;
//if (numerodetelefono != ""){
     //for (var z=0; z < document.formhosting.telefono.value.length; z++){
 
//if ((document.formhosting.telefono.value.charCodeAt(z)<48) || (document.formhosting.telefono.value.charCodeAt(z)>57)) {
//alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9")
//return false;

  //}
         
//}
//}
//}
//else {
         //var faltan = 8 - document.formhosting.telefono.value.length;
         //var mireelnumero = document.formhosting.telefono.value;
         //for (a=0; a<faltan; a++) {
         //mireelnumero = mireelnumero+"x";
         //}
         //alert("El nmero de telfono deberia tener 8 digitos\n Escriba los "+faltan +" nmeros restantes por favor\n                  " + mireelnumero);
          //return false;
       //}


if (document.formhosting.direccion.value == "") {
alert("Por favor escriba su direccin");
return false;
}


if (document.formhosting.ciudad.value == "") {
alert("Por favor escriba su ciudad");
return false;
}



if (document.formhosting.departamento.value == "") {
alert("Por favor seleccione el departamento donde reside");
return false;
}



if (!document.formhosting.agree.checked) {
    alert("Seleccione SI Acepta las Polticas y Terminos de servicio de la Empresa");
    return false
  }




}




////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function soportetecnico(emailStr) {

missinginfo = "";


if ((document.formsoportetecnico.website.value == "") || (document.formsoportetecnico.website.value == "www.")) {
alert("Por Favor escriba su Sitio web");
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 direccin 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 direccin de Email deberia de terminar en un dominio o \n en la abreviatura de un Pas");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direccin de Email no tiene Host!");
return false;
}




if (document.formsoportetecnico.nombre.value == "") {
alert("Por Favor escriba su Nombre");
return false;
}


if (document.formsoportetecnico.apellido.value == "") {
alert("Por Favor escriba su Apellido");
return false;
}




if (document.formsoportetecnico.razondesoporte.value == "") {
alert("Por Favor escriba la razn de Soporte");
return false;
}




// If we've gotten this far, everything's valid!
return true;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function contactenos(emailStr) {

missinginfo = "";



/* 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 direccin 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 direccin de Email deberia de terminar en un dominio o \n en la abreviatura de un Pas");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direccin de Email no tiene Host!");
return false;
}




if (document.formcontactenos.nombre.value == "") {
alert("Por Favor escriba su Nombre");
return false;
}


if (document.formcontactenos.apellido.value == "") {
alert("Por Favor escriba su Apellido");
return false;
}




if (document.formcontactenos.comentariosopreguntas.value == "") {
alert("Por Favor escriba sus comentarios o preguntas");
return false;
}




// If we've gotten this far, everything's valid!
return true;
}





////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function actualizardatospersonales(emailStr) {

missinginfo = "";

if (document.formactualizardatospersonales.nombre.value == "") {
alert("Por Favor escriba su Nombre");
return false;
}


if (document.formactualizardatospersonales.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 direccin 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 direccin de Email deberia de terminar en un dominio o \n en la abreviatura de un Pas");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direccin de Email no tiene Host!");
return false;
}


if (document.formactualizardatospersonales.telefono.value == "") {
alert("Por favor escriba su nmero de Telfono");
return false;
}


 for (var z=0; z < document.formactualizardatospersonales.telefono.value.length; z++){
 
if ((document.formactualizardatospersonales.telefono.value.charCodeAt(z)<48) || (document.formactualizardatospersonales.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9");
return false;

  }
         
}



if (document.formactualizardatospersonales.telefono.value.length == 7) {
numerodetelefono = document.formactualizardatospersonales.telefono.value;
if (numerodetelefono != ""){
     for (var z=0; z < document.formactualizardatospersonales.telefono.value.length; z++){
 
if ((document.formactualizardatospersonales.telefono.value.charCodeAt(z)<48) || (document.formactualizardatospersonales.telefono.value.charCodeAt(z)>57)) {
alert("El nmero de telfono tiene caracteres invalidos\n Por favor escriba solamente numeros del 0-9")
return false;

  }
         
}
}
}
else {
         var faltan = 7 - document.formactualizardatospersonales.telefono.value.length;
         var mireelnumero = document.formactualizardatospersonales.telefono.value;
         for (a=0; a<faltan; a++) {
         mireelnumero = mireelnumero+"x";
         }
         alert("El nmero de telfono deberia tener 7 digitos\n Escriba los "+faltan +" nmeros restantes por favor\n                  " + mireelnumero);
          return false;
       }





if (document.formactualizardatospersonales.direccion.value == "") {
alert("Por Favor escriba su Direccin");
return false;
}

if (document.formactualizardatospersonales.ciudad.value == "") {
alert("Por Favor escriba su Ciudad");
return false;
}

if (document.formactualizardatospersonales.departamento.value == "") {
alert("Por Favor seleccione su Departamento");
return false;
}

if (document.formactualizardatospersonales.password.value == "") {
alert("Por Favor escriba el Password de verificacin");
return false;
}

// If we've gotten this far, everything's valid!
return true;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function actualizarpassworddecuenta() {

missinginfo = "";


if (document.formactualizarpassworddecuenta.password.value == "") {
alert("Por Favor escriba el Password Actual");
return false;
}

if (document.formactualizarpassworddecuenta.nuevopassword.value.length < 6) {
alert("El Nuevo Password debe tener por lo menos 6 caracteres");
return false;
}

for (var z=0; z < document.formactualizarpassworddecuenta.nuevopassword.value.length; z++){
 
if (((document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)>1) && (document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)<48)) || ((document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)>57) && (document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)<65)) || ((document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)>90) && (document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)<97)) || ((document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)>122) && (document.formactualizarpassworddecuenta.nuevopassword.value.charCodeAt(z)<255))) {
alert("El Nuevo Password tiene caracteres invalidos");
return false;

  }
}


if (document.formactualizarpassworddecuenta.nuevopassword.value != document.formactualizarpassworddecuenta.repeticiondepassword.value) {
alert("El Password y la Repeticin de Password son diferentes \npor favor corrija la escritura");
return false;
}

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function actualizarpassworddedominio() {

missinginfo = "";


if (document.formactualizarpassworddedominio.password.value == "") {
alert("Por Favor escriba el Password Actual");
return false;
}

if (document.formactualizarpassworddedominio.nuevopassword.value.length < 6) {
alert("El Nuevo Password debe tener por lo menos 6 caracteres");
return false;
}

for (var z=0; z < document.formactualizarpassworddedominio.nuevopassword.value.length; z++){
 
if (((document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)>1) && (document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)<48)) || ((document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)>57) && (document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)<65)) || ((document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)>90) && (document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)<97)) || ((document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)>122) && (document.formactualizarpassworddedominio.nuevopassword.value.charCodeAt(z)<255))) {
alert("El Nuevo Password tiene caracteres invalidos");
return false;

  }
}


if (document.formactualizarpassworddedominio.nuevopassword.value != document.formactualizarpassworddedominio.repeticiondepassword.value) {
alert("El Password y la Repeticin de Password son diferentes \npor favor corrija la escritura");
return false;
}

}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function salir(){
 location.replace("index.html")
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function piedepagina(){

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym

//document.write('<table bgcolor="ff6633"  width="100%" height="4" cellspacing="0" cellpadding="0" ><td></td></table>');
document.write('<table width="100%"  bgcolor="white"   border="0" cellspacing="0" cellpadding="0" >');
document.write('<tr><td background="http://www.salamancanetwork.com/imagenes/basebg7.gif" height="65" style="font-family:arial;font-size:11px;color:black" align="center" valign="bottom">SALAMANCA NETWORK - Internet Services</td></tr>');
document.write('<tr><td height="34" background="http://www.salamancanetwork.com/imagenes/bg_news_header7.png" align="center" style="font-family:arial;font-size:11px;color:white">Todos los Derechos Reservados, '+ year +'</td></tr></table>');



//document.write('<table width="100%" cellspacing="0" cellpadding="0" style="font-family:tahoma;font-size:11px;color:black;border-style:solid;border-width:3px;border-color:f0f0f0">');
//document.write('<td bgcolor="d0d0d0"><img src="http://www.salamancanetwork.com/imagenes/salamanca_reseller_customer_2.gif" >');
//document.write('</td>');
//document.write('<td width="130" bgcolor="d0d0d0">');
//document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="120" height="75" align="middle">');
//document.write('<param name="movie" value="http://www.salamancanetwork.com/afiliado.swf">');
//document.write('<param name="quality" value="high">');
//document.write('<embed src="http://www.salamancanetwork.com/afiliado.swf" quality="high" width="120" height="75" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
//document.write('</object>');
//document.write('</td>');
//document.write('</table>');

}




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")
}





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
}




/////////////////////////////////////////////////////////////////////////////////////////////////////


function mostrarpromo()
{
    var ranNum= Math.round(Math.random()*2);
    var promo=new Array(3)
     
     promo[0]="promo1a.jpg";
     promo[1]="promo1b.jpg";   
     promo[2]="promo1c.jpg"; 
     promo[3]="nacimiento7.gif";
  
   document.write('<img src="http://www.salamancanetwork.com/imagenes/'+promo[ranNum]+'" vspace="0" hspace="0" align="right">');
  }

/////////////////////////////////////////////////////////////////////////////////////////////////////

function dns(){
document.hosting.dns1.value=document.hosting.domain.value;
document.hosting.dns2.value=document.hosting.domain.value;
}



/////////////////////////////////////////////////////////////////////////////////

// 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(); }

////////////////////////////////////////////////////////////////////////////////////////////
// Loading


var LoaderInstance = function(){
	var overflow='auto';
	var height='auto';
        var rtnObj={},timer=50;


        function _addEvent(obj,evt,fnt,args){
                      if(obj.addEventListener){
                          obj.addEventListener(evt,function(){
                                 fnt.call(this,args);
                          },false);
                      }
                      else if(window.attachEvent){
                                 obj.attachEvent('on'+evt,function(){
                                           fnt.call(this,args);
                                 });
                             }else{
                                           obj['on'+evt]=function(){
                                                     fnt.call(this,args);
                                           };
                                      }
       };


      function _closeLoader(elemName){
              var elem,elemArr=[],op=100,opF=1,stl,bElem=document.getElementsByTagName('BODY')[0],htmlElem=document.getElementsByTagName('HTML')[0];
               function _setStyle(elem,stl,key,val){
                             for(var i=0;i<key.length;i++){
                                   if(typeof stl=='object'){
                                      stl[key[i]]=val[i];
                                   }
                                  else{
                                            if(stl.charAt(stl.length-1)!=';'){stl+=';';}
                                            stl=(stl)?stl+key[i]+':'+val[i]+';':key[i]+':'+val[i]+';';
                                   }
                }
                return stl;
    };

   function _transform(){
             var stl,elemBody;
             for(var i=0;i<elemArr.length;i++){
                    stl=_setStyle(elemArr[i].elemObj,elemArr[i].elemStl,['filter','opacity','-moz-opacity'],['alpha(opacity='+op+')',opF,opF]);elemArr[i].elemObj.setAttribute('style',stl,true);
             }

             if(op>0){op-=10;opF='.'+(op/10)%100;setTimeout(function(){_transform();},timer);}
             else{
                       for(var i=0;i<elemArr.length;i++){elemArr[i].elemObj.parentNode.removeChild(elemArr[i].elemObj);}
                       //htmlElem.style.overflow=bElem.style.overflow=overflow;
                       
                       htmlElem.style.height=bElem.style.height=height;
                       htmlElem.style.height=bElem.style.height=bElem.offsetHeight;
             }
    };

    for(var i=0;i<elemName.length;i++){
                elem=document.getElementById(elemName[i]);
                if(elem){
                                stl=elem.getAttribute('style',true);
                                elemArr=elemArr.concat({elemObj:elem,elemStl:stl});
                }
     }


    if(elemArr.length>0){_transform();}
    else{
             //htmlElem.style.overflow=bElem.style.overflow=overflow;
             htmlElem.style.height=bElem.style.height=height;
             htmlElem.style.height=bElem.style.height=bElem.offsetHeight;
          }
     };rtnObj.closeLoader=_closeLoader;_addEvent(window,'load',function(){rtnObj.closeLoader(['loading-sn','loading']);});return rtnObj;}();








                      

 function loader_sn (){ 
     document.write('<div id="loading-sn" style="display:block" >&#160;</div>');
     document.write('<div id="loading" style="display:block">');
     document.write('<div class="loading-indicator"><img src="imagenes/loading_sn.gif" style="width:16px;height:16px;" alt="" />&#160;Procesando...</div>');
     document.write('</div>');
     var u=navigator.userAgent.toLowerCase(),i=(u.indexOf("opera")==-1 && u.indexOf("msie")>-1);
     function setStyle(id){e=document.getElementById(id);if(e){s=e.getAttribute("style",true);if(typeof s == "object"){s["display"]="block";}else{s="display:block;";} e.setAttribute("style",s,true);}}
     setStyle("loading-sn");
     setStyle("loading");
}

function loader_snscanner (){ 
     document.write('<div id="loading-sn" style="display:block" >&#160;</div>');
     document.write('<div id="loading" style="display:block">');
     document.write('<div class="loading-indicator" width="200"><img src="imagenes/loading_sn.gif" style="width:16px;height:16px;" alt="" />&#160;Identificando ...</div>');
     document.write('</div>');
     var u=navigator.userAgent.toLowerCase(),i=(u.indexOf("opera")==-1 && u.indexOf("msie")>-1);
     function setStyle(id){e=document.getElementById(id);if(e){s=e.getAttribute("style",true);if(typeof s == "object"){s["display"]="block";}else{s="display:block;";} e.setAttribute("style",s,true);}}
     setStyle("loading-sn");
     setStyle("loading");
} 


function doBlink() {
	var blink = document.all.tags('BLINK')
	for (var i=0; i<blink.length; i++)
		blink[i].style.visibility = blink[i].style.visibility == '' ? 'hidden' : '' 
}

function startBlink() {
	if (document.all)
		setInterval('doBlink()',1000)
}
window.onload = startBlink;


/////////////////////////////////////////////////////////////////////////////////////////////////////

document.write('<script language="JavaScript" src="http://www.salamancanetwork.com/style.js"></script>');
document.write('<link rel="stylesheet" href="http://www.salamancanetwork.com/slideshow/slideshow.css"  type="text/css" media="screen"> ');
document.write('<script language="JavaScript" src="http://www.salamancanetwork.com/slideshow/slide.js"></script>');
document.write('<script language="JavaScript" src="http://www.salamancanetwork.com/enunciadodemenu.js"></script>');
document.write('<script language="JavaScript" src="validaciones.js"></script>');





