function ddBotonOpen(IdentLI,IdentBO,Cont){
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-CE'); if (MyBOTON) MyBOTON.className = 'CE-ON';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-CV'); if (MyBOTON) MyBOTON.className = 'CV-ON';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-LE'); if (MyBOTON) MyBOTON.className = 'LE-ON';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-RI'); if (MyBOTON) MyBOTON.className = 'RI-ON';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont);       if (MyBOTON) MyBOTON.className = 'ON';
  MyLISTA = document.getElementById(IdentLI+'-'+Cont);       if (MyLISTA) MyLISTA.style.visibility = "visible";
}
function ddBotonClose(IdentLI,IdentBO,Cont){
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-CE'); if (MyBOTON) MyBOTON.className = 'CE-OFF';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-CV'); if (MyBOTON) MyBOTON.className = 'CV-OFF';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-LE'); if (MyBOTON) MyBOTON.className = 'LE-OFF';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont+'-RI'); if (MyBOTON) MyBOTON.className = 'RI-OFF';
  MyBOTON = document.getElementById(IdentBO+'-'+Cont);       if (MyBOTON) MyBOTON.className = 'OFF';
  MyLISTA = document.getElementById(IdentLI+'-'+Cont);       if (MyLISTA) MyLISTA.style.visibility = "hidden";
}

// Componente Usuarios
function ChequearErrorLogin(Boton) {
  var Form = document.FormLogin;
  if (VerificarUnCampo(Form.USUARIO,'==','','Falta ingresar su Nombre de Usuario')) return false;
  if (VerificarUnCampo(Form.PASSWORD,'==','','Falta ingresar su Contraseña')) return false;
  Form.onsubmit = function() {Boton.disabled = true; Boton.onmouseout = ''; Boton.className = 'BOTON ON';};
  return true;
}
function onLoadFormLogin() {
  var f = document.getElementById('FormLogin');
  if (f) {
    var q = f.USUARIO;
    var p = f.PASSWORD;
    q.onblur = function() { q.className = (q.value)?'LLENO':''; p.className = (p.value)?'LLENO':'';};
    q.onfocus = function() { q.className = 'OVER'; p.className = 'OVER';};
    p.onblur = function() { p.className = (p.value)?'LLENO':''; };
    p.onfocus = function() { p.className = 'OVER'; };
    if (q.value != '') { q.className = 'LLENO'; p.className = 'LLENO';};
  }
}

// Componente Buscador
function ChequearErrorBuscador(Boton) {
  var Form = document.FormBuscador;
  if (VerificarUnCampo(Form.BuscaCadena,'==','','Falta ingresar el texto de búsqueda')) return false;
  Form.Cadena.value = Form.BuscaCadena.value;
  Form.onsubmit = function() {Boton.disabled = true; Boton.onmouseout = ''; Boton.className = 'BOTON ON';};
  return true;
}
function onLoadFormBuscador() {
  var f = document.getElementById('FormBuscador');
  if (f) {
    var bc = f.BuscaCadena;
    bc.onblur = function() { bc.className = (bc.value)?'LLENO':''; };
    bc.onfocus = function() { bc.className = 'OVER'; };
    if (bc.value != '') { bc.className = 'LLENO'; };
  }
}

// Componente CuandoNace
function ChequearErrorCuandoNace(Boton) {
  var Form = document.FormCuandoNace;
  if (VerificarUnCampo(Form.DD,'==','','Falta ingresar el Día')) return false;
  if (VerificarEntero(Form.DD,1,31,'El Día es incorrecto')) return false;
  if (VerificarUnCampo(Form.MM,'==','','Falta ingresar el Mes')) return false;
  if (VerificarEntero(Form.MM,1,12,'El Mes es incorrecto')) return false;
  if (VerificarUnCampo(Form.AA,'==','','Falta ingresar el Año')) return false;
  if (VerificarEntero(Form.AA,1900,2900,'El Año es incorrecto')) return false;
  Form.onsubmit = function() {Boton.disabled = true; Boton.onmouseout = ''; Boton.className = 'BOTON ON';};
  return true;
}
function onLoadFormCuandoNace() {
  var f = document.getElementById('FormCuandoNace');
  if (f) {
    var dd = f.DD;
    dd.onblur = function() { dd.className = (dd.value)?'LLENO':''; };
    dd.onfocus = function() { dd.className = 'OVER'; };
    if (dd.value != '') { dd.className = 'LLENO'; };
    var mm = f.MM;
    mm.onblur = function() { mm.className = (mm.value)?'LLENO':''; };
    mm.onfocus = function() { mm.className = 'OVER'; };
    if (mm.value != '') { mm.className = 'LLENO'; };
    var aa = f.AA;
    aa.onblur = function() { aa.className = (aa.value)?'LLENO':''; };
    aa.onfocus = function() { aa.className = 'OVER'; };
    if (aa.value != '') { aa.className = 'LLENO'; };
  }
}
