function cLogin(){
  var self = this;
  
  this.cObject =  cObject;
  this.cObject();
  
  this.names               = {};
  this.names['formulario'] = "form1"; 
  
  this.messages            = {};
  this.messages['NoForm']  = "Formulario de Datos no definido";
  this.messages['NoField'] = "Debe ingresar su NIT o su matricula mercantil";
  
  this.widgets             = {};
  this.start               = _start;
  this.enviar              = _enviar;
  
  function _start(){
    self.createWidgetsFromNames();
    if(self.widgets.formulario)
      self.widgets.formulario.validate();
  }
  
  function _enviar(){
    var oForm = self.widgets.formulario;
    var sMsg = "";
    if(oForm){
      oForm.validate();
      if(oForm.failed){
        sMsg += oForm.messages;
      }
      if(oForm.isEmpty('VCh_nit,VCh_matricula,Vch_tpcm')){
        sMsg += self.messages['NoField'];        
      }
      if(sMsg != ""){
        alert(sMsg);
        return false;
      }
      
    }else{
      alert(self.messages['NoForm']);
      return false;
    }
  }
}

