/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var theSitetree=[ 
	['PAGE','2289',jdecode('Home+-+Italiano'),jdecode(''),'/2289/index.html','true',[ 
		['PAGE','3912',jdecode('Come+Trovarci'),jdecode(''),'/2289/3912.html','true',[],''],
		['PAGE','3933',jdecode('Mappa'),jdecode(''),'/2289/3933.html','true',[],''],
		['PAGE','3954',jdecode('Luoghi+di+Interesse'),jdecode(''),'/2289/3954.html','true',[],''],
		['PAGE','4017',jdecode('Contatti'),jdecode(''),'/2289/4017.html','true',[],''],
		['PAGE','4038',jdecode('Tariffe'),jdecode(''),'/2289/4038.html','true',[],'']
	],''],
	['PAGE','3996',jdecode('Gallery'),jdecode(''),'/3996.html','true',[],''],
	['PAGE','4059',jdecode('Home+-+English+'),jdecode(''),'/4059/index.html','true',[ 
		['PAGE','17212',jdecode('How+to+get'),jdecode(''),'/4059/17212.html','true',[],''],
		['PAGE','17233',jdecode('Further+Information'),jdecode(''),'/4059/17233.html','true',[],''],
		['PAGE','17254',jdecode('Rates'),jdecode(''),'/4059/17254.html','true',[],''],
		['PAGE','17275',jdecode('Contact'),jdecode(''),'/4059/17275.html','true',[],'']
	],''],
	['PAGE','4080',jdecode('Home+-+Deutsch+'),jdecode(''),'/4080/index.html','true',[ 
		['PAGE','14312',jdecode('Wegbeschreibung'),jdecode(''),'/4080/14312.html','true',[],''],
		['PAGE','14412',jdecode('Weitere+Informationen'),jdecode(''),'/4080/14412.html','true',[],''],
		['PAGE','14812',jdecode('Preise'),jdecode(''),'/4080/14812.html','true',[],''],
		['PAGE','14833',jdecode('Kontakte'),jdecode(''),'/4080/14833.html','true',[],'']
	],''],
	['PAGE','10712',jdecode('Home+-+Portugu%C3%AAs'),jdecode(''),'/10712/index.html','true',[ 
		['PAGE','18812',jdecode('Como+Chegar'),jdecode(''),'/10712/18812.html','true',[],''],
		['PAGE','18833',jdecode('Informa%C3%A7%C3%B5es+Adicionais'),jdecode(''),'/10712/18833.html','true',[],''],
		['PAGE','18854',jdecode('Tarifas'),jdecode(''),'/10712/18854.html','true',[],''],
		['PAGE','18875',jdecode('Contatos'),jdecode(''),'/10712/18875.html','true',[],'']
	],''],
	['PAGE','18312',jdecode('Home+-+Espa%C3%B1ol'),jdecode(''),'/18312/index.html','true',[ 
		['PAGE','19712',jdecode('Como+Llegar'),jdecode(''),'/18312/19712.html','true',[],''],
		['PAGE','19733',jdecode('Informaciones+Importantes'),jdecode(''),'/18312/19733.html','true',[],''],
		['PAGE','19754',jdecode('Tarifas'),jdecode(''),'/18312/19754.html','true',[],''],
		['PAGE','19775',jdecode('Contactos'),jdecode(''),'/18312/19775.html','true',[],'']
	],''],
	['PAGE','26012',jdecode('Guestbook+2007'),jdecode(''),'/26012.html','true',[],''],
	['PAGE','39845',jdecode('Guestbook+2008'),jdecode(''),'/39845.html','true',[],''],
	['PAGE','51967',jdecode('Guestbook+2009'),jdecode(''),'/51967.html','true',[],''],
	['PAGE','4101',jdecode('Link'),jdecode(''),'/4101.html','true',[],'']];
var siteelementCount=31;
theSitetree.topTemplateName='Rivet';
theSitetree.paletteFamily='33405B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17272';
theSitetree.graphicsetId='12686';
theSitetree.contentColor='D3A62A';
theSitetree.contentBGColor='363B49';
var localeDef={
  language: 'it',
  country: 'IT'
};
var theTemplate={
				name: 			'Rivet',
				paletteFamily: 	'33405B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17272',
				graphicsetId: 	'12686',
				contentColor: 	'D3A62A',
				contentBGColor: '363B49',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2289',
internalId:  '',
customField: '20090219-211422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10712',
internalId:  '',
customField: '20080714-155630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3912',
internalId:  '',
customField: '20070607-003552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3954',
internalId:  '',
customField: '20070628-195145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4017',
internalId:  '',
customField: '20090323-131736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18312',
internalId:  '',
customField: '20080714-155517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4038',
internalId:  '',
customField: '20090728-214413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4059',
internalId:  '',
customField: '20080714-155251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4080',
internalId:  '',
customField: '20080714-155402'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2289',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-2318905']={
webappId:    '1501',
documentId:  '2289',
internalId:  '2318905',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3933',
internalId:  '',
customField: '20070713-183628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3996',
internalId:  '',
customField: '20070622-174547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20081213-023712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14312',
internalId:  '',
customField: '20070713-183948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14412',
internalId:  '',
customField: '20070628-194721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14812',
internalId:  '',
customField: '20090728-214713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14833',
internalId:  '',
customField: '20090323-131853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17212',
internalId:  '',
customField: '20070713-183759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17233',
internalId:  '',
customField: '20070626-171337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17254',
internalId:  '',
customField: '20090728-214603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17275',
internalId:  '',
customField: '20090323-131803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18812',
internalId:  '',
customField: '20070713-184044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18833',
internalId:  '',
customField: '20070703-164820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18854',
internalId:  '',
customField: '20090728-215124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18875',
internalId:  '',
customField: '20090323-131825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19712',
internalId:  '',
customField: '20070713-184351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19733',
internalId:  '',
customField: '20070703-165900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19754',
internalId:  '',
customField: '20090728-215237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19775',
internalId:  '',
customField: '20090323-131955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26012',
internalId:  '',
customField: '20080402-020112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39845',
internalId:  '',
customField: '20090422-000717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51967',
internalId:  '',
customField: '20090422-004218'
};
var canonHostname = 'fe3.cm4all.tiscali.sys';
var accountId     = 'ATC030IN2GNR';
var companyName   = '*****LIBERTY+ROME+Bed+and+Breakfast*****';
var htmlTitle	  = 'BB+ROMA+CENTRO+-+LIBERTY+ROME+BB';
var metaKeywords  = 'liberty+rome%2C+libertyrome%2C+liberty+rome+BB%2C+libertyromebb%2C+libertyrome.bb%2C+bed+and+breakfast%2C+BB%2C+liberty+rome+BB%2C+11+liberty+rome%2C+roma+centro%2C+cappella+sistina%2C+san+pietro%2C+vaticano%2C+alloggi+economici+roma+centro%2C+alloggi+economici+roma%2C+rooms+in+rome%2C+principali+monumenti%2C+vicino+a%2C+a+pochi+metri+da%2C+a+pochi+passi+da%2C+camere+con+vista%2C+vacanze+romane%2C+zona+centrale%2C+zona+commerciale%2C+shopping%2C+holiday+in+rome%2C+dormire+a+roma%2C+prezzi+convenienti%2C+hotel%2C+zimmer%2C+in+Rom+schlafen%2C+Rom+Vatican%2C+Sistine+Chapel%2C+rates+to+go%2C+Rom+Zentrum%2C+Downtown+Rome%2C+Rome+Center';
var metaContents  = 'BB+Roma+centro%2C+tra+San+Pietro+e+Piazza+del+Popolo%2C+pochissimi+passi+da+Cappella+Sistina%2C+camere+massimo+confort+e+tutti+i+servizi%2C+ottimo+rapporto+qualit%C3%A0%2Fprezzo.';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};

