/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','101101',jdecode('Sponsoren'),jdecode(''),'/101101.html','true',[],'',''],
	['PAGE','114001',jdecode('Presse'),jdecode(''),'/114001/index.html','true',[ 
		['PAGE','114022',jdecode('Download+Medieninfos'),jdecode(''),'/114001/114022.html','true',[],'',''],
		['PAGE','114043',jdecode('Download+Pressebilder'),jdecode(''),'/114001/114043.html','true',[],'',''],
		['PAGE','114064',jdecode('Download+Medienspiegel'),jdecode(''),'/114001/114064.html','true',[],'','']
	],'',''],
	['PAGE','2801',jdecode('Das+Team'),jdecode(''),'/2801/index.html','true',[ 
		['PAGE','126501',jdecode('77-83'),jdecode(''),'/2801/126501.html','true',[],'','']
	],'',''],
	['PAGE','2843',jdecode('Die+Geschichte'),jdecode(''),'/2843.html','true',[],'',''],
	['PAGE','86101',jdecode('Bilder+%2F+Pictures'),jdecode(''),'/86101/index.html','true',[ 
		['PAGE','140501',jdecode('Feusisberg+08'),jdecode(''),'/86101/140501.html','true',[],'',''],
		['PAGE','135101',jdecode('Limpach+08'),jdecode(''),'/86101/135101.html','true',[],'',''],
		['PAGE','132801',jdecode('Arcadia+Ittigen+08'),jdecode(''),'/86101/132801.html','true',[],'',''],
		['PAGE','132701',jdecode('Probelauf+Witzwil+08'),jdecode(''),'/86101/132701.html','true',[],'',''],
		['PAGE','120401',jdecode('Bahnhof+Bern+08'),jdecode(''),'/86101/120401.html','true',[],'',''],
		['PAGE','111801',jdecode('Nestl%C3%A9anlass+'),jdecode(''),'/86101/111801.html','true',[],'',''],
		['PAGE','110101',jdecode('Grimsel+Kick-Off+07'),jdecode(''),'/86101/110101.html','true',[],'',''],
		['PAGE','87901',jdecode('Chicago+Culinary+Classic+07'),jdecode(''),'/86101/87901.html','true',[],'',''],
		['PAGE','90401',jdecode('CH-Botschaft+Washington'),jdecode(''),'/86101/90401.html','true',[],'',''],
		['PAGE','95701',jdecode('Teambilder+USA+07'),jdecode(''),'/86101/95701.html','true',[],'',''],
		['PAGE','42301',jdecode('Luxemburg+06'),jdecode(''),'/86101/42301.html','true',[],'','']
	],'',''],
	['PAGE','33801',jdecode('Die+Erfolge'),jdecode(''),'/33801.html','true',[],'',''],
	['PAGE','27701',jdecode('Links+'),jdecode(''),'/27701/index.html','true',[ 
		['PAGE','47801',jdecode('Internationale+Kochverb%C3%A4nde'),jdecode(''),'/27701/47801.html','true',[],'',''],
		['PAGE','65801',jdecode('Regionalmannschaften'),jdecode(''),'/27701/65801.html','true',[],'','']
	],'',''],
	['PAGE','16306',jdecode('G%C3%A4stebuch'),jdecode(''),'/16306/index.html','true',[ 
		['PAGE','16301',jdecode('Hier+die+neuesten+Eintr%C3%A4ge%21'),jdecode(''),'/16306/16301.html','false',[],'','']
	],'',''],
	['PAGE','85201',jdecode('Archiv'),jdecode(''),'/85201.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2495';
theSitetree.keyvisualName='empty.jpg';
theSitetree.fontsetId='436';
theSitetree.graphicsetId='487';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2495',
				keyvisualName: 	'empty.jpg',
				fontsetId: 		'436',
				graphicsetId: 	'487',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-16306ahopt0ineljm']={
webappId:    '1002',
documentId:  '16306',
internalId:  '16306ahopt0ineljm',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-4f16351fc7b4e9676f551eca0e124b38']={
webappId:    '7060',
documentId:  '42301',
internalId:  '4f16351fc7b4e9676f551eca0e124b38',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-bf65e18815b8136039b1102a3294e9fd']={
webappId:    '7060',
documentId:  '87901',
internalId:  'bf65e18815b8136039b1102a3294e9fd',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-5160910fa4bdc8da3765c80b38fef360']={
webappId:    '7060',
documentId:  '90401',
internalId:  '5160910fa4bdc8da3765c80b38fef360',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-2b2feeab37923c5cc6bfb46de5483b1a']={
webappId:    '7060',
documentId:  '95701',
internalId:  '2b2feeab37923c5cc6bfb46de5483b1a',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-4c064214e3d36062e615eb73203307de']={
webappId:    '7060',
documentId:  '110101',
internalId:  '4c064214e3d36062e615eb73203307de',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-2484d4d2e740c80d58e0498e5c1b28c7']={
webappId:    '7060',
documentId:  '111801',
internalId:  '2484d4d2e740c80d58e0498e5c1b28c7',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-8702942']={
webappId:    '1501',
documentId:  '501',
internalId:  '8702942',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-481b995bd1ab2f953e7ddb9e178051ff']={
webappId:    '7060',
documentId:  '120401',
internalId:  '481b995bd1ab2f953e7ddb9e178051ff',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-508084e2c257a9bfdcd8c247b1c1eb2b']={
webappId:    '7060',
documentId:  '132701',
internalId:  '508084e2c257a9bfdcd8c247b1c1eb2b',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-45a49bc1d17e0d786619a7014bb964b3']={
webappId:    '7060',
documentId:  '132801',
internalId:  '45a49bc1d17e0d786619a7014bb964b3',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-bcc16856d6268e885513ded01ffb17e9']={
webappId:    '7060',
documentId:  '135101',
internalId:  'bcc16856d6268e885513ded01ffb17e9',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-f6a8c7bccd2a549223b53b446047327c']={
webappId:    '7060',
documentId:  '140501',
internalId:  'f6a8c7bccd2a549223b53b446047327c',
customField: 'language:de;country:CH;'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0INELJM';
var companyName   = 'SWISSCULINARYNATIONALTEAM';
var htmlTitle	  = 'Swiss+Culinary+National+Team+Schweizer+Kochnationalmannschaft';
var metaKeywords  = 'Swiss+Culinary+National+Team+Schweizer+Kochnationalmannschaft+Swiss+Culinary+Team+Culinary+Team+Switzerland+Rasmus+Springbrunn+Beat+Weibel+Richard+Lang+Rolf+M%C3%BCrner+Thomas+Riesen+Muharem+Musagic+Kochkunst+Kochkunstausstellung+Kochkunstbilder+Bilder+Kochkunst+Culinaryteamswitzerland+Schweizer+Kochnationalmannschaft+Schweizerkochnationalmannschaft+Swissculinarynationalteam+Swiss+National+Culinary+Team+Hugo+Wanner+Reto+W%C3%A4lti+Culinary+art+team+Culinary+team+switzerland+national+culinary+team+schweizer+koch+nationalmannschaft+swiss+culinary+culinary+team+culinary+team+switzerland+';
var metaContents  = 'Swiss+Culinary+National+Team+Schweizer+Kochnationalmannschaft+Swissculinarynationalteam+';
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();
};
