var pt_menu_bar='<table cellpadding="0" cellspacing="0" width="760" height="22"><tr style="background-image: url(\'..\/new_images\/menubar.gif\')">	<td><a href="index.html"><img src="..\/new_images\/inicio.gif" border="0" height=22><\/a><\/td>		<td><a href="javascript:;" onmouseover="menuLayers.show(\'programas\', event)" onmouseout="menuLayers.hide()"><img src="..\/new_images\/programas.gif" border="0" height=22><\/a><\/td>		<td><a href="javascript:;" onmouseover="menuLayers.show(\'precos\', event)" onmouseout="menuLayers.hide()"><img src="..\/new_images\/precos.gif" border="0" height=22><\/a><\/td>		<td><a href="pros.html"><img src="..\/new_images\/profissionais.gif" border="0" height=22><\/a><\/td>		<td><a href="principe_perfeito.html"><img src="..\/new_images\/embarcacao.gif" border="0" height=22><\/a><\/td>		<td><a href="contacts.html"><img src="..\/new_images\/contactos.gif" border="0" height=22><\/a><\/td>	<\/tr><\/table>';
var uk_menu_bar='<table cellpadding="0" cellspacing="0" width="760" height="22"><tr style="background-image: url(\'..\/new_images\/menubar.gif\')">	<td><a href="index.html"><img src="..\/new_images\/inicio_uk.gif" border="0" height=22><\/a><\/td>		<td><a href="javascript:;" onmouseover="menuLayers.show(\'programas\', event)" onmouseout="menuLayers.hide()"><img src="..\/new_images\/programas_uk.gif" border="0" height=22><\/a><\/td>		<td><a href="javascript:;" onmouseover="menuLayers.show(\'precos\', event)" onmouseout="menuLayers.hide()"><img src="..\/new_images\/precos_uk.gif" border="0" height=22><\/a><\/td>		<td><a href="pros.html"><img src="..\/new_images\/profissionais_uk.gif" border="0" height=22><\/a><\/td>		<td><a href="principe_perfeito.html"><img src="..\/new_images\/embarcacao_uk.gif" border="0" height=22><\/a><\/td>		<td><a href="contacts.html"><img src="..\/new_images\/contactos_uk.gif" border="0" height=22><\/a><\/td>	<\/tr><\/table>';

var pt_programas='<ul><li><a href="turisticos.html?programa=lisboa">Passeios Turísticos<\/a><\/li><li><a href="passeios_diarios.html">Passeios Diários<\/a><\/li><li><a href="eventos_especiais.html">Eventos Especiais<\/a><\/li><\/ul>';
var uk_programas='<ul><li><a href="turisticos.html?programa=lisboa">Turistic Trips<\/a><\/li><li><a href="passeios_diarios.html">Daily Trips<\/a><\/li><li><a href="eventos_especiais.html">Special Events<\/a><\/li><\/ul>';

var pt_precos='<ul><li><a href="prices.html?programa=turistico">Passeios Turísticos<\/a><\/li><li><a href="prices.html?programa=diario">Passeios Diários<\/a><\/li><\/ul>';
var uk_precos='<ul><li><a href="prices.html?programa=turistico;lang=uk">Turistic Trips<\/a><\/li><li><a href="prices.html?programa=diario">Daily Trips<\/a><\/li><\/ul>';

function swap_lang()
{
	divs = document.getElementsByName("pt");
	for (var i = 0; i < divs.length; i++)
	{
//		divs.item(i).style.visibility = getCookie('language') == "pt" ? "visible" : "hidden"; 
		divs.item(i).style.display = getCookie('language') == "pt" ? "block" : "none"; 
	}
	divs = document.getElementsByName('uk');
	for (var i = 0; i < divs.length; i++)
	{
		//divs.item(i).style.visibility = getCookie('language') == "uk" ? "visible" : "hidden"; 
		divs.item(i).style.display = getCookie('language') == "uk" ? "block" : "none"; 
	}
}

function getCookie(NameOfCookie)
{

// First we check to see if there is a cookie stored.
// Otherwise the length of document.cookie would be zero.

if (document.cookie.length > 0) 
{ 

// Second we check to see if the cookie's name is stored in the
// "document.cookie" object for the page.

// Since more than one cookie can be set on a
// single page it is possible that our cookie
// is not present, even though the "document.cookie" object
// is not just an empty text.
// If our cookie name is not present the value -1 is stored
// in the variable called "begin".

begin = document.cookie.indexOf(NameOfCookie+"="); 
if (begin != -1) // Note: != means "is not equal to"
{ 

// Our cookie was set. 
// The value stored in the cookie is returned from the function.

begin += NameOfCookie.length+1; 
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); } 
}
return null; 

// Our cookie was not set. 
// The value "null" is returned from the function.

}

function setCookie(NameOfCookie, value, expiredays) 
{

// Three variables are used to set the new cookie. 
// The name of the cookie, the value to be stored,
// and finally the number of days until the cookie expires.
// The first lines in the function convert 
// the number of days to a valid date.

var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

// The next line stores the cookie, simply by assigning 
// the values to the "document.cookie" object.
// Note the date is converted to Greenwich Mean time using
// the "toGMTstring()" function.

document.cookie = NameOfCookie + "=" + escape(value) + 
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
} 
 
function delCookie (NameOfCookie) 
{

// The function simply checks to see if the cookie is set.
// If so, the expiration date is set to Jan. 1st 1970.

if (getCookie(NameOfCookie)) {
document.cookie = NameOfCookie + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
