function stopError() {
return true;
}

window.onerror = stopError;

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

pasta = "menu/";

function MudaTD(q,id){
	if(q == 1){
		window.document.getElementById("td"+id).style.backgroundColor = "#625C4E";
	}else{
		window.document.getElementById("td"+id).style.backgroundColor = "#888377"
	}
}

function Muda(q,id,nome){
MudaImage(q,id,nome);
MudaSeta(q,id);
MudaTD(q,id); }

function Esconde(oid){
	if(document.all){
			document.all(oid).style.display = "none";
	}else if(document.getElementById){
			document.getElementById(oid).style.display = "none";
	}
}

ultimoid = -1;
penultimo = -1;

function Mostra(id){
//alert('ID: ' + id + '\nUID: ' + ultimoid + '\nPenultimo: ' +penultimo + '');
//if((penultimo == 'display2') && (ultimoid == 'display3') && (id == 'display4')) {
//} else {
if(ultimoid != -1) { Esconde(ultimoid); }
	if(document.all){
		if(abriu != -1) {
			Esconde(abriu);
			if(id != abriu) { abriu = -1; Mostra(id); }
			abriu = -1;
		} else {
			document.all(id).style.display = "block";
			abriu = id;
			if(iabrir == id) { omesmo = 1; } else { omesmo = 2; }
		}
	}else if(document.getElementById){
		if(abriu != -1) {
			Esconde(abriu);
			if(id != abriu) { abriu = -1; Mostra(id); }
			abriu = -1;
		} else {
			document.getElementById(id).style.display = "block";
			abriu = id;
			if(iabrir == id) { omesmo = 1; } else { omesmo = 2; }
		}
	}
penultimo = ultimoid;
ultimoid = id;
//}
}

function MostraMenu(abrir){
	iabrir = "display"+abrir;
	if(document.all){
			document.all('menuinteiro').style.display = "block";
			document.all('carregando').style.display = "none";
	}else if(document.getElementById){
			document.getElementById('menuinteiro').style.display = "block";
			document.getElementById('carregando').style.display = "none";
	}
	abriu = -1;
	if(abrir != -1) {
		Mostra('display'+abrir);
	}
}

function Abre(pg,ext,pasta) {
	if((pg == "temp") || (pg == "index")) {
		top.document.location = pg + "." + ext;
	} else {
		top.document.location = "tgf.php?pag=" + pg + "&ext=" + ext + "&idmenu=" + pasta;
	}
}

//-->

