// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
//                    INICIO RUTINA: validar_hhmmss
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
function V00_validar_hhmmss(hora_hhmmss)

{
//*  expreg= /(^\d{1,2})([\:])(\d{1,2})([\:])(\d{2}$)/

  expreg= /(^\d{1,2})([\:])(\d{2,2})([\:])(\d{2,2}$)/


  if (!expreg.test(hora_hhmmss))
    {  alert(' Hora debe tener formato hh:mm:ss ');
       return false;
	       }

  w_hora = expreg.exec(hora_hhmmss)

//alert('w_hora_hhmmss ' + w_hora)
//alert(' 1 hhmmss: ' + w_hora[1])
//alert(' 2 hhmmss: ' + w_hora[2])
//alert(' 3 hhmmss: ' + w_hora[3])
//alert(' 4 hhmmss: ' + w_hora[4])
//alert(' 5 hhmmss: ' + w_hora[5]);
//alert(' org_hhmmss ' + hora_hhmmss);

  if (w_hora[1] > 23 ) 
    {  alert(' error hora: debe ser de 0 a 23 ');
       return false;
    }

  if (w_hora[3] > 59 ) 
    {  alert(' error minutos: debe ser de 0 a 59 ');
       return false;
    }

  if (w_hora[5] > 59 ) 
    {  alert(' error segundos: debe ser de 0 a 59 ');
       return false;
    }

  if ((w_hora[1] == 0 ) && (w_hora[3] == 0) && (w_hora[5] = 0 ))
    {  alert(' Hora debe tener contenido ');
       return false;
    }

return true;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
//                    INICIO RUTINA: validar_hhmmss
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
function V00_validar_mmss(tiempo_mmss)

{
//*  expreg= /(^\d{1,2})([\:])(\d{1,2})([\:])(\d{2}$)/

  expreg= /(^\d{1,2})([\:])(\d{2,2}$)/


  if (!expreg.test(tiempo_mmss))
    {  alert(' Tiempo debe tener formato mm:ss ');
       return false;
       }

  w_hora = expreg.exec(tiempo_mmss)

//alert('w_hora_mmss ' + w_hora)
//alert(' 1 mmss: ' + w_hora[1])
//alert(' 2 mmss: ' + w_hora[2])
//alert(' 3 mmss: ' + w_hora[3]);
//alert(' org_mmss ' + tiempo_mmss);

  if (w_hora[1] > 59 ) 
    {  alert(' error minutos: debe ser de 0 a 59 ');
       return false;
    }

  if (w_hora[3] > 59 ) 
    {  alert(' error segundos: debe ser de 0 a 59 ');
       return false;
    }

  if ((w_hora[1] == 0 ) && (w_hora[3] == 0))
    {  alert(' Tiempo debe tener contenido ');
       return false;
    }

return true;
}