// Funç&#259;o para mostrar uma div de fora do link
function mostraDiv(id){
	for(i=0; i<=7; i++){
		if(eval("document.getElementById('div" + i + "')")){
			eval("document.getElementById('div" + i + "').className = 'some';");
			//eval("document.getElementById('div" + i + "').style.display = 'none';");
			//eval("document.getElementById('div" + i + "').style.visibility = 'hidden';");
		}
	}
	if(eval("document.getElementById('div" + id	 + "')")){
		eval("document.getElementById('div" + id + "').className = 'aparece';");
		//eval("document.getElementById('div" + id + "').style.display = 'block';");
		//eval("document.getElementById('div" + id + "').style.visibility = 'visible';");
	}
}
function mostraDiv2(id){
	for(i=0; i<=7; i++){
		if(eval("document.getElementById('div2" + i + "')")){
			eval("document.getElementById('div2" + i + "').className = 'some';");
			//eval("document.getElementById('div" + i + "').style.display = 'none';");
			//eval("document.getElementById('div" + i + "').style.visibility = 'hidden';");
		}
	}
	if(eval("document.getElementById('div2" + id	 + "')")){
		eval("document.getElementById('div2" + id + "').className = 'aparece';");
		//eval("document.getElementById('div" + id + "').style.display = 'block';");
		//eval("document.getElementById('div" + id + "').style.visibility = 'visible';");
	}
}


//funç&#259;o q aparece a div popup do mapa do rudge

function apareceDiv(){
	document.getElementById('divPopUP').className = 'popAbre';
}

function someDiv(){
	document.getElementById('divPopUP').className = 'popFecha';
}

function apareceDesapareceDiv(){
	if(document.getElementById('divMapa').className == 'divMapaRRsome'){
		document.getElementById('divMapa').className = 'divMapaRR';
	}else {
		document.getElementById('divMapa').className = 'divMapaRRsome';
	}
}

function abreImg(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//funç&#259;o q troca a classe de uma div qualquer

function trocaClasse(){
	if(document.getElementById('divTroca').className == 'leg1'){
		document.getElementById('divTroca').className = 'leg2';
	}else {
		document.getElementById('divTroca').className = 'leg1';
	}
}

/*
By   : Rodrigo Celebrone
Desc : função para abrir popup crossbrowser
Ex   : fn_abrepopup(500,500,'/endereco/absoluto/da/pagina.cfm','NomeDaPagina',1); 1 para SCROLL, 2 para AUTO, 0 para NO
*/
function fn_abrepopup(_X,_Y,_Page,_Nome,n_){
	var popup_largura = window.screen.width;
	var popup_altura = window.screen.height;
	var popup_x = _X;
	var popup_y = _Y;
	var _X = _X - 12;/* Subtrair 12 das barras laterais da janela popup */
	var _Y = _Y - 56;/* Subtrair 56 da barra do menu iniciar do windows e barras de titulo da janela */
	var var_x = (parseInt(popup_largura)/2) - (parseInt(popup_x)/2);// metade do width
	var var_y = (parseInt(popup_altura)/2) - (parseInt(popup_y)/2);// metade do height
	if(n_ == 1){
			n_ = 'scrollbars=yes';
		}else if(n_ == 2){
			n_ = 'scrollbars=auto';
		}else{
			n_ = null;
		}
	window.open(_Page,_Nome,'width='+_X+',height='+_Y+',left='+var_x+',top='+var_y+','+n_);
}