var isNav = true, isIE = false, bck = false;
userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
mustInitImg = true;
function initImgID() {di = document.images; if (mustInitImg && di) { for (var i=0; i<di.length; i++) { if (!di[i].id) di[i].id=di[i].name; } mustInitImg = false;}}
function findElement(n,ly) {
	d = document;
	if (browserVers < 4)		return d[n];
	if ((browserVers >= 6) && (d.getElementById)) {initImgID; return(d.getElementById(n))}; 
	var cd = ly ? ly.document : d;
	var elem = cd[n];
	if (!elem) {
		for (var i=0;i<cd.layers.length;i++) {
			elem = findElement(n,cd.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}
function changeImages() {
	d = document;
	if (d.images) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (d.layers) {img = findElement(changeImages.arguments[i],0);}
			else {img = d.images[changeImages.arguments[i]];}
			if (img) {img.src = changeImages.arguments[i+1];}
		}
	}
}

var menus = new Array(6);
	menus[0] = 'municipio';
	menus[1] = 'apoio';
	menus[2] = 'agnoticias';
	menus[3] = 'culturadesporto';
	menus[4] = 'empresas';
	menus[5] = 'turismo';


function start(){
	//Which browser am I using? 
	if (navigator.appName.indexOf("Microsoft") != -1) {
		isIE = true;
	}else {
		if (parseInt(navigator.appVersion) >= 6) {
			isIE = true;
		}else {
			isNav = true;
		}
	}
	bck = true;

	/*
	for (var i =0 ; i < 6; i+=1){
		if ( isIE ){document.all['m'+menus[i]].style.visibility = 'hidden' ;}
		else { if (isNav){ 
				document['m'+menus[i]].visibility = 'hidden' ;
				document['m'+menus[i]].top += 12;
				document['m'+menus[i]].left +=i*6 + 10 ;
			}}
	}
	*/
	swp_images();
	return true;
}

function showmenu( m, t )
{
  if(bck) {
	  if ( isIE ){document.all['m'+m].style.visibility = 'visible' ;}
	 else {if (isNav) { document['m'+m].visibility = 'visible' ;}}
	  if (t != 0 ) changeImages( /*CMP*/m+'img' ,/*URL*/'' + path + 'images/menu/'+m+'1.gif');
  }
	return true;
}

function hidemenu( m ,t )
{
  if(bck) {
	 if ( isIE ){document.all['m'+m].style.visibility = 'hidden' ;}
	 else {if (isNav) { document['m'+m].visibility = 'hidden' ;}}
	  if(t != 0)changeImages( /*CMP*/m+'img' ,/*URL*/'' + path + 'images/menu/'+m+'.gif');
	}
	return true;
}


function swp_images() 
{
	if(imtogle==maximgs) {imtogle=0;}
	if(imgs[imtogle].current == imgs[imtogle].nmax  ) { imgs[imtogle].current = 0;}
	var i = imgs[imtogle].current;
 	changeImages( /*CMP*/''+imgs[imtogle].id,/*URL*/''+ path + imgs[imtogle].file[ i ]);
	imgs[imtogle].current +=1;  
	imtogle=imtogle+1;
	setTimeout("swp_images()", 2500);
}

function popup(ref, id, size)
{
     blah= window.open(ref,id,size + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,maximized=yes');
}

function drawBoxFreguesia(){
	document.write("<div  id = mfreguesias><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "municipio/assuncao.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m111' ,/*URL*/  path + 'images/menu/assuncao.gif');hidemenu('freguesias');hidemenu('municipio') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m111' ,/*URL*/  path + 'images/menu/assuncao1.gif'); showmenu('municipio');showmenu('freguesias');return true;\">");
	document.write("<img  name = m111 src=\"" + path + "images/menu/assuncao.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "municipio/esperanca.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m112' ,/*URL*/  path + 'images/menu/esperanca.gif'); hidemenu('freguesias');hidemenu('municipio') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m112' ,/*URL*/  path + 'images/menu/esperanca1.gif');showmenu('municipio');showmenu('freguesias');return true;\">");
	document.write("<img  name = m112 src=\"" + path + "images/menu/esperanca.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "municipio/mosteiros.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m113' ,/*URL*/  path + 'images/menu/mosteiros.gif');hidemenu('freguesias');hidemenu('municipio') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m113' ,/*URL*/  path + 'images/menu/mosteiros1.gif');showmenu('municipio');showmenu('freguesias');return true;\">");
	document.write("<img  name = m113 src=\"" + path + "images/menu/mosteiros.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");
}

function drawBoxMunicipio(){
	document.write("<div id = mmunicipio><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" valign= \"top\">");
	document.write("<tr height=\"20\"><td><a href=\"" + path + "municipio/camara.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m011' ,/*URL*/ path + 'images/menu/camara.gif'); hidemenu('municipio') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m011' ,/*URL*/ path + 'images/menu/camara1.gif'); showmenu('municipio');return true;\">");
	document.write("<img  name = m011 src=\"" + path + "images/menu/camara.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	document.write("</td></tr>");
	
	document.write("<tr height=\"20\"><td><a href=\"" + path + "municipio/projectos.asp\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m014' ,/*URL*/ path + 'images/menu/projectos.gif'); hidemenu('municipio') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m014' ,/*URL*/ path + 'images/menu/projectos1.gif'); showmenu('municipio');return true;\">");
	document.write("<img  name = m014 src=\"" + path + "images/menu/projectos.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	document.write("</td></tr>");
	
	document.write("<tr height=\"20\"><td><a href=\"" + path + "municipio/reunioes.asp\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m015' ,/*URL*/ path + 'images/menu/reunioes.gif'); hidemenu('municipio') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m015' ,/*URL*/ path + 'images/menu/reunioes1.gif'); showmenu('municipio');return true;\">");
	document.write("<img  name = m015 src=\"" + path + "images/menu/reunioes.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	document.write("</td></tr>");
	
	document.write("<tr height=\"20\"><td><a  ");
	document.write("onmouseout= \"hidemenu('freguesias'); hidemenu('municipio'); return true;\"  ");
	document.write("onmouseover= \"showmenu('municipio'); showmenu('freguesias'); return true;\">");
	document.write("<img  name = freguesiasimg src=\"" + path + "images/menu/freguesias.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	drawBoxFreguesia();
	document.write("</td></tr>");
	document.write("<tr height=\"20\"><td><a href=\"" + path + "municipio/concelho.html\"  ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m013' ,/*URL*/ path + 'images/menu/concelho.gif'); hidemenu('municipio') ;return true;\"  ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m013' ,/*URL*/ path + 'images/menu/concelho1.gif');showmenu('municipio');return true;\">");
	document.write("<img  name = m013 src=\"" + path + "images/menu/concelho.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	document.write("</td></tr>");
	document.write("<tr height=\"20\"><td><a href=\"" + path + "municipio/historia.html\"  ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m012' ,/*URL*/ path + 'images/menu/historia.gif'); hidemenu('municipio') ;return true;\"  ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m012' ,/*URL*/ path + 'images/menu/historia1.gif');showmenu('municipio');return true;\">");
	document.write("<img  name = m012 src=\"" + path + "images/menu/historia.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	document.write("</td></tr>");
	document.write("</table></div>");
}

function drawMenuMunicipio(){
	document.write("<td> <a ");
	document.write("onmouseout= \"hidemenu('municipio');\" ");
	document.write("onmouseover= \"showmenu('municipio');\"> ");
	document.write("<img name = municipioimg src=\"" + path + "images/menu/municipio.gif\" ");
	document.write("alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a> ");		 
	drawBoxMunicipio();
	document.write("<td> ");
}


function drawBoxApoio() {
	document.write("<div  id = mapoio><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "apoio/requerimentos.asp\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m021' ,/*URL*/  path + 'images/menu/requerimentos.gif');hidemenu('apoio');return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m021' ,/*URL*/  path + 'images/menu/requerimentos1.gif');showmenu('apoio');return true;\">");
	document.write("<img  name = m021 src=\"" + path + "images/menu/requerimentos.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "sugestoes/Sugestoes.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m022' ,/*URL*/  path + 'images/menu/sugestoes.gif');hidemenu('apoio');return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m022' ,/*URL*/  path + 'images/menu/sugestoes1.gif');showmenu('apoio');return true;\">");
	document.write("<img  name = m022 src=\"" + path + "images/menu/sugestoes.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a  href=\"" + path + "apoio/servicos.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m023' ,/*URL*/  path + 'images/menu/servicos.gif');hidemenu('apoio');return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m023' ,/*URL*/  path + 'images/menu/servicos1.gif');showmenu('apoio');return true;\">");
	document.write("<img  name = m023 src=\"" + path + "images/menu/servicos.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "apoio/taxas.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m024' ,/*URL*/  path + 'images/menu/taxas.gif');hidemenu('apoio');return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m024' ,/*URL*/  path + 'images/menu/taxas1.gif');showmenu('apoio');return true;\">");
	document.write("<img  name = m024 src=\"" + path + "images/menu/taxas.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "apoio/contactos.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m025' ,/*URL*/  path + 'images/menu/contactos.gif'); hidemenu('apoio'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m025' ,/*URL*/  path + 'images/menu/contactos1.gif'); showmenu('apoio');return true;\">");
	document.write("<img  name = m025 src=\"" + path + "images/menu/contactos.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");
}

function drawMenuApoio(){
	document.write("<td> <a ");
	document.write("onmouseout= \"hidemenu('apoio');\" ");
	document.write("onmouseover= \"showmenu('apoio');\"> ");
	document.write("<img name = apoioimg src=\"" + path + "images/menu/apoio.gif\" ");
	document.write("alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a> ");
	drawBoxApoio();
	document.write("<td> ");
}

function drawBoxNoticias() {
	document.write("<div  id = mnoticias><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "noticias/noticias.asp\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m131' ,/*URL*/  path + 'images/menu/ultimas.gif'); hidemenu('noticias') ; hidemenu('agnoticias'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m131' ,/*URL*/  path + 'images/menu/ultimas1.gif'); showmenu('agnoticias'); showmenu('noticias'); return true;\">");
	document.write("<img  name = m131 src=\"" + path + "images/menu/ultimas.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "noticias/imprensa.asp\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m132' ,/*URL*/  path + 'images/menu/imprensa.gif'); hidemenu('noticias') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m132' ,/*URL*/  path + 'images/menu/imprensa1.gif'); showmenu('agnoticias'); showmenu('noticias'); return true;\">");
	document.write("<img  name = m132 src=\"" + path + "images/menu/imprensa.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "noticias/destaque.asp\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m133' ,/*URL*/  path + 'images/menu/destaque.gif'); hidemenu('noticias') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m133' ,/*URL*/  path + 'images/menu/destaque1.gif'); showmenu('agnoticias'); showmenu('noticias'); return true;\">");
	document.write("<img  name = m133 src=\"" + path + "images/menu/destaque.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");
}

function drawBoxAgenda() {
	document.write("<div  id = magenda><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp?seccao=Desporto\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m231' ,/*URL*/  path + 'images/menu/desporto.gif'); hidemenu('agenda') ; hidemenu('agnoticias'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m231' ,/*URL*/  path + 'images/menu/desporto1.gif'); showmenu('agnoticias'); showmenu('agenda'); return true;\">");
	document.write("<img  name = m231 src=\"" + path + "images/menu/desporto.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp?seccao=Espectaculos\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m232' ,/*URL*/  path + 'images/menu/espectaculos.gif'); hidemenu('agenda') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m232' ,/*URL*/  path + 'images/menu/espectaculos1.gif'); showmenu('agnoticias'); showmenu('agenda'); return true;\">");
	document.write("<img  name = m232 src=\"" + path + "images/menu/espectaculos.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp?seccao=Exposições\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m233' ,/*URL*/  path + 'images/menu/exposicoes.gif'); hidemenu('agenda') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m233' ,/*URL*/  path + 'images/menu/exposicoes1.gif'); showmenu('agnoticias'); showmenu('agenda'); return true;\">");
	document.write("<img  name = m233 src=\"" + path + "images/menu/exposicoes.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp?seccao=Gastronomia\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m234' ,/*URL*/  path + 'images/menu/gastronomia.gif'); hidemenu('agenda') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m234' ,/*URL*/  path + 'images/menu/gastronomia1.gif'); showmenu('agnoticias'); showmenu('agenda'); return true;\">");
	document.write("<img  name = m234 src=\"" + path + "images/menu/gastronomia.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp?seccao=Festas\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m235' ,/*URL*/  path + 'images/menu/festas.gif'); hidemenu('agenda') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m235' ,/*URL*/  path + 'images/menu/festas1.gif'); showmenu('agnoticias'); showmenu('agenda'); return true;\">");
	document.write("<img  name = m235 src=\"" + path + "images/menu/festas.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp?seccao=Feiras\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m236' ,/*URL*/  path + 'images/menu/feiras.gif'); hidemenu('agenda') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m236' ,/*URL*/  path + 'images/menu/feiras1.gif'); showmenu('agnoticias'); showmenu('agenda'); return true;\">");
	document.write("<img  name = m236 src=\"" + path + "images/menu/feiras.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m237' ,/*URL*/  path + 'images/menu/todos.gif'); hidemenu('agenda') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m237' ,/*URL*/  path + 'images/menu/todos1.gif'); showmenu('agnoticias'); showmenu('agenda'); return true;\">");
	document.write("<img  name = m237 src=\"" + path + "images/menu/todos.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>	");
}

function drawBoxAgNoticias() {
	document.write("<div  id = magnoticias><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "noticias/destaque.asp\" ");
	document.write("onmouseout= \"hidemenu('noticias') ; hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"showmenu('agnoticias'); showmenu('noticias'); return true;\">");
	document.write("<img  name = noticiasimg src=\"" + path + "images/menu/noticias.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	drawBoxNoticias();
	document.write("</td></tr>");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp\" ");
	document.write("onmouseout= \"hidemenu('agenda'); hidemenu('agnoticias') ;return true;\" ");
	document.write("onmouseover= \"showmenu('agnoticias'); showmenu('agenda') ; return true;\">");
	document.write("<img  name = agendaimg src=\"" + path + "images/menu/agenda.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	drawBoxAgenda();
	document.write("</td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");
}

function drawMenuAgNoticias(){
	document.write("<td> <a ");
	document.write("onmouseout= \"hidemenu('agnoticias');\" ");
	document.write("onmouseover= \"showmenu('agnoticias');\"> ");
	document.write("<img name = agnoticiasimg src=\"" + path + "images/menu/agnoticias.gif\" ");
	document.write("alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a> ");
	drawBoxAgNoticias();			 
	document.write("<td> ");
}

function drawBoxDesporto() {
	document.write("<div  id = mdesporto><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "agenda/agenda.asp?seccao=Desporto\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m141' ,/*URL*/  path + 'images/menu/agenda.gif'); hidemenu('desporto') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m141' ,/*URL*/  path + 'images/menu/agenda1.gif'); showmenu('culturadesporto'); showmenu('desporto'); return true;\">");
	document.write("<img  name = m141 src=\"" + path + "images/menu/agenda.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "desporto/equipamento.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m142' ,/*URL*/  path + 'images/menu/equipamento.gif'); hidemenu('desporto') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m142' ,/*URL*/  path + 'images/menu/equipamento1.gif'); showmenu('culturadesporto'); showmenu('desporto'); return true;\">");
	document.write("<img  name = m142 src=\"" + path + "images/menu/equipamento.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "desporto/jogos.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m143' ,/*URL*/  path + 'images/menu/jogos.gif'); hidemenu('desporto') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m143' ,/*URL*/  path + 'images/menu/jogos1.gif'); showmenu('culturadesporto'); showmenu('desporto'); return true;\">");
	document.write("<img  name = m143 src=\"" + path + "images/menu/jogos.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "desporto/associacoes.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m144' ,/*URL*/  path + 'images/menu/associacoes.gif'); hidemenu('desporto') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m144' ,/*URL*/  path + 'images/menu/associacoes1.gif'); showmenu('culturadesporto'); showmenu('desporto'); return true;\">");
	document.write("<img  name = m144 src=\"" + path + "images/menu/associacoes.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");
}

function drawBoxCultura() {
	document.write("<div  id = mcultura><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "cultura/festas.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m241' ,/*URL*/  path + 'images/menu/festas.gif'); hidemenu('cultura') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m241' ,/*URL*/  path + 'images/menu/festas1.gif'); showmenu('culturadesporto'); showmenu('cultura'); return true;\">");
	document.write("<img  name = m241 src=\"" + path + "images/menu/festas.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "cultura/tradicoes.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m242' ,/*URL*/  path + 'images/menu/tradicoes.gif'); hidemenu('cultura') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m242' ,/*URL*/  path + 'images/menu/tradicoes1.gif'); showmenu('culturadesporto'); showmenu('cultura'); return true;\">");
	document.write("<img  name = m242 src=\"" + path + "images/menu/tradicoes.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "cultura/gastronomia.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m243' ,/*URL*/  path + 'images/menu/gastronomia.gif'); hidemenu('cultura') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m243' ,/*URL*/  path + 'images/menu/gastronomia1.gif'); showmenu('culturadesporto'); showmenu('cultura'); return true;\">");
	document.write("<img  name = m243 src=\"" + path + "images/menu/gastronomia.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "cultura/associacoes.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m244' ,/*URL*/  path + 'images/menu/associacoes.gif'); hidemenu('cultura') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m244' ,/*URL*/  path + 'images/menu/associacoes1.gif'); showmenu('culturadesporto'); showmenu('cultura'); return true;\">");
	document.write("<img  name = m244 src=\"" + path + "images/menu/associacoes.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "cultura/homensilustres.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m245' ,/*URL*/  path + 'images/menu/pessoas.gif'); hidemenu('cultura') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m245' ,/*URL*/  path + 'images/menu/pessoas1.gif'); showmenu('culturadesporto'); showmenu('cultura'); return true;\">");
	document.write("<img  name = m245 src=\"" + path + "images/menu/pessoas.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "cultura/artesanato.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m246' ,/*URL*/  path + 'images/menu/artesanato.gif'); hidemenu('cultura') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m246' ,/*URL*/  path + 'images/menu/artesanato1.gif'); showmenu('culturadesporto'); showmenu('cultura'); return true;\">");
	document.write("<img  name = m246 src=\"" + path + "images/menu/artesanato.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "cultura/equipamento.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m247' ,/*URL*/  path + 'images/menu/equipamento.gif'); hidemenu('cultura') ; hidemenu('culturadesporto'); return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m247' ,/*URL*/  path + 'images/menu/equipamento1.gif'); showmenu('culturadesporto'); showmenu('cultura'); return true;\">");
	document.write("<img  name = m247 src=\"" + path + "images/menu/equipamento.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");
}

function drawBoxCulturaDesporto() {
	document.write("<div  id = mculturadesporto><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a ");
	document.write("onmouseout= \"hidemenu( 'desporto'); hidemenu('culturadesporto') ;return true;\" ");
	document.write("onmouseover= \"showmenu('culturadesporto'); showmenu('desporto'); return true;\">");
	document.write("<img  name =desportoimg src=\"" + path + "images/menu/desporto.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	drawBoxDesporto();
	document.write("</td></tr>");
	document.write("<tr><td><a ");
	document.write("onmouseout= \"hidemenu('cultura'); hidemenu('culturadesporto') ;return true;\" ");
	document.write("onmouseover= \"showmenu('culturadesporto');showmenu('cultura'); return true;\">");
	document.write("<img  name = culturaimg src=\"" + path + "images/menu/cultura.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a>");
	drawBoxCultura();
	document.write("</td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>	");
}

function drawMenuCulturaDesporto(){
	document.write("<td> <a ");
	document.write("onmouseout= \"hidemenu('culturadesporto');\" ");
	document.write("onmouseover= \"showmenu('culturadesporto');\"> ");
	document.write("<img name = culturadesportoimg src=\"" + path + "images/menu/culturadesporto.gif\" ");
	document.write("alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a> ");		 
	drawBoxCulturaDesporto();
	document.write("<td> ");
}

function drawBoxEmpresas() {
	document.write("<div  id = mempresas><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "empresas/zona.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m051' ,/*URL*/  path + 'images/menu/zona.gif');hidemenu('empresas') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m051' ,/*URL*/  path + 'images/menu/zona1.gif'); showmenu('empresas');return true;\">");
	document.write("<img  name = m051 src=\"" + path + "images/menu/zona.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "empresas/empresas.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m052' ,/*URL*/  path + 'images/menu/empresas.gif');hidemenu('empresas') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m052' ,/*URL*/  path + 'images/menu/empresas1.gif'); showmenu('empresas');return true;\">");
	document.write("<img  name = m052 src=\"" + path + "images/menu/empresas.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");
}

function drawMenuEmpresas() {
	document.write("<td> <a ");
	document.write("onmouseout= \"hidemenu('empresas');\" ");
	document.write("onmouseover= \"showmenu('empresas');\"> ");
	document.write("<img name = empresasimg src=\"" + path + "images/menu/empresas.gif\" ");
	document.write("alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a> ");		 
	drawBoxEmpresas();
	document.write("<td> ");
}

function drawBoxTurismo() {
	document.write("<div  id = mturismo><table width=\"130\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td><a href=\"" + path + "turismo/patrimonio.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m061' ,/*URL*/  path + 'images/menu/patrimonio.gif');hidemenu('turismo') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m061' ,/*URL*/  path + 'images/menu/patrimonio1.gif'); showmenu('turismo');return true;\">");
	document.write("<img  name = m061 src=\"" + path + "images/menu/patrimonio.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "turismo/roteiro.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m062' ,/*URL*/  path + 'images/menu/roteiro.gif'); hidemenu('turismo') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m062' ,/*URL*/  path + 'images/menu/roteiro1.gif');showmenu('turismo');return true;\">");
	document.write("<img  name = m062 src=\"" + path + "images/menu/roteiro.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "cultura/gastronomia.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m063' ,/*URL*/  path + 'images/menu/gastronomia.gif'); hidemenu('turismo') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m063' ,/*URL*/  path + 'images/menu/gastronomia1.gif');showmenu('turismo');return true;\">");
	document.write("<img  name = m063 src=\"" + path + "images/menu/gastronomia.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr><td><a href=\"" + path + "turismo/hotelaria.html\" ");
	document.write("onmouseout= \"changeImages( /*CMP*/'m064' ,/*URL*/  path + 'images/menu/hotelaria.gif');hidemenu('turismo') ;return true;\" ");
	document.write("onmouseover= \"changeImages( /*CMP*/'m064' ,/*URL*/  path + 'images/menu/hotelaria1.gif');showmenu('turismo');return true;\">");
	document.write("<img  name = m064 src=\"" + path + "images/menu/hotelaria.gif\" alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a></td></tr>");
	document.write("<tr height = \"100%\"><td></td></tr>");
	document.write("</table></div>");	
}

function drawMenuTurismo() {
	document.write("<td> <a href=\"" + path + "turismo/turismo.html\" ");
	document.write("onmouseout= \"hidemenu('turismo');\" ");
	document.write("onmouseover= \"showmenu('turismo');\"> ");
	document.write("<img name = turismoimg src=\"" + path + "images/menu/turismo.gif\" ");
	document.write("alt=\"\" height=\"20\" width=\"130\" border=\"0\"></a> ");		 
	drawBoxTurismo();
	document.write("<td> ");
}

function drawMenu() {
		document.write("<table width=\"780\" height = \"20\" cellspacing=\"0\" cellpadding=\"0\"><tr height = \"20\"> ");		
		drawMenuMunicipio();
		drawMenuApoio();
		drawMenuAgNoticias();
		drawMenuCulturaDesporto();
		drawMenuEmpresas();
		drawMenuTurismo();
		document.write("</tr></table>");
}

function myData() {
	var months = new Array(13);
	months[1] = "Janeiro";
	months[2] = "Fevereiro";
	months[3] = "Março";
	months[4] = "Abril";
	months[5] = "Maio";
	months[6] = "Junho";
	months[7] = "Julho";
	months[8] = "Agosto";
	months[9] = "Setembro";
	months[10] = "Outubro";
	months[11] = "Novembro";
	months[12] = "Dezembro";
	/*var days = new Array(8);
	days[1] = "Domingo";
	days[2] = "Segunda-Feira";
	days[3] = "Terça-Feira";
	days[4] = "Quarta-Feira";
	days[5] = "Quinta-Feira";
	days[5] = "Segunda-Feira";
	days[6] = "Sexta-Feira";
	days[7] = "Sabado";
	*/
	var dateObj = new Date();
	//var wday = days[dateObj.getDay() + 1]
	var lmonth = months[dateObj.getMonth() + 1];
	var date = dateObj.getDate();
	var fyear = "" + dateObj.getYear();
	document.write("<div id = data><span class = \"strong_blue\"><small>");
	document.write( date+ " de " + lmonth + ", " + fyear);
	document.write("</small></span></div>");
}


function drawHeader() {
	document.write("<a name=\"top\"/>");
	document.write("<table width=\"770\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"height=\"140\"  >");
	document.write("<tr><td>");
	document.write("<table width=\"770\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >");
	document.write("<tr>");
	document.write("<td align = \"center\" width=\"480\"><a href=\"" + path + "default.asp\">"); 
	document.write("<img src=\"" + path + "images/logo.gif\" border= \"0\" alt=\"Principal\" vspace = \"5\" align=\"middle\"></a></td>");
	document.write("<td align = \"left\" width=\"70\"  ><img id = \"flor\" src=\"" + path + "images/flor.jpg\" alt=\"\" height=\"90\" border=\"0\"></td>");
	document.write("<td align = \"left\" width=\"70\" ><img id = \"cha\" src=\"" + path + "images/chamine.jpg\" alt=\"\" height=\"90\" border=\"0\"></td>");
	document.write("<td align = \"left\" width=\"70\"><img id = \"ponte\" src=\"" + path + "images/ponte.jpg\" alt=\"\" height=\"95\" ></td>");
	document.write("</tr>");
	document.write("</table>");
	myData();
	document.write("</td></tr>");
	document.write("<tr><td>");
	document.write("<br><br>");
	//drawMenu();
	
	document.write("<div id=\"menu\">");
    document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"99%\">");
    document.write("<param name=\"movie\" value=\"" + path + "script/menu_dropdown.swf\">");
    document.write("<param name=\"quality\" value=\"high\">");
    document.write("<param name=\"wmode\" value=\"transparent\">");
    document.write("<embed src=\"" + path + "script/menu_dropdown.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"99%\"></embed></object>");
    document.write("</div>");
    
    			
	document.write("</td></tr>");
	document.write("</table>");
}	

function drawFooter() {
	document.write("<table width=\"770\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\" >");
	document.write("<tr><td width = \"50\"></td><td width = \"181\"></td><td width = \"308\"></td>");
	document.write("<td width = \"60\"></td><td width = \"171\"></td><tr>");
	document.write("<tr><td></td><td>");
	document.write("<a href=\"" + path + "../mapa.html\">::<small> Mapa do Site</small></a><br>");
	document.write("<a href=\"" + path + "apoio/contactos.html\">::<small> Contactos</small></a><br>");
	document.write("<a href=\"#top\">::<small> Topo</small></a>");
	document.write("</td><td>");
	document.write("<p align=center class = \"normal_8\" style=\"text-align:center;\">");
	document.write("<span style = \"color: #27458e; font-weight: bold;\">Câmara Municipal de Arronches</span><br>");
	document.write("Praça da República Apartado 8 7340-012 ARRONCHES ");
	document.write("<br>Telefone: 245580080 Fax: 245580081</p>	");
	document.write("</td><td></td><td>");
	document.write("<a href=\"" + path + "http://www.portalegredigital.pt\"><img src=\"" + path + "script/logo_ad.gif\" alt=\"\" border=\"0\"><br><small>Portalegre Digital</small></a>");
	document.write("</td></tr><tr><td colspan=\"5\">");
	document.write("<span class = \"normal_8\" style = \"text-indent: 20px;\">Se tiver alguma <a href=\"" + path + "sugestoes/Sugestoes.html\">sugestão</a> para que possamos prestar um melhor serviço, temos todo o gosto em recebe-la!!</span>");
	document.write("</td></tr></table>");
}

function drawOption() {
	document.write("<table width=\"770\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr><td>");
	document.write("<div id=\"option\">");
	document.write("<a href=\"mapa.html\"><small>Não vê o Menu?</small></a>");	
	document.write("</div>");
	document.write("</td></tr>");
	document.write("</table>");
}