/**
 * Classe que gerencia os controladores do aplicativo e implementa m�todos gen�ricos para otimiza��o
 * de c�digo.
 * 
 * @author Renato Sulzbach
 * @version 1.0
 * @since 26/07/2007
 */
function Aplicativo() {
	
	this.objCtrPesquisaGenerica = null;
	this.objCtrTipoDeConta = null;
	this.objCtrPesquisa = null;
	this.objCtrCentroDeCustos = null; 
	this.objCtrPessoaFisica = null;
	this.objCtrPessoaJuridica = null;
	this.objCtrProdutos = null;
	this.objCtrServicos = null;
	this.objCtrPesquisaProdutos = null;
	this.objCtrPesquisaServicos = null;
	this.objCtrCategoriaProdutos = null;
	this.objCtrCategoriaServicos = null;	
	this.objCtrFabricantes = null;
	this.objCtrProjetos = null;
	this.objCtrLogin = null;
	this.objCtrOrcamento = null;
	this.objCtrPreOrcamento = null;
	this.objCtrUserPerm = null;
	this.objCtrItemEstoque = null;
	this.objCtrCfop = null;
	this.objCtrBaixaItemEstoque = null;
	this.objCtrPesquisaItensEstoque = null;
	this.objCtrNotaFiscal = null;
	this.objCtrRelOrcamento = null;
	this.objCtrRelItemEstoque = null;
	this.objCtrRelPreOrcamento = null;
	this.objCtrRelProdutos = null;
	this.objCtrRelNivelEstoque = null;
	this.objCtrMovimentacao = null;
	this.objCtrParcela = null;
	this.objCtrParcelaNovo = null;
	this.objCtrFiscal = null;
	this.objCtrPesquisaMovimentacao = null;
	this.objCtrPlanoDeContas = null;
	this.objCtrPesquisaPlanoDeContas = null;
	this.objCtrPesquisaContasPagarReceber = null;
	this.objCtrTransferencia = null;
	this.objCtrContasBancarias = null;
	this.objCtrRelFinanceiro = null;
	this.objCtrRelBalancete = null;
	this.objCtrMovimentacaoPorProjeto = null;
	this.objCtrVendas = null;
	this.objCtrVenda = null;
	this.objCtrPesquisaVendas = null;
	this.objCtrRelFechamentoDeCaixa = null;
	this.objCtrSerieNotaFiscal = null;
	this.objCtrOrdemDeServico = null;
	this.objCtrAlarme = null;
	this.objTipoCtrOrdemDeServico = null;
	this.objCtrDepartamento = null;
	this.objCtrRelProdutosVendidos = null;
	this.objCtrRelProdutosComprados = null;
	this.objCtrFuncionario = null;	
	this.objCtrCargos = null;
	this.objCtrPesquisaAlarmes = null;
	this.objCtrDisplayAlarmes = null;
	this.objCtrRelColaboradores = null;
	this.objCtrIndicadores = null;
	this.objCtrItemDeEstoque = null;
	this.objCtrDetalhesItemDeEstoque = null;
	this.objCtrPesquisaColaboradores = null;
	this.objCtrFeriados = null;
	this.objCtrCadastroPonto = null;
	this.objCtrAcompanhamentoPonto = null;
	this.objCtrRelHorasTrabalhadas = null;
	this.objCtrPedido = null;
	this.objCtrFazerPedido = null;
	this.objCtrFechamentoRevendedor = null;
	this.objCtrSuporte = null;
	this.objCtrComplementosColaborador = null;
	this.objCtrTabelaPreco = null;
	this.objCtrMateriaisProduto = null;
	this.objCtrRegistroProducao = null;
	this.objCtrPesquisaSimples = null;
	this.objCtrVeiculos = null;
	this.objCtrItensVeiculos = null;
	this.objCtrCombustivel = null;
	this.objCtrCategoriaVeiculo = null;
	this.objCtrConfAlarmeVeiculo = null;
	this.objCtrIdentificacaoMateriais = null;
	this.objCtrIdentificacaoUnitario = null;
	this.objCtrConfAlarmeEstoque = null;
	this.objCtrConfRegistroProducao = null;
	this.objCtrImportaProdutos = null;
	this.objCtrBuscaRapida = null;
	this.objCtrImportaVendas = null;
	this.objCtrConfVendas = null;
	this.objCtrExportaProdutos = null;
	this.objCtrOrdemServico = null;
	this.objCtrRelRevendedorCreditos = null;
	
	
	/**
	 * Retorna um controlador especificado pelo seu id, instanciando caso o mesmo n�o tenha sido criado.
	 * @param vIdControlador o id de um controlador espec�fico. Tipicamente o id especificado
	 * pelo par�metro � o nome da classe do controlador desejado.
	 * @return o controlador especificado pelo seu id.
	 */
	 
	this.getControlador = function(idControlador) {
		var controladorAplicativoPegar = null;

		if (idControlador == "CtrPesquisaGenerica") {
			if (this.objCtrPesquisaGenerica == null)
				this.objCtrPesquisaGenerica = new CtrPesquisaGenerica();
			controladorAplicativoPegar = this.objCtrPesquisaGenerica;
		}
		else if (idControlador == "CtrTipoDeConta") {
			if (this.objCtrTipoDeConta == null)
				this.objCtrTipoDeConta = new CtrTipoDeConta();
			controladorAplicativoPegar = this.objCtrTipoDeConta;
		}
		else if (idControlador == "CtrPesquisa") {
			if (this.objCtrPesquisa == null)
				this.objCtrPesquisa = new CtrPesquisa();
			controladorAplicativoPegar = this.objCtrPesquisa;
		}
		else if (idControlador == "CtrCentroDeCustos") {
			if (this.objCtrCentroDeCustos == null)
				this.objCtrCentroDeCustos = new CtrCentroDeCustos();
			controladorAplicativoPegar = this.objCtrCentroDeCustos;
		}
		else if (idControlador == "CtrPessoaFisica") {
			if (this.objCtrPessoaFisica == null)
				this.objCtrPessoaFisica = new CtrPessoaFisica();
			controladorAplicativoPegar = this.objCtrPessoaFisica;
		}
		else if (idControlador == "CtrPessoaJuridica") {
			if (this.objCtrPessoaJuridica == null)
				this.objCtrPessoaJuridica = new CtrPessoaJuridica();
			controladorAplicativoPegar = this.objCtrPessoaJuridica;
		}
		else if (idControlador == "CtrProdutos") {
			if (this.objCtrProdutos == null)
				this.objCtrProdutos = new CtrProdutos();
			controladorAplicativoPegar = this.objCtrProdutos;
		}	
		else if (idControlador == "CtrServicos") {
			if (this.objCtrServicos == null)
				this.objCtrServicos = new CtrServicos();
			controladorAplicativoPegar = this.objCtrServicos;
		}		
		else if (idControlador == "CtrPesquisaProdutos") {
			if (this.objCtrPesquisaProdutos == null)
				this.objCtrPesquisaProdutos = new CtrPesquisaProdutos();
			controladorAplicativoPegar = this.objCtrPesquisaProdutos;
		}
		else if (idControlador == "CtrPesquisaServicos") {
			if (this.objCtrPesquisaServicos == null)
				this.objCtrPesquisaServicos = new CtrPesquisaServicos();
			controladorAplicativoPegar = this.objCtrPesquisaServicos;
		}		
		else if (idControlador == "CtrCategoriaProdutos") {
			if (this.objCtrCategoriaProdutos == null)
				this.objCtrCategoriaProdutos = new CtrCategoriaProdutos();
			controladorAplicativoPegar = this.objCtrCategoriaProdutos;
		}		
		else if (idControlador == "CtrCategoriaServicos") {
			if (this.objCtrCategoriaServicos == null)
				this.objCtrCategoriaServicos = new CtrCategoriaServicos();
			controladorAplicativoPegar = this.objCtrCategoriaServicos;
		}										
		else if (idControlador == "CtrFabricantes") {
			if (this.objCtrFabricantes == null)
				this.objCtrFabricantes = new CtrFabricantes();
			controladorAplicativoPegar = this.objCtrFabricantes;
		}
		else if (idControlador == "CtrProjetos") {
			if (this.objCtrProjetos == null)
				this.objCtrProjetos = new CtrProjetos();
			controladorAplicativoPegar = this.objCtrProjetos;
		}
		else if (idControlador == "CtrLogin") {
			if (this.objCtrLogin == null)
				this.objCtrLogin = new CtrLogin();
			controladorAplicativoPegar = this.objCtrLogin;
		}	
		else if (idControlador == "CtrPreOrcamento") {
			if (this.objCtrPreOrcamento == null)
				this.objCtrPreOrcamento = new CtrPreOrcamento();
			controladorAplicativoPegar = this.objCtrPreOrcamento;
		}
		else if (idControlador == "CtrOrcamento") {
			if (this.objCtrOrcamento == null)
				this.objCtrOrcamento = new CtrOrcamento();
			controladorAplicativoPegar = this.objCtrOrcamento;
		}
		else if (idControlador == "CtrUserPerm") {
			if (this.objCtrUserPerm == null)
				this.objCtrUserPerm = new CtrUserPerm();
			controladorAplicativoPegar = this.objCtrUserPerm;
		}	
		else if (idControlador == "CtrItemEstoque") {
			if (this.objCtrItemEstoque == null)
				this.objCtrItemEstoque = new CtrItemEstoque();
			controladorAplicativoPegar = this.objCtrItemEstoque;
		}	
		else if (idControlador == "CtrCfop") {
			if (this.objCtrCfop == null)
				this.objCtrCfop = new CtrCfop();
			controladorAplicativoPegar = this.objCtrCfop;
		}
		else if (idControlador == "CtrBaixaItemEstoque") {
			if (this.objCtrBaixaItemEstoque == null)
				this.objCtrBaixaItemEstoque = new CtrBaixaItemEstoque();
			controladorAplicativoPegar = this.objCtrBaixaItemEstoque;
		}	
		else if (idControlador == "CtrPesquisaItensEstoque") {
			if (this.objCtrPesquisaItensEstoque == null)
				this.objCtrPesquisaItensEstoque = new CtrPesquisaItensEstoque();
			controladorAplicativoPegar = this.objCtrPesquisaItensEstoque;
		}		
		else if (idControlador == "CtrNotaFiscal") {
			if (this.objCtrNotaFiscal == null)
				this.objCtrNotaFiscal = new CtrNotaFiscal();
			controladorAplicativoPegar = this.objCtrNotaFiscal;
		}
		else if (idControlador == "CtrRelOrcamento") {
			if (this.objCtrRelOrcamento == null)
				this.objCtrRelOrcamento = new CtrRelOrcamento();
			controladorAplicativoPegar = this.objCtrRelOrcamento;
		}	
		else if (idControlador == "CtrRelItemEstoque") {
			if (this.objCtrRelItemEstoque == null)
				this.objCtrRelItemEstoque = new CtrRelItemEstoque();
			controladorAplicativoPegar = this.objCtrRelItemEstoque;
		}
		else if (idControlador == "CtrRelPreOrcamento") {
			if (this.objCtrRelPreOrcamento == null)
				this.objCtrRelPreOrcamento = new CtrRelPreOrcamento();
			controladorAplicativoPegar = this.objCtrRelPreOrcamento;
		}
		else if (idControlador == "CtrRelProdutos") {
			if (this.objCtrRelProdutos == null)
				this.objCtrRelProdutos = new CtrRelProdutos();
			controladorAplicativoPegar = this.objCtrRelProdutos;
		}
		else if (idControlador == "CtrMovimentacao") {
			if (this.objCtrMovimentacao == null)
				this.objCtrMovimentacao = new CtrMovimentacao();
			controladorAplicativoPegar = this.objCtrMovimentacao;
		}
		else if (idControlador == "CtrParcela") {
			if (this.objCtrParcela == null)
				this.objCtrParcela = new CtrParcela();
			controladorAplicativoPegar = this.objCtrParcela;
		}
		else if (idControlador == "CtrParcelaNovo") {
			if (this.objCtrParcelaNovo == null)
				this.objCtrParcelaNovo = new CtrParcelaNovo();
			controladorAplicativoPegar = this.objCtrParcelaNovo;
		}																				
		else if (idControlador == "CtrRelNivelEstoque") {
			if (this.objCtrRelNivelEstoque == null)
				this.objCtrRelNivelEstoque = new CtrRelNivelEstoque();
			controladorAplicativoPegar = this.objCtrRelNivelEstoque;
		}
		else if (idControlador == "CtrRelFiscal") {
			if (this.objCtrRelFiscal == null)
				this.objCtrRelFiscal = new CtrRelFiscal();
			controladorAplicativoPegar = this.objCtrRelFiscal;
		}
		else if (idControlador == "CtrPesquisaMovimentacao") {
			if (this.objCtrPesquisaMovimentacao == null)
				this.objCtrPesquisaMovimentacao = new CtrPesquisaMovimentacao();
			controladorAplicativoPegar = this.objCtrPesquisaMovimentacao;
		}																				
		else if (idControlador == "CtrPlanoDeContas") {
			if (this.objCtrPlanoDeContas == null)
				this.objCtrPlanoDeContas = new CtrPlanoDeContas();
			controladorAplicativoPegar = this.objCtrPlanoDeContas;
		}
		else if (idControlador == "CtrPesquisaPlanoDeContas") {
			if (this.objCtrPesquisaPlanoDeContas == null)
				this.objCtrPesquisaPlanoDeContas = new CtrPesquisaPlanoDeContas();
			controladorAplicativoPegar = this.objCtrPesquisaPlanoDeContas;
		}
		else if (idControlador == "CtrPesquisaContasPagarReceber") {
			if (this.objCtrPesquisaContasPagarReceber == null)
				this.objCtrPesquisaContasPagarReceber = new CtrPesquisaContasPagarReceber();
			controladorAplicativoPegar = this.objCtrPesquisaContasPagarReceber;
		}				
		else if (idControlador == "CtrTransferencia") {
			if (this.objCtrTransferencia == null)
				this.objCtrTransferencia = new CtrTransferencia();
			controladorAplicativoPegar = this.objCtrTransferencia;
		}				
		else if (idControlador == "CtrContasBancarias") {
			if (this.objCtrContasBancarias == null)
				this.objCtrContasBancarias = new CtrContasBancarias();
			controladorAplicativoPegar = this.objCtrContasBancarias;
		}
		else if (idControlador == "CtrRelFinanceiro") {
			if (this.objCtrRelFinanceiro == null)
				this.objCtrRelFinanceiro = new CtrRelFinanceiro();
			controladorAplicativoPegar = this.objCtrRelFinanceiro;
		}
		else if (idControlador == "CtrRelBalancete") {
			if (this.objCtrRelBalancete == null)
				this.objCtrRelBalancete = new CtrRelBalancete();
			controladorAplicativoPegar = this.objCtrRelBalancete;
		}
		else if (idControlador == "CtrMovimentacaoPorProjeto") {
			if (this.objCtrMovimentacaoPorProjeto == null)
				this.objCtrMovimentacaoPorProjeto = new CtrMovimentacaoPorProjeto();
			controladorAplicativoPegar = this.objCtrMovimentacaoPorProjeto;
		}
		else if (idControlador == "CtrVendas") {
			if (this.objCtrVendas == null)
				this.objCtrVendas = new CtrVendas();
			controladorAplicativoPegar = this.objCtrVendas;
		}
		else if (idControlador == "CtrVenda") {
			if (this.objCtrVenda == null)
				this.objCtrVenda = new CtrVenda();
			controladorAplicativoPegar = this.objCtrVenda;
		}
		else if (idControlador == "CtrPesquisaVendas") {
			if (this.objCtrPesquisaVendas == null)
				this.objCtrPesquisaVendas = new CtrPesquisaVendas();
			controladorAplicativoPegar = this.objCtrPesquisaVendas;
		}
		else if (idControlador == "CtrRelFechamentoDeCaixa") {
			if (this.objCtrRelFechamentoDeCaixa == null)
				this.objCtrRelFechamentoDeCaixa = new CtrRelFechamentoDeCaixa();
			controladorAplicativoPegar = this.objCtrRelFechamentoDeCaixa;
		}
		else if (idControlador == "CtrSerieNotaFiscal") {
			if (this.objCtrSerieNotaFiscal == null)
				this.objCtrSerieNotaFiscal = new CtrSerieNotaFiscal();
			controladorAplicativoPegar = this.objCtrSerieNotaFiscal;			
		}
		else if (idControlador == "Ctrscal") {
			if (this.objCtrSerieNotaFiscal == null)
				this.objCtrSerieNotaFiscal = new CtrSerieNotaFiscal();
			controladorAplicativoPegar = this.objCtrSerieNotaFiscal;			
		}
		else if (idControlador == "CtrOrdemDeServico") {
			if (this.objCtrOrdemDeServico == null) 
				this.objCtrOrdemDeServico = new CtrOrdemDeServico();
			controladorAplicativoPegar = this.objCtrOrdemDeServico;
		}																				
		else if (idControlador == "CtrTipoOrdemDeServico") {
			if (this.objCtrTipoOrdemDeServico == null) 
				this.objCtrTipoOrdemDeServico = new CtrTipoOrdemDeServico();
			controladorAplicativoPegar = this.objCtrTipoOrdemDeServico;
		}																				
		else if (idControlador == "CtrAlarme") {
			if (this.objCtrAlarme == null) 
				this.objCtrAlarme = new CtrAlarme();
			controladorAplicativoPegar = this.objCtrAlarme;
		}
		else if (idControlador == "CtrDepartamento") {
			if (this.objCtrDepartamento == null) 
				this.objCtrDepartamento = new CtrDepartamento();
			controladorAplicativoPegar = this.objCtrDepartamento;
		}
		else if (idControlador == "CtrRelProdutosVendidos") {
			if (this.objCtrRelProdutosVendidos == null) 
				this.objCtrRelProdutosVendidos = new CtrRelProdutosVendidos();
			controladorAplicativoPegar = this.objCtrRelProdutosVendidos;
		}
		else if (idControlador == "CtrRelProdutosComprados") {
			if (this.objCtrRelProdutosComprados == null) 
				this.objCtrRelProdutosComprados = new CtrRelProdutosComprados();
			controladorAplicativoPegar = this.objCtrRelProdutosComprados;
		}
		else if (idControlador == "CtrFuncionario") {
			if (this.objCtrFuncionario == null) 
				this.objCtrFuncionario = new CtrFuncionario();
			controladorAplicativoPegar = this.objCtrFuncionario;
		}
		else if (idControlador == "CtrCargos") {
			if (this.objCtrCargos == null) 
				this.objCtrCargos = new CtrCargos();
			controladorAplicativoPegar = this.objCtrCargos;
		}
		else if (idControlador == "CtrPesquisaAlarmes") {
			if (this.objCtrPesquisaAlarmes == null) {
				this.objCtrPesquisaAlarmes = new CtrPesquisaAlarmes();
			}
			controladorAplicativoPegar = this.objCtrPesquisaAlarmes;
		}

		else if (idControlador == "CtrDisplayAlarmes") {
			if (this.objCtrDisplayAlarmes == null) 
				this.objCtrDisplayAlarmes = new CtrDisplayAlarmes();
			controladorAplicativoPegar = this.objCtrDisplayAlarmes;
		}

		else if (idControlador == "CtrRelColaboradores") {
			if (this.objCtrRelColaboradores == null) 
				this.objCtrRelColaboradores = new CtrRelColaboradores();
			controladorAplicativoPegar = this.objCtrRelColaboradores;
		}
		
		else if (idControlador == "CtrIndicadores") {
			if (this.objCtrIndicadores == null) 
				this.objCtrIndicadores = new CtrIndicadores();
			controladorAplicativoPegar = this.objCtrIndicadores;
		}

		else if (idControlador == "CtrItemDeEstoque") {
			if (this.objCtrItemDeEstoque == null)  
				this.objCtrItemDeEstoque = new CtrItemDeEstoque();
			controladorAplicativoPegar = this.objCtrItemDeEstoque;
		}
		
		else if (idControlador == "CtrDetalhesItemDeEstoque") {
			if (this.objCtrDetalhesItemDeEstoque == null) 
				this.objCtrDetalhesItemDeEstoque = new CtrDetalhesItemDeEstoque();
			controladorAplicativoPegar = this.objCtrDetalhesItemDeEstoque;
		}
		
		else if (idControlador == "CtrPesquisaColaboradores") {
			if (this.objCtrPesquisaColaboradores == null) 
				this.objCtrPesquisaColaboradores = new CtrPesquisaColaboradores();
			controladorAplicativoPegar = this.objCtrPesquisaColaboradores;
		}	

		else if (idControlador == "CtrFeriados") {
			if (this.objCtrFeriados == null) 
				this.objCtrFeriados = new CtrFeriados();
			controladorAplicativoPegar = this.objCtrFeriados;
		}	

		else if (idControlador == "CtrCadastroPonto") {
			if (this.objCtrCadastroPonto == null) 
				this.objCtrCadastroPonto = new CtrCadastroPonto();
			controladorAplicativoPegar = this.objCtrCadastroPonto;
		}	

		else if (idControlador == "CtrAcompanhamentoPonto") {
			if (this.objCtrAcompanhamentoPonto == null) 
				this.objCtrAcompanhamentoPonto = new CtrAcompanhamentoPonto();
			controladorAplicativoPegar = this.objCtrAcompanhamentoPonto;
		}	

		else if (idControlador == "CtrRelHorasTrabalhadas") {
			if (this.objCtrRelHorasTrabalhadas == null) 
				this.objCtrRelHorasTrabalhadas = new CtrRelHorasTrabalhadas();
			controladorAplicativoPegar = this.objCtrRelHorasTrabalhadas;
		}	

		else if (idControlador == "CtrPedido") {
			if (this.objCtrPedido == null) 
				this.objCtrPedido = new CtrPedido();
			controladorAplicativoPegar = this.objCtrPedido;
		}	

		else if (idControlador == "CtrFazerPedido") {
			if (this.objCtrFazerPedido == null) 
				this.objCtrFazerPedido = new CtrFazerPedido();
			controladorAplicativoPegar = this.objCtrFazerPedido;
		}	

		else if (idControlador == "CtrFechamentoRevendedor") {
			if (this.objCtrFechamentoRevendedor == null) 
				this.objCtrFechamentoRevendedor = new CtrFechamentoRevendedor();
			controladorAplicativoPegar = this.objCtrFechamentoRevendedor;
		}	

		else if (idControlador == "CtrSuporte") {
			if (this.objCtrSuporte == null) 
				this.objCtrSuporte = new CtrSuporte();
			controladorAplicativoPegar = this.objCtrSuporte;
		}	

		else if (idControlador == "CtrComplementosColaborador") {
			if (this.objCtrComplementosColaborador == null) 
				this.objCtrComplementosColaborador = new CtrComplementosColaborador();
			controladorAplicativoPegar = this.objCtrComplementosColaborador;
		}	

		else if (idControlador == "CtrTabelaPreco") {
			if (this.objCtrTabelaPreco == null) 
				this.objCtrTabelaPreco = new CtrTabelaPreco();
			controladorAplicativoPegar = this.objCtrTabelaPreco;
		}	

		else if (idControlador == "CtrMateriaisProduto") {
			if (this.objCtrMateriaisProduto == null) 
				this.objCtrMateriaisProduto = new CtrMateriaisProduto();
			controladorAplicativoPegar = this.objCtrMateriaisProduto;
		}	

		else if (idControlador == "CtrRegistroProducao") {
			if (this.objCtrRegistroProducao == null) 
				this.objCtrRegistroProducao = new CtrRegistroProducao();
			controladorAplicativoPegar = this.objCtrRegistroProducao;
		}	

		else if (idControlador == "CtrPesquisaSimples") {
			if (this.objCtrPesquisaSimples == null) 
				this.objCtrPesquisaSimples = new CtrPesquisaSimples();
			controladorAplicativoPegar = this.objCtrPesquisaSimples;
		}	

		else if (idControlador == "CtrVeiculos") {
			if (this.objCtrVeiculos == null) 
				this.objCtrVeiculos = new CtrVeiculos();
			controladorAplicativoPegar = this.objCtrVeiculos;
		}	

		else if (idControlador == "CtrItensVeiculos") {
			if (this.objCtrItensVeiculos == null) 
				this.objCtrItensVeiculos = new CtrItensVeiculos();
			controladorAplicativoPegar = this.objCtrItensVeiculos;
		}	

		else if (idControlador == "CtrCombustivel") {
			if (this.objCtrCombustivel == null) 
				this.objCtrCombustivel = new CtrCombustivel();
			controladorAplicativoPegar = this.objCtrCombustivel;
		}	
		
		else if (idControlador == "CtrCategoriaVeiculo") {
			if (this.objCtrCategoriaVeiculo == null) 
				this.objCtrCategoriaVeiculo = new CtrCategoriaVeiculo();
			controladorAplicativoPegar = this.objCtrCategoriaVeiculo;
		}	
		
		else if (idControlador == "CtrConfAlarmeVeiculo") {
			if (this.objCtrConfAlarmeVeiculo == null) 
				this.objCtrConfAlarmeVeiculo = new CtrConfAlarmeVeiculo();
			controladorAplicativoPegar = this.objCtrConfAlarmeVeiculo;
		}	
		
		else if (idControlador == "CtrIdentificacaoMateriais") {
			if (this.objCtrIdentificacaoMateriais == null) 
				this.objCtrIdentificacaoMateriais = new CtrIdentificacaoMateriais();
			controladorAplicativoPegar = this.objCtrIdentificacaoMateriais;
		}
		
		else if (idControlador == "CtrIdentificacaoUnitario") {
			if (this.objCtrIdentificacaoUnitario == null) 
				this.objCtrIdentificacaoUnitario = new CtrIdentificacaoUnitario();
			controladorAplicativoPegar = this.objCtrIdentificacaoUnitario;
		}	
		
		else if (idControlador == "CtrConfAlarmeEstoque") {
			if (this.objCtrConfAlarmeEstoque == null) 
				this.objCtrConfAlarmeEstoque = new CtrConfAlarmeEstoque();
			controladorAplicativoPegar = this.objCtrConfAlarmeEstoque;
		}	
		
		else if (idControlador == "CtrConfRegistroProducao") {
			if (this.objCtrConfRegistroProducao == null) 
				this.objCtrConfRegistroProducao = new CtrConfRegistroProducao();
			controladorAplicativoPegar = this.objCtrConfRegistroProducao;
		}	
		
		else if (idControlador == "CtrImportaProdutos") {
			if (this.objCtrImportaProdutos == null) 
				this.objCtrImportaProdutos = new CtrImportaProdutos();
			controladorAplicativoPegar = this.objCtrImportaProdutos;
		}		
		
		else if (idControlador == "CtrBuscaRapida") {
			if (this.objCtrBuscaRapida == null) 
				this.objCtrBuscaRapida = new CtrBuscaRapida();
			controladorAplicativoPegar = this.objCtrBuscaRapida;
		}
		
		else if (idControlador == "CtrImportaVendas") {
			if (this.objCtrImportaVendas == null) 
				this.objCtrImportaVendas = new CtrImportaVendas();
			controladorAplicativoPegar = this.objCtrImportaVendas;
		}		
		
		else if (idControlador == "CtrConfVendas") {
			if (this.objCtrConfVendas == null) 
				this.objCtrConfVendas = new CtrConfVendas();
			controladorAplicativoPegar = this.objCtrConfVendas;
		}
		
		else if (idControlador == "CtrExportaProdutos") {
			if (this.objCtrExportaProdutos == null) 
				this.objCtrExportaProdutos = new CtrExportaProdutos();
			controladorAplicativoPegar = this.objCtrExportaProdutos;
		}				
		
		else if (idControlador == "CtrOrdemServico") {
			if (this.objCtrOrdemServico == null) 
				this.objCtrOrdemServico = new CtrOrdemServico();
			controladorAplicativoPegar = this.objCtrOrdemServico;
		}
		
		else if (idControlador == "CtrRelRevendedorCreditos") {
			if (this.objCtrRelRevendedorCreditos == null) 
				this.objCtrRelRevendedorCreditos = new CtrRelRevendedorCreditos();
			controladorAplicativoPegar = this.objCtrRelRevendedorCreditos;
		}
		
		return controladorAplicativoPegar;
	}
	
	/**
	 * Destr�i um controlador para libera��o de mem�ria.
	 * @param vIdControlador o id de um controlador espec�fico. Tipicamente o id especificado
	 * pelo par�metro � o nome da classe do controlador desejado.
	 */
	this.destruirControlador = function(idControlador) {
		
		//alert("Fui chamado para destruir o controlador: " + idControlador);
		
		if (idControlador == "CtrPesquisaGenerica") {
			this.objCtrPesquisaGenerica = null;
		}
		else if (idControlador == "CtrTipoDeConta") {
			this.objCtrTipoDeConta = null;
		}
		else if (idControlador == "CtrPesquisa") {
			this.objCtrPesquisa = null;
		}
		else if (idControlador == "CtrCentroDeCustos") {
			this.objCtrCentroDeCustos = null;
		}
		else if (idControlador == "CtrPessoaFisica") {
			this.objCtrPessoaFisica = null;
		}
		else if (idControlador == "CtrPessoaJuridica") {
			this.objCtrPessoaJuridica = null;
		}		
		else if (idControlador == "CtrProdutos") {
			this.objCtrProdutos = null;
		}
		else if (idControlador == "CtrServicos") {
			this.objCtrServicos = null;
		}		
		else if (idControlador == "CtrPesquisaProdutos") {
			this.objCtrPesquisaProdutos = null;
		} 
		else if (idControlador == "CtrPesquisaServicos") {
			this.objCtrPesquisaServicos = null;
		}					
		else if (idControlador == "CtrFabricantes") {
			this.objCtrFabricantes = null;
		}
		else if (idControlador == "CtrCategoriaProdutos") {
			this.objCtrCategoriaProdutos = null;
		}		
		else if (idControlador == "CtrCategoriaServicos") {
			this.objCtrCategoriaServicos = null;
		}
		else if (idControlador == "CtrProjetos") {
			this.objCtrProjetos = null;
		}
		else if (idControlador == "CtrPreOrcamento") {
			this.objCtrPreOrcamento = null;
		}	
		else if (idControlador == "CtrOrcamento") {
			this.objCtrOrcamento = null;
		}																	
		else if (idControlador == "CtrUserPerm") {
			this.objCtrUserPerm = null;
		}
		else if (idControlador == "CtrItemEstoque") {
			this.objCtrItemEstoque = null;
		}
		else if (idControlador == "CtrCfop") {
			this.objCtrCfop = null;
		}		
		else if (idControlador == "CtrBaixaItemEstoque") {
			this.objCtrBaixaItemEstoque = null;
		}
		else if (this.objCtrOrdemDeServico != null) {
			this.objCtrOrdemDeServico = null;
		}
		else if (idControlador == "CtrPesquisaItensEstoque") {
			this.objCtrPesquisaItensEstoque = null;
		}	
		else if (idControlador == "CtrNotaFiscal") {
			this.objCtrNotaFiscal = null;
		}
		else if (idControlador == "CtrRelOrcamento") {
			this.objCtrRelOrcamento = null;
		}
		else if (idControlador == "CtrRelItemEstoque") {
			this.objCtrRelItemEstoque = null;
		}
		else if (idControlador == "CtrRelPreOrcamento") {
			this.objCtrRelPreOrcamento = null;
		}
		else if (idControlador == "CtrRelProdutos") {
			this.objCtrRelProdutos = null;
		}	
		else if (idControlador == "CtrMovimentacao") {
			this.objCtrMovimentacao = null;
		}
		else if (idControlador == "CtrParcela") {
			this.objCtrParcela = null;
		}
		else if (idControlador == "CtrParcelaNovo") {
			this.objCtrParcelaNovo = null;
		}
		else if (idControlador == "CtrRelNivelEstoque") {
			this.objCtrRelNivelEstoque = null;
		}
		else if (idControlador == "CtrRelFiscal") {
			this.objCtrRelFiscal = null;
		}
		else if (idControlador == "CtrPesquisaMovimentacao") {
			this.objCtrPesquisaMovimentacao = null;
		}
		else if (idControlador == "CtrPlanoDeContas") {
			this.objCtrPlanoDeContas = null;
		}
		else if (idControlador == "CtrPesquisaPlanoDeContas") {
			this.objCtrPesquisaPlanoDeContas = null;
		}
		else if (idControlador == "CtrPesquisaContasPagarReceber") {
			this.objCtrPesquisaContasPagarReceber = null;
		}
		else if (idControlador == "CtrTransferencia") {
			this.objCtrTransferencia = null;
		}
		else if (idControlador == "CtrContasBancarias") {
			this.objCtrContasBancarias = null;
		}
		else if (idControlador == "CtrRelFinanceiro") {
			this.objCtrRelFinanceiro = null;
		}
		else if (idControlador == "CtrRelBalancete") {
			this.objCtrRelBalancete = null;
		}
		else if (idControlador == "CtrMovimentacaoPorProjeto") {
			this.objCtrMovimentacaoPorProjeto = null;
		}
		else if (idControlador == "CtrVendas") {
			this.objCtrVendas = null;
		}
		else if (idControlador == "CtrVenda") {
			this.objCtrVenda = null;
		}
		else if (idControlador == "CtrPesquisaVendas") {
			this.objCtrPesquisaVendas = null;
		}
		else if (idControlador == "CtrRelFechamentoDeCaixa") {
			this.objCtrRelFechamentoDeCaixa = null;
		}
		else if (idControlador == "CtrSerieNotaFiscal") {
			this.objCtrSerieNotaFiscal = null;
		}
		else if (idControlador == "CtrOrdemDeServico") {
			this.objCtrOrdemDeServico = null;
		}
		else if (idControlador == "CtrTipoOrdemDeServico") {
			this.objCtrTipoOrdemDeServico = null;
		}				
		else if (idControlador == "CtrAlarme") {
			this.objCtrAlarme = null;
		}
		else if (idControlador == "CtrDepartamento") {
			this.objCtrDepartamento = null;
		}
		else if (idControlador == "CtrRelProdutosVendidos") {
			this.objCtrRelProdutosVendidos = null;
		}
		else if (idControlador == "CtrRelProdutosComprados") {
			this.objCtrRelProdutosComprados = null;
		}
		else if (idControlador == "CtrFuncionario") {
			this.objCtrFuncionario = null;
		}
		else if (idControlador == "CtrCargos") {
			this.objCtrCargos = null;
		}
		else if (idControlador == "CtrPesquisaAlarmes") {
			this.objCtrPesquisaAlarmes = null;
		}
		else if (idControlador == "CtrDisplayAlarmes") {
			this.objCtrDisplayAlarmes = null;
		}
		else if (idControlador == "CtrRelColaboradores") {
			this.objCtrRelColaboradores = null;
		}
		else if (idControlador == "CtrIndicadores") {
			this.objCtrIndicadores = null;
		}
		else if (idControlador == "CtrItemDeEstoque") {
			this.objCtrItemDeEstoque = null;
		}
		else if (idControlador == "CtrDetalhesItemDeEstoque") {
			this.objCtrDetalhesItemDeEstoque = null;
		}
		else if (idControlador == "CtrPesquisaColaboradores") {
			this.objCtrPesquisaColaboradores = null;
		}
		else if (idControlador == "CtrFeriados") {
			this.objCtrFeriados = null;
		}
		else if (idControlador == "CtrCadastroPonto") {
			this.objCtrCadastroPonto = null;
		}
		else if (idControlador == "CtrAcompanhamentoPonto") {
			this.objCtrAcompanhamentoPonto.mataThreadAcompanhamentoPonto();
			this.objCtrAcompanhamentoPonto = null;
		}
		else if (idControlador == "CtrRelHorasTrabalhadas") {
			this.objCtrRelHorasTrabalhadas = null;
		}
		else if (idControlador == "CtrPedido") {
			this.objCtrPedido = null;
		}
		else if (idControlador == "CtrFazerPedido") {
			this.objCtrFazerPedido = null;
		}
		else if (idControlador == "CtrFechamentoRevendedor") {
			this.objCtrFechamentoRevendedor = null;
		}
		else if (idControlador == "CtrSuporte") {
			this.objCtrSuporte = null;
		}
		else if (idControlador == "CtrComplementosColaborador") {
			this.objCtrComplementosColaborador = null;
		}
		else if (idControlador == "CtrTabelaPreco") {
			this.objCtrTabelaPreco = null;
		}
		else if (idControlador == "CtrMateriaisProduto") {
			this.objCtrMateriaisProduto = null;
		}
		else if (idControlador == "CtrRegistroProducao") {
			this.objCtrRegistroProducao = null;
		} 
		else if (idControlador == "CtrPesquisaSimples") {
			this.objCtrPesquisaSimples = null;
		} 
		else if (idControlador == "CtrVeiculos") {
			this.objCtrVeiculos = null;
		} 
		else if (idControlador == "CtrItensVeiculos") {
			this.objCtrItensVeiculos = null;
		} 
		else if (idControlador == "CtrCombustivel") {
			this.objCtrCombustivel = null;
		} 
		else if (idControlador == "CtrCategoriaVeiculo") {
			this.objCtrCategoriaVeiculo = null;
		} 
		else if (idControlador == "CtrConfAlarmeVeiculo") {
			this.objCtrConfAlarmeVeiculo = null;
		} 
		else if (idControlador == "CtrIdentificacaoMateriais") {
			this.objCtrIdentificacaoMateriais = null;
		} 
		else if (idControlador == "CtrIdentificacaoUnitario") {
			this.objCtrIdentificacaoUnitario = null;
		} 
		else if (idControlador == "CtrConfAlarmeEstoque") {
			this.objCtrConfAlarmeEstoque = null;
		} 
		else if (idControlador == "CtrConfRegistroProducao") {
			this.objCtrConfRegistroProducao = null;
		} 
		else if (idControlador == "CtrImportaProdutos") {
			this.objCtrImportaProdutos = null;
		} 
		else if (idControlador == "CtrBuscaRapida") {
			this.objCtrBuscaRapida = null;
		} 
		else if (idControlador == "CtrImportaVendas") {
			this.objCtrImportaVendas = null;
		}
		else if (idControlador == "CtrConfVendas") {
			this.objCtrConfVendas = null;
		}
		else if (idControlador == "CtrExportaProdutos") {
			this.objCtrExportaProdutos = null;
		}
		else if (idControlador == "CtrOrdemServico") {
			this.objCtrOrdemServico = null;
		} 
		else if (idControlador == "CtrRelRevendedorCreditos") {
			this.objCtrRelRevendedorCreditos = null;
		}     
	}
	
	this.loginEfetuado = function() {
		$("telaLogin").style.display = "none";
		$("menu").style.display = "";
		botaoIniciar.show();
	}
	
	this.logoutEfetuado = function() {
		
		if (this.objCtrPesquisaGenerica != null)
			this.objCtrPesquisaGenerica.fecharJanela();
	
		if (this.objCtrTipoDeConta != null)
			this.objCtrTipoDeConta.fecharJanela();
			
		if (this.objCtrPesquisa != null)
			this.objCtrPesquisa.fecharJanela();

		if (this.objCtrCentroDeCustos != null)
			this.objCtrCentroDeCustos.fecharJanela();

		if (this.objCtrPessoaFisica != null)
			this.objCtrPessoaFisica.fecharJanela();

		if (this.objCtrPessoaJuridica != null)
			this.objCtrPessoaJuridica.fecharJanela();
		
		if (this.objCtrProdutos != null)
			this.objCtrProdutos.fecharJanela();

		if (this.objCtrServicos != null)
			this.objCtrServicos.fecharJanela();
		
		if (this.objCtrPesquisaProdutos != null)
			this.objCtrPesquisaProdutos.fecharJanela();

		if (this.objCtrPesquisaServicos != null)
			this.objCtrPesquisaServicos.fecharJanela();
							
		if (this.objCtrFabricantes != null)
			this.objCtrFabricantes.fecharJanela();
		
		if (this.objCtrCategoriaProdutos != null)
			this.objCtrCategoriaProdutos.fecharJanela();
				
		if (this.objCtrCategoriaServicos != null)
			this.objCtrCategoriaServicos.fecharJanela();
		
		if (this.objCtrProjetos != null)
			this.objCtrProjetos.fecharJanela();
		
		if (this.objCtrPreOrcamento != null)
			this.objCtrPreOrcamento.fecharJanela();
			
		if (this.objCtrOrcamento != null)
			this.objCtrOrcamento.fecharJanela();
																			
		if (this.objCtrUserPerm != null)
			this.objCtrUserPerm.fecharJanela();
		
		if (this.objCtrItemEstoque != null)
			this.objCtrItemEstoque.fecharJanela();
		
		if (this.objCtrCfop != null)
			this.objCtrCfop.fecharJanela();
				
		if (this.objCtrBaixaItemEstoque != null)
			this.objCtrBaixaItemEstoque.fecharJanela();
		
		if (this.objCtrPesquisaItensEstoque != null)
			this.objCtrPesquisaItensEstoque.fecharJanela();
			
		if (this.objCtrNotaFiscal != null)
			this.objCtrNotaFiscal.fecharJanela();
		
		if (this.objCtrRelOrcamento != null)
			this.objCtrRelOrcamento.fecharJanela();
		
		if (this.objCtrRelItemEstoque != null)
			this.objCtrRelItemEstoque.fecharJanela();
		
		if (this.objCtrRelPreOrcamento != null)
			this.objCtrRelPreOrcamento.fecharJanela();
		
		if (this.objCtrRelProdutos != null)
			this.objCtrRelProdutos.fecharJanela();
			
		if (this.objCtrMovimentacao != null)
			this.objCtrMovimentacao.fecharJanela();
		
		if (this.objCtrParcela != null)
			this.objCtrParcela.fecharJanela();

		if (this.objCtrParcelaNovo != null)
			this.objCtrParcelaNovo.fecharJanela();
			
		if (this.objCtrRelNivelEstoque != null)
			this.objCtrRelNivelEstoque.fecharJanela();
		
		if (this.objCtrRelFiscal != null)
			this.objCtrRelFiscal.fecharJanela();

		if (this.objCtrPesquisaContasPagarReceber != null)
			this.objCtrPesquisaContasPagarReceber.fecharJanela();

		if (this.objCtrTransferencia != null)
			this.objCtrTransferencia.fecharJanela();
		
		if (this.objCtrPesquisaMovimentacao != null)
			this.objCtrPesquisaMovimentacao.fecharJanela();
		
		if (this.objCtrPlanoDeContas != null)
			this.objCtrPlanoDeContas.fecharJanela();
		
		if (this.objCtrPesquisaPlanoDeContas != null)
			this.objCtrPesquisaPlanoDeContas.fecharJanela();
		
		if (this.objCtrContasBancarias != null)
			this.objCtrContasBancarias.fecharJanela();			
		
		if (this.objCtrRelFinanceiro != null)
			this.objCtrRelFinanceiro.fecharJanela();

		if (this.objCtrRelBalancete != null)
			this.objCtrRelBalancete.fecharJanela();
		
		if (this.objCtrMovimentacaoPorProjeto != null)
			this.objCtrMovimentacaoPorProjeto.fecharJanela();				
		
		if (this.objCtrVendas != null)
			this.objCtrVendas.fecharJanela();
			
		if (this.objCtrVenda != null)
			this.objCtrVenda.fecharJanela();
			
		if (this.objCtrPesquisaVendas != null)
			this.objCtrPesquisaVendas.fecharJanela();

		if (this.objCtrRelFechamentoDeCaixa != null)
			this.objCtrRelFechamentoDeCaixa.fecharJanela();
		
		if (this.objCtrSerieNotaFiscal != null)
			this.objCtrSerieNotaFiscal.fecharJanela();			
		
		if (this.objCtrOrdemDeServico != null)
			this.objCtrOrdemDeServico.fecharJanela();
			
		if (this.objTipoCtrOrdemDeServico != null)
			this.objTipoCtrOrdemDeServico.fecharJanela();
			
		if (this.objCtrAlarme != null)
			this.objCtrAlarme.fecharJanela();
			
		if (this.objCtrDepartamento != null)
			this.objCtrDepartamento.fecharJanela();						
			
		if (this.objCtrRelProdutosVendidos != null)
			this.objCtrRelProdutosVendidos.fecharJanela();
			
		if (this.objCtrRelProdutosComprados != null)
			this.objCtrRelProdutosComprados.fecharJanela();
		
		if (this.objCtrFuncionario != null)
			this.objCtrFuncionario.fecharJanela();
		
		if (this.objCtrCargos != null)
			this.objCtrCargos.fecharJanela();
				
		if (this.objCtrPesquisaAlarmes != null)
			this.objCtrPesquisaAlarmes.fecharJanela();

		if (this.objCtrRelColaboradores != null)
			this.objCtrRelColaboradores.fecharJanela();

		if (this.objCtrIndicadores != null)
			this.objCtrIndicadores.fecharJanela();
			
		if (this.objCtrItemDeEstoque != null)
			this.objCtrItemDeEstoque.fecharJanela();

		if (this.objCtrDetalhesItemDeEstoque != null)
			this.objCtrDetalhesItemDeEstoque.fecharJanela();
		
		if (this.objCtrPesquisaColaboradores != null)
			this.objCtrPesquisaColaboradores.fecharJanela();

		if (this.objCtrFeriados != null)
			this.objCtrFeriados.fecharJanela();

		if (this.objCtrCadastroPonto != null)
			this.objCtrCadastroPonto.fecharJanela();

		if (this.objCtrAcompanhamentoPonto != null)
			this.objCtrAcompanhamentoPonto.fecharJanela();

		if (this.objCtrRelHorasTrabalhadas != null)
			this.objCtrRelHorasTrabalhadas.fecharJanela();
			
		if (this.objCtrPedido != null)
			this.objCtrPedido.fecharJanela();

		if (this.objCtrFazerPedido != null)
			this.objCtrFazerPedido.fecharJanela();

		if (this.objCtrFechamentoRevendedor != null)
			this.objCtrFechamentoRevendedor.fecharJanela();

		if (this.objCtrSuporte != null)
			this.objCtrSuporte.fecharJanela();

		if (this.objCtrComplementosColaborador != null)
			this.objCtrComplementosColaborador.fecharJanela();

		if (this.objCtrTabelaPreco != null)
			this.objCtrTabelaPreco.fecharJanela();

		if (this.objCtrMateriaisProduto != null) {
			this.objCtrMateriaisProduto.fecharJanela();
		}
	
		if (this.objCtrRegistroProducao != null) {
			this.objCtrRegistroProducao.fecharJanela();
		}

		if (this.objCtrPesquisaSimples != null) {
			this.objCtrPesquisaSimples.fecharJanela();
		}

		if (this.objCtrVeiculos != null) {
			this.objCtrVeiculos.fecharJanela();
		}

		if (this.objCtrItensVeiculos != null) {
			this.objCtrItensVeiculos.fecharJanela();
		}

		if (this.objCtrCombustivel != null) {
			this.objCtrCombustivel.fecharJanela();
		}
		
		if (this.objCtrCategoriaVeiculo != null) {
			this.objCtrCategoriaVeiculo.fecharJanela();
		}
		
		if (this.objCtrConfAlarmeVeiculo != null) {
			this.objCtrConfAlarmeVeiculo.fecharJanela();
		}
		
		if (this.objCtrIdentificacaoMateriais != null) {
			this.objCtrIdentificacaoMateriais.fecharJanela();
		}
		
		if (this.objCtrIdentificacaoUnitario != null) {
			this.objCtrIdentificacaoUnitario.fecharJanela();
		}
		
		if (this.objCtrConfAlarmeEstoque != null) {
			this.objCtrConfAlarmeEstoque.fecharJanela();
		}
		
		if (this.objCtrConfRegistroProducao != null) {
			this.objCtrConfRegistroProducao.fecharJanela();
		}
		
		if (this.objCtrImportaProdutos != null) {
			this.objCtrImportaProdutos.fecharJanela();
		}
		
		if (this.objCtrBuscaRapida != null) {
			this.objCtrBuscaRapida.fecharJanela();
		}
		
		if (this.objCtrImportaVendas != null) {
			this.objCtrImportaVendas.fecharJanela();
		}
		
		if (this.objCtrConfVendas != null) {
			this.objCtrConfVendas.fecharJanela();
		}
		
		if (this.objCtrExportaProdutos != null) {
			this.objCtrExportaProdutos.fecharJanela();
		}
		
		if (this.objCtrOrdemServico != null) {
			this.objCtrOrdemServico.fecharJanela();
		}
		
		if (this.objCtrRelRevendedorCreditos != null) {
			this.objCtrRelRevendedorCreditos.fecharJanela();
		}
		
//		if (this.objCtrDisplayAlarmes != null)
//			this.objCtrDisplayAlarmes.fecharJanela();
		
		botaoIniciar.hide();
		$("menu").style.display = "none";
		$("telaLogin").style.display = "";
	}
	
	/*
	 * Metodos chamados pelos HTML's para obter os seus limites associados
	 */
	this.getLimite = function(idLimite) {
		var limiteAplicativoPegar = null;
		
		if (idLimite == "LimAlarme") {
			limiteAplicativoPegar = this.getControlador("CtrAlarme").getLimite();
		}
		else if (idLimite == "LimDepartamento") {
			limiteAplicativoPegar = this.getControlador("CtrDepartamento").getLimite();
		}
		else if (idLimite == "LimPesquisaGenerica") {
			limiteAplicativoPegar = this.getControlador("CtrPesquisaGenerica").getLimite();
		}
		else if (idLimite == "LimVenda") {
			limiteAplicativoPegar = this.getControlador("CtrVenda").getLimite();
		}
		else if (idLimite == "LimParcelaNovo") {
			limiteAplicativoPegar = this.getControlador("CtrParcelaNovo").getLimite();
		}
		else if (idLimite == "LimTransferencia") {
			limiteAplicativoPegar = this.getControlador("CtrTransferencia").getLimite();
		}
		else if (idLimite == "LimFuncionario") {
			limiteAplicativoPegar = this.getControlador("CtrFuncionario").getLimite();
		}
		else if (idLimite == "LimCargos") {
			limiteAplicativoPegar = this.getControlador("CtrCargos").getLimite();
		}
		else if (idLimite == "LimPesquisaAlarmes") {
			limiteAplicativoPegar = this.getControlador("CtrPesquisaAlarmes").getLimite();
		}
		else if (idLimite == "LimDisplayAlarmes") {
			limiteAplicativoPegar = this.getControlador("CtrDisplayAlarmes").getLimite();
		}
		else if (idLimite == "LimRelColaboradores") {
			limiteAplicativoPegar = this.getControlador("CtrRelColaboradores").getLimite();
		}
		else if (idLimite == "LimIndicadores") {
			limiteAplicativoPegar = this.getControlador("CtrIndicadores").getLimite();
		}
		else if (idLimite == "LimItemDeEstoque") {
			limiteAplicativoPegar = this.getControlador("CtrItemDeEstoque").getLimite();
		}
		else if (idLimite == "LimDetalhesItemDeEstoque") {
			limiteAplicativoPegar = this.getControlador("CtrDetalhesItemDeEstoque").getLimite();
		}
		else if (idLimite == "LimFeriados") {
			limiteAplicativoPegar = this.getControlador("CtrFeriados").getLimite();
		}
		else if (idLimite == "LimCadastroPonto") {
			limiteAplicativoPegar = this.getControlador("CtrCadastroPonto").getLimite();
		}
		else if (idLimite == "LimAcompanhamentoPonto") {
			limiteAplicativoPegar = this.getControlador("CtrAcompanhamentoPonto").getLimite();
		}
		else if (idLimite == "LimRelHorasTrabalhadas") {
			limiteAplicativoPegar = this.getControlador("CtrRelHorasTrabalhadas").getLimite();
		}
		else if (idLimite == "LimPedido") {
			limiteAplicativoPegar = this.getControlador("CtrPedido").getLimite();
		}
		else if (idLimite == "LimFazerPedido") {
			limiteAplicativoPegar = this.getControlador("CtrFazerPedido").getLimite();
		}
		else if (idLimite == "LimFechamentoRevendedor") {
			limiteAplicativoPegar = this.getControlador("CtrFechamentoRevendedor").getLimite();
		}
		else if (idLimite == "LimSuporte") {
			limiteAplicativoPegar = this.getControlador("CtrSuporte").getLimite();
		}
		else if (idLimite == "LimComplementosColaborador") {
			limiteAplicativoPegar = this.getControlador("CtrComplementosColaborador").getLimite();
		}
		else if (idLimite == "LimTabelaPreco") {
			limiteAplicativoPegar = this.getControlador("CtrTabelaPreco").getLimite();
		}
		else if (idLimite == "LimMateriaisProduto") {
			limiteAplicativoPegar = this.getControlador("CtrMateriaisProduto").getLimite();
		}
		else if (idLimite == "LimRegistroProducao") {
			limiteAplicativoPegar = this.getControlador("CtrRegistroProducao").getLimite();
		}
		else if (idLimite == "LimPesquisaSimples") {
			limiteAplicativoPegar = this.getControlador("CtrPesquisaSimples").getLimite();
		}
		else if (idLimite == "LimVeiculos") {
			limiteAplicativoPegar = this.getControlador("CtrVeiculos").getLimite();
		}
		else if (idLimite == "LimItensVeiculos") {
			limiteAplicativoPegar = this.getControlador("CtrItensVeiculos").getLimite();
		}
		else if (idLimite == "LimCombustivel") {
			limiteAplicativoPegar = this.getControlador("CtrCombustivel").getLimite();
		}
		else if (idLimite == "LimCategoriaVeiculo") {
			limiteAplicativoPegar = this.getControlador("CtrCategoriaVeiculo").getLimite();
		}
		else if (idLimite == "LimConfAlarmeVeiculo") {
			limiteAplicativoPegar = this.getControlador("CtrConfAlarmeVeiculo").getLimite();
		}
		else if (idLimite == "LimIdentificacaoMateriais") {
			limiteAplicativoPegar = this.getControlador("CtrIdentificacaoMateriais").getLimite();
		}
		else if (idLimite == "LimIdentificacaoUnitario") {
			limiteAplicativoPegar = this.getControlador("CtrIdentificacaoUnitario").getLimite();
		}
		else if (idLimite == "LimConfAlarmeEstoque") {
			limiteAplicativoPegar = this.getControlador("CtrConfAlarmeEstoque").getLimite();
		}
		else if (idLimite == "LimConfRegistroProducao") {
			limiteAplicativoPegar = this.getControlador("CtrConfRegistroProducao").getLimite();
		}
		else if (idLimite == "LimImportaProdutos") {
			limiteAplicativoPegar = this.getControlador("CtrImportaProdutos").getLimite();
		}
		else if (idLimite == "LimBuscaRapida") {
			limiteAplicativoPegar = this.getControlador("CtrBuscaRapida").getLimite();
		}
		else if (idLimite == "LimImportaVendas") {
			limiteAplicativoPegar = this.getControlador("CtrImportaVendas").getLimite();
		}
		else if (idLimite == "LimConfVendas") {
			limiteAplicativoPegar = this.getControlador("CtrConfVendas").getLimite();
		}
		else if (idLimite == "LimExportaProdutos") {
			limiteAplicativoPegar = this.getControlador("CtrExportaProdutos").getLimite();
		}
		else if (idLimite == "LimOrdemServico") {
			limiteAplicativoPegar = this.getControlador("CtrOrdemServico").getLimite();
		}
		else if (idLimite == "LimRelRevendedorCreditos") {
			limiteAplicativoPegar = this.getControlador("CtrRelRevendedorCreditos").getLimite();
		}
		
		return limiteAplicativoPegar;
	}
}