var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function newPage(nextFile) {
	var thisFile = findThisFileName ();
	if (nextFile == thisFile) return;
	if (nextFile.indexOf("/") != -1) {
		self.location.href=nextFile;
	} else {
		self.location.href="/htmls/"+nextFile+"?inpg";
	}
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
  document.write('<SCRIPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('Sub menu_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call menu_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('Sub topo_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call topo_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
} 

var fotoWindow;
function popImg(filename,extraInfo) {
	var extraHeight = extraInfo ?40 : 0;
	if (fotoWindow){
		fotoWindow.close();
	}
	fotoWindow=window.open("", "fotoWindow", "height=150,width=150,resize=yes,scrollbars=yes,status=yes");
	fotoWindow.document.write("<HTML>");
	fotoWindow.document.write("<HEAD>");
	fotoWindow.document.write("<SCRIPT LANGUAGE=\"JavaScript\">function resizeMe(picRef) {MM_showHideLayers('tempLayer','','hide');if (window.screen){ var Wlimit = screen.width-70; var Hlimit = screen.height-80; } var picW = picRef.width+50; var picH = picRef.height+70+"+extraHeight+"; var targetW = (Wlimit) ? (picW > Wlimit) ? Wlimit : picW : picW; var targetH = (Hlimit) ? (picH > Hlimit) ? Hlimit : picH : picH; window.resizeTo(targetW,targetH); var window_left = (window.screen.width/2) - ((targetW/2) + 5); 	var window_top = (window.screen.height/2) - ((targetH/2) + 22); 	window.moveTo(window_left,window_top);} </SCR"+"IPT>");
	fotoWindow.document.write('<script language="JavaScript" type="text/JavaScript">function MM_reloadPage(init) {  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);function MM_findObj(n, d) { var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_showHideLayers() { var i,p,v,obj,args=MM_showHideLayers.arguments;for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];if (obj.style) { obj=obj.style; v=(v==\'show\')?\'visible\':(v==\'hide\')?\'hidden\':v; }obj.visibility=v; }}</scr'+'ipt>');
	fotoWindow.document.write("<TITLE>Imagem</TITLE>");
	fotoWindow.document.write("<HEAD>");
	fotoWindow.document.write("<BO"+"DY onmouseover=\"window.status='';return true;\" leftmargin='10' topmargin='10' marginwidth='10' marginheight='10' bgcolor='#cccccc'>");
	fotoWindow.document.write('<div id="tempLayer" style="position:absolute; left:0; top:0; width:150; height:150; z-index:10; background-color: #cccccc; layer-background-color: #cccccc; border: 1px none #333333; visibility: visible; overflow: visible;"><table width="130" height="130"  border="0" cellpadding="0" cellspacing="0"><tr><td align="center" valign="middle"><font face="Verdana" size="2">Por favor aguarde.</font></td></tr></table></div>');
	fotoWindow.document.write("<A href=javascript:self.close()>");
	fotoWindow.document.write("<IMG name=foto id=foto src="+filename+" onLoad=resizeMe(this) border=0 alt=\"clique para fechar esta imagem\"></a>");
	if (extraInfo) {fotoWindow.document.write('<p align="center"><font face="Verdana" size="2">'+extraInfo+'</font></p>');}
	fotoWindow.document.write("</body></HTML>");
}

var infoWindow;
function popinfo(file,w,h) {
	if (infoWindow){
		infoWindow.close();
	}
	infoWindow=window.open(file, "infoWindow", "height="+h+",width="+w+",resize=no,scrollbars=yes,status=yes");
}

function findThisFileName () {
	var thisFile = self.location.href.substr(self.location.href.lastIndexOf("/")+1);
	if (thisFile.indexOf("?") >= 0){
		thisFile = thisFile.substr(0,thisFile.indexOf("?"));
	}
	return thisFile;
}

function fillLayer(objName,newText) { 
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

//-----------------------------------------

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

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];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

//-----------------------------------------------

function swapMenuImage(layerId,isOver) {
//	newImage = (isOver) ? "url(<FilePath: CustomField_tilemenu_over>)" : "url(<FilePath: CustomField_tilemenu_out>)";
//	newColor = (isOver) ? "#<Field: CustomField_cor_menu_over>" : "#<Field: CustomField_cor_menu>";
	newImage = (isOver) ? "url(/_imgs/bgtile/menus_2.jpg)" : "url(/_imgs/bgtile/menus_1.jpg)";
	newColor = (isOver) ? "#438184" : "#438184";
	document.getElementById(layerId).style.backgroundImage = newImage;
	document.getElementById(layerId).style.backgroundColor = newColor;
}

var expandedMenus = new Array();
function swapMenuText (layerId) {
	if (tree[layerId].length == 3) {
		window.location.href = (tree[layerId][2]) ? tree[layerId][2] : '/cgi-bin/getinfos.pl?'+tree[layerId][1];
		return false;
	} else if (expandedMenus[layerId]) {
		MM_setTextOfLayer(layerId,'',"<img src=/imgs/spacer.gif width=1 height=25 align=absmiddle><span class=menus><b>"+tree[layerId][0]+"</b></span>"+spacerCode);
		expandedMenus[layerId] = false;
	} else {
		MM_setTextOfLayer(layerId,'',"<img src=/imgs/spacer.gif width=1 height=25 align=absmiddle><span class=menus><b>"+tree[layerId][0]+"</b></span>"+printSubmenus(layerId)+spacerCode);
		expandedMenus[layerId] = true;
	}
}

function printSubmenus(menuId) {
	var output = '<span class=menus>';
	for(var i=3; i<tree[menuId].length; i+=3){
		output += '<br><img src=/imgs/menu_linha.gif vspace=2 hspace=0><br>&nbsp;&nbsp;&nbsp;»<a href="';
		output += (tree[menuId][i+2]) ? tree[menuId][i+2] : '/cgi-bin/getinfos.pl?'+tree[menuId][i+1];
		output += '" class=menus>'+tree[menuId][i]+'</a>';
	}
	output += '</span>';
	return output;
}

var spacerCode='<br><img src=/imgs/menu_linha.gif>';

function buildMainMenus () {
	var output = '';
	for(var i=0 in tree){
		output += "<div id="+i+" class=menu_normal onMouseOver=swapMenuImage('"+i+"',1) onMouseOut=swapMenuImage('"+i+"',0); onClick=swapMenuText('"+i+"')><img src=/imgs/spacer.gif width=1 height=25 align=absmiddle><span class=menus><b>"+tree[i][0]+spacerCode+"</b></span></div>\n";
	}
	document.write(output);
}

var tree = new Array();

tree['videosdacabana'] = ['VIDEOS DA CABANA'];
tree['videosdacabana'].push('EkyVFFuyEFoDPxktyN');
tree['videosdacabana'].push('');
tree['imagenscabana'] = ['IMAGENS CABANA '];
tree['imagenscabana'].push('EkyFFFkyplnKdUxjQN');
tree['imagenscabana'].push('');
tree['gpsdacabana'] = ['GPS DA CABANA'];
tree['gpsdacabana'].push('EkVAEZAVuuoMOVFSkI');
tree['gpsdacabana'].push('');
tree['contactos'] = ['CONTACTOS'];
tree['contactos'].push('EkklkZlAZFFXzuBUPf');
tree['contactos'].push('');
tree['conversasdacabana'] = ['CONVERSAS DA CABANA'];
tree['conversasdacabana'].push('EkplFZpEkEZEiiFsDa');
tree['conversasdacabana'].push('');
tree['conversasdacabana'] = ['CONVERSAS DA CABANA'];
tree['conversasdacabana'].push('EkpkupAlEltYfkdpzg');
tree['conversasdacabana'].push('');
tree['momentosunicos'] = ['Momentos únicos'];
tree['momentosunicos'].push('EEZFFEAZypdZordtgK');
tree['momentosunicos'].push('');
tree['aequipadosparodiantes'] = ['A EQUIPA DOS PARODIANTES'];
tree['aequipadosparodiantes'].push('EkpluVZppFnJyfSPCK');
tree['aequipadosparodiantes'].push('');
tree['oblogamore1cabana'] = ['O BLOG AMORE1CABANA'];
tree['oblogamore1cabana'].push('EkpkuEFplADlTyeniO');
tree['oblogamore1cabana'].push('http://amore1cabana.blogspot.com');
tree['novidades'] = ['novidades'];
tree['novidades'].push('EEylyVyEFFRpTngPjH');
tree['novidades'].push('');
tree['artigosimprensa'] = ['ARTIGOS IMPRENSA'];
tree['artigosimprensa'].push('EkuAlZEkpEJaUXVOKB');
tree['artigosimprensa'].push('');
tree['historicodasconversas'] = ['HISTORICO DAS CONVERSAS'];
tree['historicodasconversas'].push('EkFlZkFuVZljEyfEPZ');
tree['historicodasconversas'].push('');
tree['festasfestarolasefolias'] = ['FESTAS, FESTAROLAS E FOLIAS'];
tree['festasfestarolasefolias'].push('EkEpyFAuAkBzvdtbzB');
tree['festasfestarolasefolias'].push('');
tree['revistaparadadapardia'] = ['REVISTA PARADA DA PARÓDIA'];
tree['revistaparadadapardia'].push('EkEZuVEllyjjnysXHF');
tree['revistaparadadapardia'].push('');
tree['concursosradiofnicos'] = ['CONCURSOS RADIOFÓNICOS'];
tree['concursosradiofnicos'].push('EkEpyukyuyDMvFismB');
tree['concursosradiofnicos'].push('');
tree['patilhaseventoinha'] = [' PATILHAS E VENTOINHA'];
tree['patilhaseventoinha'].push('EEApyVZZyuUVcQDkjv');
tree['patilhaseventoinha'].push('');
tree['gloriososanunciantes'] = ['GLORIOSOS ANUNCIANTES'];
tree['gloriososanunciantes'].push('EkFZFuklyFilaQcZOA');
tree['gloriososanunciantes'].push('');
tree['historiadosparodiantes'] = ['HISTORIA DOS PARODIANTES '];
tree['historiadosparodiantes'].push('EkFuZVFllVhEXdqzes');
tree['historiadosparodiantes'].push('');
tree['entradassopasevinhos'] = ['ENTRADAS SOPAS E VINHOS '];
tree['entradassopasevinhos'].push('EkFZVEFpyVNYQhpqAR');
tree['entradassopasevinhos'].push('');
tree['saladassaladesvegetariano'] = ['SALADAS-SALADÕES-VEGETARIANO '];
tree['saladassaladesvegetariano'].push('EkFFEplAylpSBtyNOL');
tree['saladassaladesvegetariano'].push('');
tree['peixescarneseomeletas'] = ['PEIXES CARNES E OMELETAS'];
tree['peixescarneseomeletas'].push('EkFZukZVFpzrnxTYOa');
tree['peixescarneseomeletas'].push('');
tree['exposicoes'] = ['Exposições'];
tree['exposicoes'].push('EEulkAZpllRAmotyBs');
tree['exposicoes'].push('');

tree['ekpkupaleltyfkdpzg'].push('Histórico das conversas');
tree['ekpkupaleltyfkdpzg'].push('EkFlZkEykygGDSwfvk');
tree['ekpkupaleltyfkdpzg'].push('http://amore1cabana.blogspot.com/2009/04/historico-das-conversas-da-cabana.html');
tree['ekplfzpekezeiifsda'].push('Histórico das Conversas ');
tree['ekplfzpekezeiifsda'].push('EkFlZkkAukAqfPQcNE');
tree['ekplfzpekezeiifsda'].push('http://amore1cabana.blogspot.com/2009/04/historico-das-conversas-da-cabana.html');
tree['ekpkupaleltyfkdpzg'].push('Histórico das Conversas ');
tree['ekpkupaleltyfkdpzg'].push('EkFlZkkllATMsFPCmH');
tree['ekpkupaleltyfkdpzg'].push('http://amore1cabana.blogspot.com/2009/04/historico-das-conversas-da-cabana.html');
tree['eeulkazppaeimyyaoq'].push('Festas, Festarolas e Folias');
tree['eeulkazppaeimyyaoq'].push('EkEpyFlZEyqwlXorGe');
tree['eeulkazppaeimyyaoq'].push('');
tree['cardapio'].push('Entradas e Sopas');
tree['cardapio'].push('EEulFpylZkqBkmqYJm');
tree['cardapio'].push('');
tree['historial'].push('Concursos Radiofónicos');
tree['historial'].push('EEulkAAVuyacoISuvl');
tree['historial'].push('');
tree['cardapio'].push('Omeletas');
tree['cardapio'].push('EEulFpyZpAFiythXJn');
tree['cardapio'].push('');
tree['historial'].push('25 de Abril');
tree['historial'].push('EEulkAAVAkmKmVqocj');
tree['historial'].push('');
tree['cardapio'].push('Carnes');
tree['cardapio'].push('EEulFpyZupFzQzAVSH');
tree['cardapio'].push('');
tree['historial'].push('Televisão');
tree['historial'].push('EEulkAAykZkhALUSHR');
tree['historial'].push('');
tree['cardapio'].push('Peixes');
tree['cardapio'].push('EEulFpyZZFMtvBrxnm');
tree['cardapio'].push('');
tree['historial'].push('Publicação');
tree['historial'].push('EEulkAAyyuSxyrHMLb');
tree['historial'].push('');
tree['cardapio'].push('Saladas');
tree['cardapio'].push('EEulFpylFpgBBCtDMA');
tree['cardapio'].push('');
tree['historial'].push('As Vozes');
tree['historial'].push('EEulkAAZpulUgfnBrq');
tree['historial'].push('');
tree['cardapio'].push('Sobremesas');
tree['cardapio'].push('EEulFpyyyEEDUxkiWg');
tree['cardapio'].push('');
tree['historial'].push('O Nome');
tree['historial'].push('EEulkAAZukwOULAJxZ');
tree['historial'].push('');
tree['cardapio'].push('Vinhos');
tree['cardapio'].push('EEulFpyApEbWSywcHL');
tree['cardapio'].push('');
tree['historial'].push('Teatro');
tree['historial'].push('EEulkAAZZyUliJCmUR');
tree['historial'].push('');
tree['historial'].push('Personagens');
tree['historial'].push('EEulFpyuyppzRrCTTi');
tree['historial'].push('');
tree['eeulkazppaeimyyaoq'].push('Os Primórdios da Cabana');
tree['eeulkazppaeimyyaoq'].push('EEulkAAlElYbyJpPsq');
tree['eeulkazppaeimyyaoq'].push('');
tree[101] = ['Galerias'];
tree[101].push('');
tree[101].push('/htmls/galerias.shtml');


   
    
tree[105] = ['Contactos'];
tree[105].push('');
tree[105].push('/htmls/contactos.shtml');