// JS de configuracion general del site

var v_Nombre      = 'Banco Santander Perú';
var v_Pais        = 'Perú';
var v_Autor       = 'Grupo Santander';
var v_Ano         = '2008';
var v_Email1      = 'eBusiness@santander.com.pe';
var v_Email1a     = 'mailto:' + v_Email1;
var v_Dominio     = 'http://www.santander.com.pe/';
var v_TelCallCenter = '0-800-12600';
var v_characterOK = '0123456789 _abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
var v_characterNumOK = '0123456789';


// Escribe el pie de página
function piePagina(){
	document.writeln('<table cellspacing="0" cellpadding="0" border="0" width="100%">');
	document.writeln('  <tr>');
	document.writeln('    <td align="center" class="letchica">');
	document.writeln('      <span class="footer">');
	document.writeln('      &copy; ' + v_Ano + '. ' + v_Nombre + '. Todos los derechos reservados.<br>');
	document.writeln('      Escríbanos al e-mail: <a class="newlink" href="' + v_Email1a + '"> ' + v_Email1 + '</a>');
	document.writeln('      </span>');
	document.writeln('    </td>');
	document.writeln('  </tr>');
	document.writeln('</table>');
}

// Escribe el Email1
function doConfigMail1(){
	document.writeln(v_Email1);
}

// Escribe el Email1a
function doConfigMail1a(){
	return v_Email1a;
}

// Escribe el Dominio
function doConfigDominio(){
	return v_Dominio;
}

// Escribe el Nombre
function doConfigNombre(){
	return v_Nombre;
}

// Escribe el title
function doConfigTitle(){
	document.writeln('<title>' + v_Nombre + '</title>');
}

// Escribe el TelCallCenter
function doConfigTel(){
	document.writeln(v_TelCallCenter);
}



// OTRAS FUNCIONES
  /*************************************************************/
  /* HoyDia()                                                  */
  /*************************************************************/

  function HoyDia()
  {
    var today = "";

    var now = new Date();
    today = "";

    var year  = now.getYear();
    var month = now.getMonth();
    var date  = now.getDate();
    var day   = now.getDay();

    var dia = new Array(7);
    dia[0] = "Domingo ";
    dia[1] = "Lunes ";
    dia[2] = "Martes ";
    dia[3] = "Miercoles ";
    dia[4] = "Jueves ";
    dia[5] = "Viernes ";
    dia[6] = "Sábado ";

    var mes = new Array(12);
    mes[0] = " Enero";
    mes[1] = " Febrero";
    mes[2] = " Marzo";
    mes[3] = " Abril";
    mes[4] = " Mayo";
    mes[5] = " Junio";
    mes[6] = " Julio";
    mes[7] = " Agosto";
    mes[8] = " Setiembre";
    mes[9] = " Octubre";
    mes[10] = " Noviembre";
    mes[11] = " Diciembre";

    today = dia[day] + date + " de" + mes[month] + ", " + year;

    document.writeln('<td width="231" height="18" background="images/img_borde1a.gif"><font face="Arial" size="1" color="White"><b>');
    document.writeln(today);
    document.writeln('</b></font></td>');

    return;

  }

  /*************************************************************/
  /* strValCar()  Valda los caracteres utilizados              */
  /*************************************************************/
  function strValCar(str) {
  	 return existCharacter(v_characterOK,str);
  }
  

  /*************************************************************/
  /* strValCar()  Valda los caracteres utilizados              */
  /*************************************************************/
  function strValNum(str) {
  	 return existCharacter(v_characterNumOK,str);
  }
  
  
  /*************************************************************/
  /* strValNum()  Valda los caracteres utilizados              */
  /*************************************************************/
  function existCharacter(secuencia, str) {
    var i = 0;
    var j = 0;
    for(str!=null && i==0 ;str.length>i;i++) {
      var caracter1 = str.substring(i,i+1);
      var flag = 0;
      for(j=0;secuencia.length>j;j++) {
        var caracter2 =  secuencia.substring(j,j+1);
        if(caracter1 == caracter2 ){
          flag = 1;
          break;
        }
      }
      if(flag == 0) {
        return false;
      }
    }
  }
