//                      #######     #     #          #     #     #     #     #   #  #####     #
//                      #          # #    #         # #    ##   ##    # #    ##  # #         # #
//                      #######   #   #   #        #   #   # # # #   #   #   # # # #        #   #
//                            #  #######  #       #######  #  #  #  #######  #  ## #       #######
//                      ####### #       # ###### #       # #     # #       # #   #  ##### #       #


function menudebiografia(){
document.write('<table width="100%" cellspacing="0" cellpadding="0"><td>');
document.write('<a href="http://www.pancholara.com/biografia.php?id=1"><img src="images/ebbtcbinsmenu2_0.gif" border="0" align="left" hspace="5"></a>');

document.write('</td></table>')



}

function menudederechosdeautor(){
document.write('<table width="100%" cellspacing="0" cellpadding="0"><td>');
document.write('<a href="http://www.pancholara.com"><img src="imagenes/linkinicio1.gif" border="0" align="left" hspace="5"></a>');
document.write('<a href="biografia.php?id=1"><img src="imagenes/biogra.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="galeria.php?id=1"><img src="imagenes/gale.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="cancionero.php?id=1"><img src="imagenes/cancio.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/enlaces.php"><img src="imagenes/enlace.bmp" border="0" align="left" hspace="5"></a>');
document.write( '<a href=http://www.pancholara.com/reportajes.php?id=1"><img src="imagenes/reportajes.bmp" border="0" align="left" hspace="5"></a>');
//document.write('<a href="http://pancholara.com/guanac@sonline/index.php?PHPSESSID=ecb06532a3a0c5cfa5365cbb7c83ecfb&board=3.0"><img src="imagenes/foro.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/linkparaestudiantes.php?id=1"><img alt="" src="imagenes/link.jpg" border="0"></a>');
document.write('</td></table>')
}


function menudegaleria(){
document.write('<table width="100%" cellspacing="0" cellpadding="0"><td>');
document.write('<a href="http://www.pancholara.com"><img src="imagenes/linkinicio1.gif" border="0" align="left" hspace="5"></a>');
document.write('<a href="biografia.php?id=1"><img src="imagenes/biogra.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="derechosdeautor.html"><img src="imagenes/derecho.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="cancionero.php?id=1"><img src="imagenes/cancio.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/enlaces.php"><img src="imagenes/enlace.bmp" border="0" align="left" hspace="5"></a>');
document.write( '<a href=http://www.pancholara.com/reportajes.php?id=1"><img src="imagenes/reportajes.bmp" border="0" align="left" hspace="5"></a>');
//document.write('<a href="http://pancholara.com/guanac@sonline/index.php?PHPSESSID=ecb06532a3a0c5cfa5365cbb7c83ecfb&board=3.0"><img src="imagenes/foro.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/linkparaestudiantes.php?id=1"><img alt="" src="imagenes/link.jpg" border="0"></a>');
document.write('</td></table>')
}


function menudecancionero(){
document.write('<table width="100%" cellspacing="0" cellpadding="0"><td>');
document.write('<a href="http://www.pancholara.com"><img src="imagenes/linkinicio1.gif" border="0" align="left" hspace="5"></a>');
document.write('<a href="biografia.php?id=1"><img src="imagenes/biogra.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="galeria.php?id=1"><img src="imagenes/gale.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="derechosdeautor.html"><img src="imagenes/derecho.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/enlaces.php"><img src="imagenes/enlace.bmp" border="0" align="left" hspace="5"></a>');
document.write( '<a href=http://www.pancholara.com/reportajes.php?id=1"><img src="imagenes/reportajes.bmp" border="0" align="left" hspace="5"></a>');
//document.write('<a href="http://pancholara.com/guanac@sonline/index.php?PHPSESSID=ecb06532a3a0c5cfa5365cbb7c83ecfb&board=3.0"><img src="imagenes/foro.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/linkparaestudiantes.php?id=1"><img alt="" src="imagenes/link.jpg" border="0"></a>');
document.write('</td></table>')
}

function menudeenlaces(){
document.write('<table width="100%" cellspacing="0" cellpadding="0"><td>');
document.write('<a href="http://www.pancholara.com"><img src="imagenes/linkinicio1.gif" border="0" align="left" hspace="5"></a>');
document.write('<a href="biografia.php?id=1"><img src="imagenes/biogra.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="derechosdeautor.html"><img src="imagenes/derecho.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="galeria.php?id=1"><img src="imagenes/gale.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="cancionero.php?id=1"><img src="imagenes/cancio.bmp" border="0" align="left" hspace="5"></a>');
document.write( '<a href=http://www.pancholara.com/reportajes.php?id=1"><img src="imagenes/reportajes.bmp" border="0" align="left" hspace="5"></a>');
//document.write('<a href="http://pancholara.com/guanac@sonline/index.php?PHPSESSID=ecb06532a3a0c5cfa5365cbb7c83ecfb&board=3.0"><img src="imagenes/foro.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/linkparaestudiantes.php?id=1"><img alt="" src="imagenes/link.jpg" border="0"></a>');
document.write('</td></table>')
}
function menudereportajes(){
document.write('<table width="100%" cellspacing="0" cellpadding="0"><td>');
document.write('<a href="http://www.pancholara.com"><img src="imagenes/linkinicio1.gif" border="0" align="left" hspace="5"></a>');
document.write('<a href="biografia.php?id=1"><img src="imagenes/biogra.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="derechosdeautor.html"><img src="imagenes/derecho.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="galeria.php?id=1"><img src="imagenes/gale.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="cancionero.php?id=1"><img src="imagenes/cancio.bmp" border="0" align="left" hspace="5"></a>');
//document.write('<a href="http://pancholara.com/guanac@sonline/index.php?PHPSESSID=ecb06532a3a0c5cfa5365cbb7c83ecfb&board=3.0"><img src="imagenes/foro.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="http://www.pancholara.com/linkparaestudiantes.php?id=1"><img alt="" src="imagenes/link.jpg" border="0"></a>');
document.write('</td></table>')
}
function menudelinks(){
document.write('<table width="100%" cellspacing="0" cellpadding="0"><td>');
document.write('<a href="http://www.pancholara.com"><img src="imagenes/linkinicio1.gif" border="0" align="left" hspace="5"></a>');
document.write('<a href="biografia.php?id=1"><img src="imagenes/biogra.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="derechosdeautor.html"><img src="imagenes/derecho.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="galeria.php?id=1"><img src="imagenes/gale.bmp" border="0" align="left" hspace="5"></a>');
document.write('<a href="cancionero.php?id=1"><img src="imagenes/cancio.bmp" border="0" align="left" hspace="5"></a>');
document.write( '<a href=http://www.pancholara.com/reportajes.php?id=1"><img src="imagenes/reportajes.bmp" border="0" align="left" hspace="5"></a>');
//document.write('<a href="http://pancholara.com/guanac@sonline/index.php?PHPSESSID=ecb06532a3a0c5cfa5365cbb7c83ecfb&board=3.0"><img src="imagenes/foro.bmp" border="0" align="left" hspace="5"></a>');

document.write('</td></table>')
}
function piedepagina(){
document.write('<center>')
document.write('<table width="100%" cellspacing="0" cellpadding="0" style="font-family:verdana;font-size:10px;color:white;font-weight:bold"><td align="center">')
document.write('<table bgcolor="red" width="100%" height="1" cellspacing="0" cellpadding="0"><td></td></table>');
document.write('<br>Todos los derechos reservados, el uso de la informaci&oacute;n contenida en esta p&aacute;gina, para fines de lucro y/o sin autorizaci&oacute;n expresa por su autor sera penado por la ley, ya que esta protegido por la Ley de Derechos de Autor de El Salvador, aplicable internacionalmente, el numero de registro en el Centro Nacional de Registro de El Salvador es 265-2005</font><br><br>')
document.write('</td></table>')
document.write('</center>')
}

function piedepagina2(){
document.write('<center>')
document.write('<table width="100%" cellspacing="0" cellpadding="0" style="font-family:verdana;font-size:10px;color:white;font-weight:bold"><td align="center">')
document.write('<table bgcolor="ff6633" width="500" height="1" cellspacing="0" cellpadding="0"><td></td></table>');
document.write('<br>Todos los derechos reservados, el uso de la informaci&oacute;n contenida en esta p&aacute;gina, para fines de lucro y/o sin autorizaci&oacute;n expresa por su autora sera penado por la ley, ya que esta protegido por la Ley de Derechos de Autor de El Salvador,aplicable internacionalmente, el numero de registro en el Centro Nacional de Registro de El Salvador es 265-2005<br></font><br>')
document.write('</td></table>')
document.write('</center>')
}

function cerrarventana(){
window.close();
}

////////////////////////////////// ABRIR FUENTE   /////////////////////////////////////////
function abrirfuente(){
                
       salamancabot = prompt("Tipo de Letra? (Arial, Verdana, etc. dejelo vacio para ninguna)",'');        
       if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<font ";
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "face=" + salamancabot + " ";
                
                
                salamancabot = prompt("Tama&#65533; de Letra? (1,2,3,etc. dejelo vacio para ninguno)",'');                
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "size=" + salamancabot + " ";
                }
                
                salamancabot = prompt("Color de Letra? (En Ingles black,red,blue,etc. vacio para ninguno)",'');
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "color=" + salamancabot + "";
                }
                                                
                document.guestbook.mensaje.value = document.guestbook.mensaje.value + ">\n";
        }

        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "Escriba Aqui su Texto\n</font>\n";
        
}



//////////////////////////////////////// IMAGENES  /////////////////////////////////////////////
function imagenes(){
    
       salamancabot = prompt("Escriba el lugar en donde esta guardada la imagen y el nombre\n sin olvidar la extensi&#65533; .jpg o .gif",'');
       if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<img  ";
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "src=" + salamancabot + " ";
                

                
                salamancabot = prompt("Ancho? (dejelo vacio para mostrarla de tama&#65533; original)",'');        
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "width=" + salamancabot + " ";
                }
                
                salamancabot = prompt("Alto? (dejelo vacio para mostrarla de tama&#65533; original)",'');                
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "height=" + salamancabot + " ";
                }
                

                salamancabot = prompt("Alineaci&#65533;? Posici&#65533; en la que se coloca la imagen\nleft=izquierda, right=derecha, top=arriba, middle=Medio, bottom=abajo\ndejelo vacio si lo desea sin alineaci&#65533;",'');                
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "align=" + salamancabot + " ";
                }

                salamancabot = prompt("Espacio vertical? Pixeles verticales en la que\n todo objeto es separado de forma vertical de la imagen\n0,1,2,3, etc. dejelo vacio sino desea esta opci&#65533;",'');                
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "vspace=" + salamancabot + " ";
                }

                salamancabot = prompt("Espacio Horizontal? Pixeles horizontales en la que\n todo objeto es separado de forma horizontal de la imagen\n0,1,2,3, etc. dejelo vacio sino desea esta opci&#65533;",'');                
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "hspace=" + salamancabot + " ";
                }
                

                salamancabot = prompt("Mensaje al Poner mouse sobre la imagen? (dejelo vacio para no mostrar ningun mensaje)",'');
                if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "alt=" + salamancabot + "";
                }
                                                
                document.guestbook.mensaje.value = document.guestbook.mensaje.value + " border=\"0\">\n";

           }

        }

//////////////////////////////////////// NEGRITA   ///////////////////////////////////////////////
function negrita() {
                   salamancabot = prompt("Escriba el Texto que desea poner en Negrita",'');
                   if (salamancabot != null && salamancabot != ""){
                       document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<b>" + salamancabot + "</b>\n";
                   }
       
}

///////////////////////////////////////// ITALICA //////////////////////////////////////////////
function italica() {
                   salamancabot = prompt("Escriba el Texto que desea poner en Italica",'');
                   if (salamancabot != null && salamancabot != ""){
                       document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<i>" + salamancabot + "</i>\n";
                   }
        
}

//////////////////////////////////////// SUBRAYAR ///////////////////////////////////////////////
function subrayado(){
                     salamancabot = prompt("Escriba el Texto que desea Subrayar",'');
                     if (salamancabot != null && salamancabot != ""){
                         document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<u>" + salamancabot + "</u>\n";
                    }
}

////////////////////////////////////// CENTRADO //////////////////////////////////////////////////
function centrar(){
                  salamancabot = prompt("Escriba el Texto que desea Centrar",'');
                  if (salamancabot != null && salamancabot != ""){
                      document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<center>" + salamancabot + "</center>\n";
                }
}


//////////////////////////////////  BARRA HORIZONTAL /////////////////////////////////////////////
function lh(){
               document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<hr>\n";
}


////////////////////////////////// SALTO DE LINEA   ///////////////////////////////////////////////////
function saltodelinea(){
                         document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<br>\n";
}

//////////////////////////////////// SALTO DE PARRAFO /////////////////////////////////////////////////
function saltodeparrafo(){
                           document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<p>\n";
}


/////////////////////////////////// CREAR LINK /////////////////////////////////////////////////////////
function crearlink(){
    
       salamancabot = prompt("Escriba el sitio web. \nPor favor incluya http:// ",'');
       if (salamancabot != "" && salamancabot != null){
                        salamancabot = '"' + salamancabot + '"';
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<a ";
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "href=" + salamancabot + " ";
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + " target=new>";

                
                
                salamancabot = prompt("Texto que desea mostrar en el link?  (No lo deje vacio ya que no funcionara el link)",'');                
                if (salamancabot != "" && salamancabot != null){
                    document.guestbook.mensaje.value = document.guestbook.mensaje.value + salamancabot + "";
                }
                

                                                
                document.guestbook.mensaje.value = document.guestbook.mensaje.value + "</a>\n";

           }

        }

///////////////////////////////////// LISTA ORDENADA ///////////////////////////////////////////////////
function listaordenada(){
                     
                chequeo=0;

                for(i=1;;i++){
                        chequeo = chequeo + 1;
                        salamancabot = prompt("Valor " + i + "? (Dejelo en Blanco para cerrar la lista)",'');
                        if (salamancabot == "" || salamancabot == null){
                                break;
                        }
                        if (i == 1){
                                document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<ol>\n";
                                delfin = 1;
                        }
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<li>" + salamancabot + "\n";
                }

                if (chequeo == 1){
               
                }
                 else {
                          document.guestbook.mensaje.value = document.guestbook.mensaje.value + "</ol>\n";
                      }
      
}


/////////////////////////////////// LISTA SIN ORDEN //////////////////////////////////////////////////////
function listasinorden(){
               
                chequeo=0;        

                for(i=1;;i++){
                        chequeo = chequeo + 1;
                        salamancabot = prompt("Valor " + i + "? (Dejelo en Blanco para cerrar la lista)",'');
                        if (salamancabot == "" || salamancabot == null){
                                break;
                        }
                        if (i == 1){
                                document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<ul>\n";
                                delfin = 1;
                        }
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "<li>" + salamancabot + "\n";
                }
              
                if (chequeo == 1){
               
                }
                 else {
                        document.guestbook.mensaje.value = document.guestbook.mensaje.value + "</ul>\n";
                      }
       
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

function verificarfirma(emailStr){


/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

alert("Por Favor escriba su Email");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("El Nombre del usuario tiene caracteres incorrectos en el Email.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("El Dominio del Email tiene Caracteres Invalidos.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("El nombre del Usuario del Email parece Incorrecto.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destinacion de direcci&#65533; IP es invalida!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("El nombre del dominio en Email parece ser no valido.");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("La direcci&#65533; de Email deberia de terminar en un dominio o \n en la abreviatura de un Pa&#65533;");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("La direcci&#65533; de Email no tiene Host!");
return false;
}

if (document.guestbook.nombre.value == ""){
alert("Por favor escriba su Nombre");
return false;
}

if (document.guestbook.apellido.value == ""){
alert("Por favor escriba su Apellido");
return false;
}


if (document.guestbook.mensaje.value == ""){
alert("Por favor escriba su Mensaje");
return false;
}

// If we've gotten this far, everything's valid!
return true;

}