<!--

function validarParametrizacion()
{


if(((trim(document.frmValidation.desde1.value) != "" ) && (trim(document.frmValidation.hasta1.value) != "" ) && (trim(document.frmValidation.tasa1.value) == "" )) ||
((trim(document.frmValidation.desde1.value) != "" ) && (trim(document.frmValidation.hasta1.value) == "" ) && (trim(document.frmValidation.tasa1.value) != "" )) ||
((trim(document.frmValidation.desde1.value) == "" ) && (trim(document.frmValidation.hasta1.value) != "" ) && (trim(document.frmValidation.tasa1.value) != "" )))  {
    alert("Los datos están incompletos");
    return false;
    }
    
    if(((trim(document.frmValidation.desde2.value) != "" ) && (trim(document.frmValidation.hasta2.value) != "" ) && (trim(document.frmValidation.tasa2.value) == "" )) ||
((trim(document.frmValidation.desde2.value) != "" ) && (trim(document.frmValidation.hasta2.value) == "" ) && (trim(document.frmValidation.tasa2.value) != "" )) ||
((trim(document.frmValidation.desde2.value) == "" ) && (trim(document.frmValidation.hasta2.value) != "" ) && (trim(document.frmValidation.tasa2.value) != "" )))  {
    alert("Los datos están incompletos");
    return false;
    }
  else if(((trim(document.frmValidation.desde3.value) != "" ) && (trim(document.frmValidation.hasta3.value) != "" ) && (trim(document.frmValidation.tasa3.value) == "" )) ||
    ((trim(document.frmValidation.desde3.value) != "" ) && (trim(document.frmValidation.hasta3.value) == "" ) && (trim(document.frmValidation.tasa3.value) != "" )) ||
    ((trim(document.frmValidation.desde3.value) == "" ) && (trim(document.frmValidation.hasta3.value) != "" )&& (trim(document.frmValidation.tasa3.value) != "" ))) 
  {
    alert("Los datos están incompletos");
    return false;
  }
    
    else if(((trim(document.frmValidation.desde4.value) != "" ) && (trim(document.frmValidation.hasta4.value) != "" ) && (trim(document.frmValidation.tasa4.value) == "" )) ||
    ((trim(document.frmValidation.desde4.value) != "" ) && (trim(document.frmValidation.hasta4.value) == "" ) && (trim(document.frmValidation.tasa4.value) != "" )) ||
    ((trim(document.frmValidation.desde4.value) == "" ) && (trim(document.frmValidation.hasta4.value) != "" ) && (trim(document.frmValidation.tasa4.value) != "" ))) 
  {
    alert("Los datos están incompletos");
    return false;
    }
  else if(((trim(document.frmValidation.desde5.value) != "" ) && (trim(document.frmValidation.hasta5.value) != "" ) && (trim(document.frmValidation.tasa5.value) == "" )) ||
    ((trim(document.frmValidation.desde5.value) != "" ) && (trim(document.frmValidation.hasta5.value) == "" ) && (trim(document.frmValidation.tasa5.value) != "" )) ||
    ((trim(document.frmValidation.desde5.value) == "" ) && (trim(document.frmValidation.hasta5.value) != "" ) && (trim(document.frmValidation.tasa5.value) != "" ))) 
  {
    alert("Los datos están incompletos");
     return false;
    }
   else if(((trim(document.frmValidation.desde6.value) != "" ) && (trim(document.frmValidation.hasta6.value) != "" ) && (trim(document.frmValidation.tasa6.value) == "" )) ||
    ((trim(document.frmValidation.desde6.value) != "" ) && (trim(document.frmValidation.hasta6.value) == "" ) && (trim(document.frmValidation.tasa6.value) != "" )) ||
    ((trim(document.frmValidation.desde6.value) == "" ) && (trim(document.frmValidation.hasta6.value) != "" ) && (trim(document.frmValidation.tasa6.value) != "" ))) 
  {
    alert("Los datos están incompletos");
    return false;
    }
    else if(((trim(document.frmValidation.desde7.value) != "" ) && (trim(document.frmValidation.hasta7.value) != "" ) && (trim(document.frmValidation.tasa7.value) == "" )) ||
    ((trim(document.frmValidation.desde7.value) != "" ) && (trim(document.frmValidation.hasta7.value) == "" ) && (trim(document.frmValidation.tasa7.value) != "" )) ||
    ((trim(document.frmValidation.desde7.value) == "" ) && (trim(document.frmValidation.hasta7.value) != "" ) && (trim(document.frmValidation.tasa7.value) != "" ))) 
  {
    alert("Los datos están incompletos");
    return false;
    }
    
    else if(trim(document.frmValidation.desde2.value)!="")
  {
  alert("Entro a la validacion");
  var checkStr=document.frmValidation.desde2.value;
  var checkOK = "0123456789";
        var allValid = true; 
        for (i = 0; i < checkStr.length; i++)
		    {
          ch = checkStr.charAt(i); 
          for (j = 0; j < checkOK.length; j++)
           if (ch == checkOK.charAt(j))
          break;
           if (j == checkOK.length)
           { 
            allValid = false; 
            break; 
           }
	      }
     if (!allValid)
     { 
      alert("Los valores deben ser numerico");
      document.frmValidation.desde2.focus();
      return (false); 
     }
    
  }  
    
    else{
       document.frmValidation.submit();
       return true;
     }
}

function validar()
{
if((trim(document.frmSimuCdat.txtValor.value)=="" ))
  {
    alert("Por favor ingrese el valor del Cdat´s.");
    document.frmSimuCdat.txtValor.focus();
    document.frmSimuCdat.txtValor.select();
    return false;
  } else if(trim(document.frmSimuCdat.txtValor.value)!="")
  {
  var checkStr=document.frmSimuCdat.txtValor.value;
  var checkOK = "0123456789";
        var allValid = true; 
        for (i = 0; i < checkStr.length; i++)
		    {
          ch = checkStr.charAt(i); 
          for (j = 0; j < checkOK.length; j++)
           if (ch == checkOK.charAt(j))
          break;
           if (j == checkOK.length)
           { 
            allValid = false; 
            break; 
           }
	      }
     if (!allValid)
     { 
      alert("El Valor del Cdat`s debe ser numerico");
      document.frmSimuCdat.txtValor.focus();
      return (false); 
     }
  else if((trim(document.frmSimuCdat.txtPlazo.value)=="" ))
  {
    alert("Por favor ingrese el plazo del Cdat´s.");
    document.frmSimuCdat.txtPlazo.focus();
    document.frmSimuCdat.txtPlazo.select();
    return false;
  } else if(trim(document.frmSimuCdat.txtPlazo.value)!="")
  {
  var checkStr=document.frmSimuCdat.txtPlazo.value;
  var checkOK = "0123456789";
        var allValid = true; 
        for (i = 0; i < checkStr.length; i++)
		    {
          ch = checkStr.charAt(i); 
          for (j = 0; j < checkOK.length; j++)
           if (ch == checkOK.charAt(j))
          break;
           if (j == checkOK.length)
           { 
            allValid = false; 
            break; 
           }
	      }
     if (!allValid)
     { 
      alert("El Plazo del Cdat`s debe ser numerico");
      document.frmSimuCdat.txtPlazo.focus();
      return (false); 
     }
  else if((trim(document.frmSimuCdat.cmbTasaInt.value)=="#"))
  {
    alert("Por favor escoger el Tipo de Interes del Cdat´s.");
    document.frmSimuCdat.cmbTasaInt.focus();
    document.frmSimuCdat.cmbTasaInt.select();
    return false;
  }/* else if((trim(document.frmSimuCdat.cmbPerPago.value)=="#"))
  {
    alert("Por favor escoger la Periodicidad de Pago del Cdat´s.");
    document.frmSimuCdat.cmbPerPago.focus();
    document.frmSimuCdat.cmbPerPago.select();
    return false;
  }*/ else if((trim(document.frmSimuCdat.cmbMod.value)=="#"))
  {
    alert("Por favor escoger la Modalidad del Cdat´s.");
    document.frmSimuCdat.cmbMod.focus();
    document.frmSimuCdat.cmbMod.select();
    return false;
  } else if(trim(document.frmSimuCdat.cmbTasaInt.value)=="1")
  {
      if((trim(document.frmSimuCdat.txtTipoInt.value)=="" ))
      {
        alert("Por favor ingrese la tasa del Cdat´s.");
        document.frmSimuCdat.txtTipoInt.focus();
        document.frmSimuCdat.txtTipoInt.select();
        return false;
      } 
      else if(trim(document.frmSimuCdat.txtTipoInt.value)!="")
      {
      var checkStr=document.frmSimuCdat.txtTipoInt.value;
      var checkOK = "0123456789.";
            var allValid = true; 
            for (i = 0; i < checkStr.length; i++)
            {
              ch = checkStr.charAt(i); 
              for (j = 0; j < checkOK.length; j++)
               if (ch == checkOK.charAt(j))
              break;
               if (j == checkOK.length)
               { 
                allValid = false; 
                break; 
               }
            }
         if (!allValid)
         { 
          alert("La tasa del Cdat`s debe ser numerico");
          document.frmSimuCdat.txtTipoInt.focus();
          return (false); 
         }
      else if((trim(document.frmSimuCdat.cmbTipoTasa.value)=="#"))
      {
        alert("Por favor escoger la Tasa/Historico del Cdat´s.");
        document.frmSimuCdat.cmbTipoTasa.focus();
        document.frmSimuCdat.cmbTipoTasa.select();
        return false;
      }else{
       document.frmSimuCdat.submit();
       return true;
     }
     }
  } 
  else if(trim(document.frmSimuCdat.cmbTasaInt.value)=="2")
  {
      if((trim(document.frmSimuCdat.txtDesv.value)=="" ))
      {
        alert("Por favor ingrese la desviación del Cdat´s.");
        document.frmSimuCdat.txtDesv.focus();
        document.frmSimuCdat.txtDesv.select();
        return false;
      } 
      else if(trim(document.frmSimuCdat.txtDesv.value)!="")
      {
      var checkStr=document.frmSimuCdat.txtDesv.value;
      var checkOK = "0123456789.";
            var allValid = true; 
            for (i = 0; i < checkStr.length; i++)
            {
              ch = checkStr.charAt(i); 
              for (j = 0; j < checkOK.length; j++)
               if (ch == checkOK.charAt(j))
              break;
               if (j == checkOK.length)
               { 
                allValid = false; 
                break; 
               }
            }
         if (!allValid)
         { 
          alert("La Desviación del Cdat`s debe ser numerico");
          document.frmSimuCdat.txtDesv.focus();
          return (false); 
         }
   /*   else if((trim(document.frmSimuCdat.cmbPer.value)=="#"))
      {
        alert("Por favor escoger la Periocidad de Pago del Cdat´s.");
        document.frmSimuCdat.cmbPerPago.focus();
        document.frmSimuCdat.cmbPerPago.select();
        return false;
      }else if((trim(document.frmSimuCdat.cmbPer.value)=="#"))
      {
        alert("Por favor escoger el Periodo del Cdat´s.");
        document.frmSimuCdat.cmbPerPago.focus();
        document.frmSimuCdat.cmbPerPago.select();
        return false;
      }*/ else if((trim(document.frmSimuCdat.cmbTipoTasa.value)=="#"))
      {
        alert("Por favor escoger la Tasa/Historico del Cdat´s.");
        document.frmSimuCdat.cmbTipoTasa.focus();
        document.frmSimuCdat.cmbTipoTasa.select();
        return false;
      }else{
       document.frmSimuCdat.submit();
       return true;
       
       }
       }
     }
    }
  }
  else
  {
    document.frmSimuCdat.submit();
    return true;
  }

}

function validarLigth()
{
if((trim(document.frmSimuCdat.txtValor.value)=="" ))
  {
    alert("Por favor ingrese el valor del Cdat´s.");
    document.frmSimuCdat.txtValor.focus();
    document.frmSimuCdat.txtValor.select();
    return false;
  } 
  else if(trim(document.frmSimuCdat.txtValor.value)!="")
  {
  var checkStr=document.frmSimuCdat.txtValor.value;
  var checkOK = "0123456789";
        var allValid = true; 
        for (i = 0; i < checkStr.length; i++)
		    {
          ch = checkStr.charAt(i); 
          for (j = 0; j < checkOK.length; j++)
           if (ch == checkOK.charAt(j))
          break;
           if (j == checkOK.length)
           { 
            allValid = false; 
            break; 
           }
	      }
     if (!allValid)
     { 
      alert("El Valor del Cdat`s debe ser numerico");
      document.frmSimuCdat.txtValor.focus();
      return (false); 
     }
    }
  else if((trim(document.frmSimuCdat.txtPlazo.value)=="" ))
  {
    alert("Por favor ingrese el plazo del Cdat´s.");
    document.frmSimuCdat.txtPlazo.focus();
    document.frmSimuCdat.txtPlazo.select();
    return false;
  } 
  else if(trim(document.frmSimuCdat.txtPlazo.value)!="")
  {
  var checkStr=document.frmSimuCdat.txtPlazo.value;
  var checkOK = "0123456789";
        var allValid = true; 
        for (i = 0; i < checkStr.length; i++)
		    {
          ch = checkStr.charAt(i); 
          for (j = 0; j < checkOK.length; j++)
           if (ch == checkOK.charAt(j))
          break;
           if (j == checkOK.length)
           { 
            allValid = false; 
            break; 
           }
	      }
     if (!allValid)
     { 
      alert("El Plazo del Cdat`s debe ser numerico");
      document.frmSimuCdat.txtPlazo.focus();
      return (false); 
     }
    } 
  
  else
  {
    document.frmSimuCdat.submit();
    return true;
  }
    document.frmSimuCdat.submit();
    return true;
}


function cargarProd()
{
opc=document.frmSimuCdat.cmbTasaInt.value;
iOpc=opc;
var to=document.frmSimuCdat.cmbTipoTasa;
removeAll(to);
if(opc==2)
  {	
    document.frmSimuCdat.cmbTipoTasa.disabled = false;
    document.frmSimuCdat.cmbPerPago.disabled = false;
    document.frmSimuCdat.cmbPer.disabled = false;
    document.frmSimuCdat.txtDesv.disabled = false;
    document.frmSimuCdat.txtTipoInt.disabled = true;
    document.frmSimuCdat.txtDesv.value= document.frmSimuCdat.txtTipoInt.value;
    
    for(var i=0; i<sTHist.length; i++) 
    { to.options[to.options.length] = new Option( sTHist[i] , sCodTHist[i], false, false);}
  }
else if(opc==1)
  {	
    document.frmSimuCdat.txtDesv.disabled = true;
    document.frmSimuCdat.cmbPer.disabled = true;
    document.frmSimuCdat.cmbTipoTasa.disabled = false;
    document.frmSimuCdat.txtTipoInt.disabled = false;
    
    for(var i=0; i<sTFijo.length; i++) 
    { to.options[to.options.length] = new Option( sTFijo[i] , sCodTFijo[i], false, false);}
  } else if(opc==3)
  {	
    document.frmSimuCdat.cmbTipoTasa.disabled = true;
    document.frmSimuCdat.cmbPer.disabled = true;
    document.frmSimuCdat.txtDesv.disabled = true;
    document.frmSimuCdat.txtTipoInt.disabled = true;
  }
  return true;
}

function cargarProdLigth()
{
	
    document.frmSimuCdat.txtTipoInt.value = nTasa;
    document.frmSimuCdat.txtDesv.value = nDesv;
    //document.frmSimuCdat.txtDesv.value= document.frmSimuCdat.txtTipoInt.value;
  

  return true;
}

function ValidarClaveCdat()
{
if((document.frmDepositos.txtLogin.value)=="")
  { alert("Por favor ingrese su identificación.");
    document.frmDepositos.txtLogin.focus();
    return false;  }
else if((document.frmDepositos.txtClave.value)=="")
  { alert("Por favor ingrese su contraseńa.");
    document.frmDepositos.txtClave.focus();
    return false;  }

else if(document.frmDepositos.txtClave.value.length <4)
{ alert("La Contraseńa debe contener minimo4 digitos");
    document.frmDepositos.txtClave.focus();
    return false;  }
else if(document.frmDepositos.txtClave.value.length != 4)
{ alert("La Contraseńa debe contener 4 digitos");
    document.frmDepositos.txtClave.focus();
    return false;  }
else
  { document.body.style.cursor='wait';
    document.frmDepositos.submit();
    return true;  
    }
  document.frmDepositos.submit();
}


function pintaFecha() 
        {
            var fecha = new Date();
            var dia_letra = fecha.getDay();
            var dia = fecha.getDate();
            var mes = fecha.getMonth();
            var anyo = fecha.getFullYear();

            switch(dia_letra) 
            {
                case 0: 
                    dia_letra = "Domingo"; 
                    break;
                case 1: 
                    dia_letra = "Lunes"; 
                    break;
                case 2: 
                    dia_letra = "Martes"; 
                    break;
                case 3: 
                    dia_letra = "Miércoles"; 
                    break;
                case 4: 
                    dia_letra = "Jueves"; 
                    break;
                case 5: 
                    dia_letra = "Viernes"; 
                    break;
                case 6: 
                    dia_letra = "Sábado"; 
                    break;
                default: 
                    dia_letra = "Domingo"; 
                    break;
            }
            switch(mes) 
            {
                case 0: 
                    mes = "Enero"; 
                    break;
                case 1: 
                    mes = "Febrero"; 
                    break;
                case 2: 
                    mes = "Marzo"; 
                    break;
                case 3: 
                    mes = "Abril"; 
                    break;
                case 4: 
                    mes = "Mayo"; 
                    break;
                case 5: 
                    mes = "Junio"; 
                    break;
                case 6: 
                    mes = "Julio";
                    break;
                case 7: 
                    mes = "Agosto"; 
                    break;
                case 8: 
                    mes = "Septiembre"; 
                    break;
                case 9: 
                    mes = "Octubre"; 
                    break;
                case 10: 
                    mes = "Noviembre"; 
                    break;
                case 11: 
                    mes = "Diciembre";
                    break;
                default: 
                    mes = ""; 
                    break;
            }
            mifecha=dia_letra+", "+dia+" de "+mes+" de "+anyo;
            
        }
// --> 