// JavaScript Document
var ultimo_sub_visto;
function fechar_conteudo() {
	cont_ifra.location='_blank.html';
	document.getElementById('conteudo').style.display='none';
	document.getElementById('conteudo2').style.display='none';
	document.getElementById(ultimo_sub_visto).style.display='none';
}
function thisMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}
function vai_para_textos() {
	thisMovie("geralzao").asFunc('textos');
}
function ocultar_todos() {
	//document.getElementById('instit').style.display='none';
	document.getElementById('calc_fem').style.display='none';
	document.getElementById('calc_masc').style.display='none';
	document.getElementById('calc_inf').style.display='none';
	document.getElementById('conf_fem').style.display='none';
	document.getElementById('conf_masc').style.display='none';
	document.getElementById('conf_inf').style.display='none';
	document.getElementById('cam_cama').style.display='none';
	document.getElementById('cam_mesa').style.display='none';
	document.getElementById('cam_banho').style.display='none';
}
function pronto() {
	document.getElementById('ainda_nao_carregou').style.display='none';
	document.getElementById('ja_carregou').style.display='block';
}
function pronto2() {
	document.getElementById('ainda_nao_carregou2').style.display='none';
	document.getElementById('ja_carregou2').style.display='block';
}
function abrir_conteudo(destino) {
	document.getElementById('conteudo2').style.display='none';	
	document.getElementById('ainda_nao_carregou').style.display='block';
	document.getElementById('ja_carregou').style.display='none';
	ocultar_todos();
	if (destino.indexOf('rodutos')>0) {
		if (destino.indexOf('prod_cat_id=2')>0) {
			document.getElementById('calc_fem').style.display='block';
			ultimo_sub_visto = 'calc_fem';
		}
		else if (destino.indexOf('prod_cat_id=3')>0) {
			document.getElementById('calc_masc').style.display='block';
			ultimo_sub_visto = 'calc_masc';
		}
		else if (destino.indexOf('prod_cat_id=4')>0) {
			document.getElementById('calc_inf').style.display='block';
			ultimo_sub_visto = 'calc_inf';
		}
		else if (destino.indexOf('prod_cat_id=6')>0) {
			document.getElementById('conf_fem').style.display='block';
			ultimo_sub_visto = 'conf_fem';
		}
		else if (destino.indexOf('prod_cat_id=1')>0) {
			document.getElementById('conf_masc').style.display='block';
			ultimo_sub_visto = 'conf_masc';
		}
		else if (destino.indexOf('prod_cat_id=9')>0) {
			document.getElementById('conf_inf').style.display='block';
			ultimo_sub_visto = 'conf_inf';
		}
		else if (destino.indexOf('prod_cat_id=5')>0) {
			document.getElementById('cam_cama').style.display='block';
			ultimo_sub_visto = 'cam_cama';
		}
		else if (destino.indexOf('prod_cat_id=7')>0) {
			document.getElementById('cam_mesa').style.display='block';
			ultimo_sub_visto = 'cam_mesa';
		}
		else if (destino.indexOf('prod_cat_id=8')>0) {
			document.getElementById('cam_banho').style.display='block';
			ultimo_sub_visto = 'cam_banho';
		}
	}
	else if (destino.indexOf('noticias')>-1) {
		vai_para_textos();
	}
	/*else if (destino.indexOf('textos')>-1 || destino.indexOf('loja')>-1 || destino.indexOf('cadastro')>-1 || destino.indexOf('contato')>-1 || destino.indexOf('noticias')>-1) {
		vai_para_textos();
		document.getElementById('instit').style.display='block';
		ultimo_sub_visto = 'instit';
	}*/
	cont_ifra.location=destino;
	document.getElementById('conteudo').style.display='block';	
}
function abrir_conteudo_tend(destino) {
	document.getElementById('ainda_nao_carregou2').style.display='block';
	document.getElementById('ja_carregou2').style.display='none';
	ocultar_todos();
	cont_ifra2.location=destino;
	document.getElementById('conteudo').style.display='none';	
	document.getElementById('conteudo2').style.display='block';	
}
function menu_vai(i, fig) {
	var id = document.getElementById(i);
	id.style.backgroundImage = "url(imgs/menu_"+fig+"_f2.gif)";
	id.style.color = "#FFFFFF";
}
function menu_vem(i, fig, cor) {
	var id = document.getElementById(i);
	id.style.backgroundImage = "url(imgs/menu_"+fig+"_f1.gif)";
	id.style.color = cor;
}
