um_ON = new Image(); um_ON.src="/pages/Imagens/cargas_on.jpg";
um_OFF = new Image(); um_OFF.src="/pages/Imagens/cargas_leftmenuhome.jpg";
dois_ON = new Image(); dois_ON.src="/pages/Imagens/industria_on.jpg";
dois_OFF = new Image(); dois_OFF.src="/pages/Imagens/industria_leftmenuhome.jpg";
tres_ON = new Image(); tres_ON.src="/pages/Imagens/imoveis_on.jpg";
tres_OFF = new Image(); tres_OFF.src="/pages/Imagens/imoveis_leftmenuhome.jpg";
quatro_ON = new Image(); quatro_ON.src="/pages/Imagens/veiculos_on.jpg";
quatro_OFF = new Image(); quatro_OFF.src="/pages/Imagens/veiculos_leftmenuhome.jpg";
cinco_ON = new Image(); cinco_ON.src="/pages/Imagens/arte_on.jpg";
cinco_OFF = new Image(); cinco_OFF.src="/pages/Imagens/arte_leftmenuhome.jpg";
seis_ON = new Image(); seis_ON.src="/pages/Imagens/judiciais_on.jpg";
seis_OFF = new Image(); seis_OFF.src="/pages/Imagens/judiciais_leftmenuhome.jpg";
sete_ON = new Image(); sete_ON.src="/pages/Imagens/geral_on.jpg";
sete_OFF = new Image(); sete_OFF.src="/pages/Imagens/geral_leftmenuhome.jpg";
oito_ON = new Image(); oito_ON.src="/pages/Imagens/quervender_on.jpg";
oito_OFF = new Image(); oito_OFF.src="/pages/Imagens/quervender_leftmenuhome.jpg";

//Variáveis globais do arquivo que poderão ser utilizadas por qualquer função
var strTarget = '_self';
var strNow = '';

function fncOff(Myobj)
{
	Myobj.style.color = '#427F82';
	//document.getElelentById(idColumn).style.color = '#427F82';
}

function fncOn(Myobj)
{
	Myobj.style.color = '#A6B2B2';
	//document.getElelentById(idColumn).style.color = '#B2B2B2';
}

btnCatalogo_buscaavancada_ON = new Image(); btnCatalogo_buscaavancada_ON.src="/pages/Imagens/btnCatalogo_buscaavancada_on.jpg";
btnCatalogo_buscaavancada_OFF = new Image(); btnCatalogo_buscaavancada_OFF.src="/pages/Imagens/btnCatalogo_buscaavancada.jpg";
btnCatalogo_documentos_ON = new Image(); btnCatalogo_documentos_ON.src="/pages/Imagens/btnCatalogo_documentos_on.jpg";
btnCatalogo_documentos_OFF = new Image(); btnCatalogo_documentos_OFF.src="/pages/Imagens/btnCatalogo_documentos.jpg";
btnCatalogo_faleconosco_ON = new Image(); btnCatalogo_faleconosco_ON.src="/pages/Imagens/btnCatalogo_faleconosco_on.jpg";
btnCatalogo_faleconosco_OFF = new Image(); btnCatalogo_faleconosco_OFF.src="/pages/Imagens/btnCatalogo_faleconosco.jpg";
btnCatalogo_comocomprar_ON = new Image(); btnCatalogo_comocomprar_ON.src="/pages/Imagens/btnCatalogo_comocomprar_on.jpg";
btnCatalogo_comocomprar_OFF = new Image(); btnCatalogo_comocomprar_OFF.src="/pages/Imagens/btnCatalogo_comocomprar.jpg";

function TV1(x,y){document.images[x].src = eval(y).src;}

function ShowHide(menuItem){
	document.all.imgSobreNosOn.className = 'invisible';
	document.all.imgAgendaOn.className = 'invisible';
	document.all.imgCadastroOn.className = 'invisible';
	document.all.imgContaOn.className = 'invisible';
    document.all.imgDocumentosOn.className = 'invisible';
	document.all.imgFaleConoscoOn.className = 'invisible';
	document.all.imgNossosEnderecosOn.className = 'invisible';
	document.all.imgFaqOn.className = 'invisible';	
	document.all.imgSobreNosOff.src = '/pages/Imagens/bullet_menu.gif';
	document.all.imgAgendaOff.src = '/pages/Imagens/bullet_menu.gif';
	document.all.imgCadastroOff.src = '/pages/Imagens/bullet_menu.gif';
	document.all.imgContaOff.src = '/pages/Imagens/bullet_menu.gif';
	document.all.imgDocumentosOff.src = '/pages/Imagens/bullet_menu.gif';
	document.all.imgFaleConoscoOff.src = '/pages/Imagens/bullet_menu.gif';
	document.all.imgNossosEnderecosOff.src = '/pages/Imagens/bullet_menu.gif';
	document.all.imgFaqOff.src = '/pages/Imagens/bullet_menu.gif';
	
	if (menuItem!='Home')
	{
		//eval("document.all.img" + menuItem + "On.className = 'visible';");
		eval("document.all.img" + menuItem + "Off.src = '/pages/Imagens/bullet_menu_on.gif';");
	}
	document.all.tdSobreNos.className = 'bgMenu';
	document.all.tdAgenda.className = 'bgMenu';
	document.all.tdCadastro.className = 'bgMenu';
	document.all.tdConta.className = 'bgMenu';
	document.all.tdDocumentos.className = 'bgMenu';
	document.all.tdFaleConosco.className = 'bgMenu';
	document.all.tdNossosEnderecos.className = 'bgMenu';
	document.all.tdFaq.className = 'bgMenu';	
	if (menuItem!='Home')
		eval("document.all.td" + menuItem + ".className = 'bgMenu_on';");
	document.all.tabSobreNos.style.display = 'none';
	document.all.tabAgenda.style.display = 'none';
	document.all.tabCadastro.style.display = 'none';
	document.all.tabConta.style.display = 'none';
	document.all.tabFaq.style.display = 'none';
	document.all.tabDocumentos.style.display = 'none';
	document.all.tabFaleConosco.style.display = 'none';	
	document.all.tabNossosEnderecos.style.display = 'none';	
	if (menuItem!='Home')	
		eval("document.all.tab" + menuItem + ".style.display = 'inline';");	
}

function GotoMenuTopoHome(vAux, strServerName)
{
	//Recupera a data atual do sistema
	strNow = fncData();

	if (vAux=='home')
	{
		window.open('http://' + strServerName + '/pages/default.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='agendaleiloes')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstLeiloes.aspx?frommenu=proximo&void=' + strNow, strTarget);
	}
	else if (vAux=='leiloesanteriores')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstleiloes.aspx?frommenu=anterior&void=' + strNow, strTarget);
	}
	else if (vAux=='suaconta')
	{
		window.open('https://' + strServerName + '/pages/suaconta/logonconta.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='documentos')
	{
		window.open('http://' + strServerName + '/pages/Documentos/frmDocumento.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='faleconosco')
	{
		window.open('http://' + strServerName + '/pages/faleconosco/frmfaleconosco.aspx?void=' + strNow, strTarget);
	}
		else if (vAux=='NossosEnderecos')
	{
		window.open('http://' + strServerName + '/pages/NossosEnderecos/ViewNossosEnderecos.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='cadastrogeral')
	{
		window.open('https://' + strServerName + '/pages/cadastrese/tipocadastro.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='oportunidades')
	{
		window.open('http://' + strServerName + '/pages/oportunidades/fraoportunidades.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='esqueciminhasenha')
	{
		window.open('https://' + strServerName + '/pages/cadastrese/esquecisenha.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='atualizarcadastro')
	{
		window.open('https://' + strServerName + '/pages/cadastrese/atualizacadastro.aspx?void=' + strNow, strTarget);
	}
	else if (vAux=='automoveis')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstleiloes.aspx?frommenu=proximo&categoria=1&void=' + strNow, strTarget);
	}
	else if (vAux=='industria')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstleiloes.aspx?frommenu=proximo&categoria=6&void=' + strNow, strTarget);
	}
	else if (vAux=='artes')
	{
		window.open('http://www.companhiadasartes.com.br');
	}
	else if (vAux=='imoveis')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstleiloes.aspx?frommenu=proximo&categoria=4&void=' + strNow, strTarget);
	}
	else if (vAux=='judiciais')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstleiloes.aspx?frommenu=proximo&categoria=5&void=' + strNow, strTarget);
	}
	else if (vAux=='cargas')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstleiloes.aspx?frommenu=proximo&categoria=2&void=' + strNow, strTarget);
	}
	else if (vAux=='geral')
	{
		window.open('http://' + strServerName + '/pages/agenda/lstleiloes.aspx?frommenu=proximo&categoria=0&void=' + strNow, strTarget);
	}
	else if (vAux=='sistema2000')
	{
		window.open('http://intranet.centraldeleiloes.com.br/logon.asp?void=<%=Now%>', 'Sistema2000');
	}
	else if (vAux=='sistema2004')
	{
		window.open('http://erp.centraldeleiloes.com.br', 'Sistema2004');
	}
	else if (vAux=='faq')
	{
		window.open('http://' + strServerName + '/pages/faq/frmfaq.aspx?void=' + strNow, strTarget);
	}	
	else if (vAux=='sn_cargas')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/salvados.htm', '_blank');
	}
	else if (vAux=='sn_industria')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/industria.htm', '_blank');
	}
	else if (vAux=='sn_imoveis')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/imoveis.htm', '_blank');
	}
	else if (vAux=='sn_veiculos')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/automoveis.htm', '_blank');
	}
	else if (vAux=='sn_arte')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/artes.htm', '_blank');
	}
	else if (vAux=='sn_judiciais')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/judiciais.htm', '_blank');
	}
	else if (vAux=='sn_geral')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/leiloes.htm', '_blank');
	}
	else if (vAux=='sn_quervender')
	{
		window.open('http://www.centraldeleiloes.com/images/cdl/contato.htm', '_blank');
	}
	
}

function opencatalogo(url)
{
	window.open(url, strTarget);
}

function fncImageSwap(imgName, trName)
{
	var strNomeImagem = '';
	strNomeImagem = Right(document.getElementById(imgName).src, 12);
	if (strNomeImagem == "positivo.gif")
	{
		document.getElementById(imgName).src = "/pages/Imagens/negativo.gif";
		document.getElementById(trName).style.display = "";
	}
	else
	{
		document.getElementById(imgName).src = "/pages/Imagens/positivo.gif";
		document.getElementById(trName).style.display = "none";
	}
}

//Função acionada pelo list de leilões do módulo "Sua Conta"
function fncBoleto(strServerName)
{
	//Recupera a data atual do sistema
	strNow = fncData();
	window.open('https://' + strServerName + '/pages/suaconta/frmboleto.aspx?void=' + strNow,'Boleto','top=60; left=8; width=770; height=390');
}

//Função acionada pelo list de lotes do leilão do módulo "Sua Conta"
function ListaLotes(IDLeilao, strServerName)
{
	//Recupera a data atual do sistema
	strNow = fncData();
	window.open('https://' + strServerName + '/pages/suaconta/listlotesconta.aspx?void=' + strNow + '&IDLeilao=' + IDLeilao, '_self')
}

//Função acionada pelo Etapa 2 do módulo "Cadastre-se"
var intClickFiltrar = 0
function fncDesabilitaBotao()
{
	intClickFiltrar = intClickFiltrar + 1
	if (intClickFiltrar==1)
		return true;
	else
		return false;
}