/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','1501',jdecode('Rest.Marisqueira'),jdecode(''),'/1501.html','true',[],'',''],
	['PAGE','4101',jdecode('fotos1'),jdecode(''),'/4101.html','false',[],'',''],
	['PAGE','4601',jdecode('SPEZIALIT%C3%84TEN'),jdecode(''),'/4601.html','false',[],'',''],
	['PAGE','4622',jdecode('speisekarte'),jdecode(''),'/4622.html','false',[],'',''],
	['PAGE','7501',jdecode('Kalt.Vorspeisen'),jdecode(''),'/7501.html','false',[],'',''],
	['PAGE','7701',jdecode('Warme+Vorspeisen'),jdecode(''),'/7701.html','false',[],'',''],
	['PAGE','7901',jdecode('Suppen'),jdecode(''),'/7901.html','false',[],'',''],
	['PAGE','8101',jdecode('Haus+Teigwaren'),jdecode(''),'/8101.html','false',[],'',''],
	['PAGE','8301',jdecode('Fischspezialit%C3%A4ten'),jdecode(''),'/8301.html','false',[],'',''],
	['PAGE','8501',jdecode('Fleischgerichte'),jdecode(''),'/8501.html','false',[],'',''],
	['PAGE','10501',jdecode('Nachspeisen'),jdecode(''),'/10501.html','false',[],'',''],
	['PAGE','8701',jdecode('Marisqueira.+Men%C3%BC'),jdecode(''),'/8701.html','false',[],'',''],
	['PAGE','12501',jdecode('NEWS+'),jdecode(''),'/12501.html','false',[],'',''],
	['PAGE','13401',jdecode('Atlantico+bar'),jdecode(''),'/13401.html','true',[],'',''],
	['PAGE','15001',jdecode('Live+Karaoke'),jdecode(''),'/15001.html','true',[],'',''],
	['PAGE','27901',jdecode('Tino%26%23x27%3BS+Wein'),jdecode(''),'/27901.html','true',[],'',''],
	['PAGE','13101',jdecode('Kontakt'),jdecode(''),'/13101.html','true',[],'',''],
	['PAGE','13501',jdecode('Lageplan'),jdecode(''),'/13501.html','true',[],'',''],
	['PAGE','18001',jdecode('karaoke+lista+SF'),jdecode(''),'/18001.html','false',[],'',''],
	['PAGE','20201',jdecode('karaoke+fotos'),jdecode(''),'/20201.html','false',[],'',''],
	['PAGE','19501',jdecode('KARAOKE+LISTA+KTT1'),jdecode(''),'/19501.html','false',[],'',''],
	['PAGE','18301',jdecode('karaoke+lista+ktt'),jdecode(''),'/18301.html','false',[],'',''],
	['PAGE','18601',jdecode('KARAOKE+LISTA+SF1'),jdecode(''),'/18601.html','false',[],'',''],
	['PAGE','24601',jdecode('karaoke+fotos+1'),jdecode(''),'/24601.html','false',[],'',''],
	['PAGE','25901',jdecode('VIDEOS+KARAOKE'),jdecode(''),'/25901.html','false',[],'',''],
	['PAGE','25922',jdecode('KARAOKE+CONCURSO'),jdecode(''),'/25922.html','false',[],'',''],
	['PAGE','28501',jdecode('Atlantico+Bar+Fotos'),jdecode(''),'/28501.html','false',[],'',''],
	['PAGE','31601',jdecode('atlanticobar+fotos1'),jdecode(''),'/31601.html','false',[],'',''],
	['PAGE','28522',jdecode('eventos'),jdecode(''),'/28522.html','false',[],'',''],
	['PAGE','28543',jdecode('atlantico+bar+videos'),jdecode(''),'/28543.html','false',[],'',''],
	['PAGE','39201',jdecode('karaoke+fotos+2'),jdecode(''),'/39201.html','false',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='7C8EFE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11063';
theSitetree.graphicsetId='11838';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antique',
				paletteFamily: 	'7C8EFE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11063',
				graphicsetId: 	'11838',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				a_color: 		'664F23',
				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:  '1501',
internalId:  '',
customField: '20100930-224754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20100830-162751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20100828-004435'
};
webappMappings['7060']=webappMappings['7060-b15033b8527d43f026016f315da546e6']={
webappId:    '7060',
documentId:  '4101',
internalId:  'b15033b8527d43f026016f315da546e6',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20100830-181557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8701',
internalId:  '',
customField: '20100830-181540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4622',
internalId:  '',
customField: '20100830-180934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20100830-181612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20100830-181126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20100830-181203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20100830-181235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20100830-181341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20100830-181412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20100830-191022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20100830-195818'
};
webappMappings['7008']=webappMappings['7008-3546']={
webappId:    '7008',
documentId:  '13101',
internalId:  '3546',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20100902-131822'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '13501',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20100902-145502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20100901-183017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20100901-181420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100902-120750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20100901-175046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20100901-180705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20100930-225756'
};
webappMappings['7060']=webappMappings['7060-5c62a14d01bf00443f29a0c7f1faec16']={
webappId:    '7060',
documentId:  '24601',
internalId:  '5c62a14d01bf00443f29a0c7f1faec16',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20100901-211953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20100902-114503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25922',
internalId:  '',
customField: '20100901-230547'
};
webappMappings['1501']=webappMappings['1501-23979793']={
webappId:    '1501',
documentId:  '1501',
internalId:  '23979793',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20100902-120543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20100902-113709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28522',
internalId:  '',
customField: '20100902-120336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28543',
internalId:  '',
customField: '20100902-100830'
};
webappMappings['7060']=webappMappings['7060-24729918a6bdb159c6f7f79993ffaed9']={
webappId:    '7060',
documentId:  '31601',
internalId:  '24729918a6bdb159c6f7f79993ffaed9',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31601',
internalId:  '',
customField: '20100902-111627'
};
webappMappings['7060']=webappMappings['7060-c6aa6688cb6472c7fd72948b3077305d']={
webappId:    '7060',
documentId:  '39201',
internalId:  'c6aa6688cb6472c7fd72948b3077305d',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39201',
internalId:  '',
customField: '20100930-230209'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHP340INV83M';
var companyName   = 'REST.Marisqueira+Atl%C3%A2ntico';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

