/* [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','1247',jdecode('Home'),jdecode(''),'/1247.html','true',[],'',''],
	['PAGE','1268',jdecode('Sommer-Ap%C3%A9ro'),jdecode(''),'/1268.html','true',[],'',''],
	['PAGE','55823',jdecode('Programm+2010%2F2011'),jdecode(''),'/55823/index.html','true',[ 
		['PAGE','43265',jdecode('Nachschau+2010'),jdecode(''),'/55823/43265.html','true',[],'',''],
		['PAGE','43244',jdecode('Nachschau+2009'),jdecode(''),'/55823/43244.html','true',[],'',''],
		['PAGE','43223',jdecode('Nachschau+2008'),jdecode(''),'/55823/43223.html','true',[],'',''],
		['PAGE','10101',jdecode('Nachschau+2007'),jdecode(''),'/55823/10101.html','true',[],'','']
	],'',''],
	['PAGE','14301',jdecode('Presse'),jdecode(''),'/14301/index.html','true',[ 
		['PAGE','74523',jdecode('Alexia+Gardner+%26+offbeat+Jazztrio'),jdecode(''),'/14301/74523.html','true',[],'',''],
		['PAGE','68123',jdecode('Tango+Sensations+27.4.10'),jdecode(''),'/14301/68123.html','true',[],'',''],
		['PAGE','66423',jdecode('Mat+Callahan%26%23x27%3Bs+San+Francisco'),jdecode(''),'/14301/66423.html','true',[],'',''],
		['PAGE','63623',jdecode('Chamber+Soul+7.4.10'),jdecode(''),'/14301/63623.html','true',[],'',''],
		['PAGE','60723',jdecode('X-elle+30.3.10'),jdecode(''),'/14301/60723.html','true',[],'',''],
		['PAGE','59323',jdecode('Togg+Seven+22.3.10'),jdecode(''),'/14301/59323.html','true',[],'',''],
		['PAGE','41823',jdecode('m%C3%BBr%2C+13.1.10'),jdecode(''),'/14301/41823.html','true',[],'',''],
		['PAGE','39623',jdecode('off%26out+Vorschau+4.1.10'),jdecode(''),'/14301/39623.html','true',[],'',''],
		['PAGE','37923',jdecode('Sarda%2C+29.12.09.+iwp'),jdecode(''),'/14301/37923.html','true',[],'',''],
		['PAGE','38923',jdecode('Sarda+30.12.09%2C+WZ'),jdecode(''),'/14301/38923.html','true',[],'',''],
		['PAGE','47623',jdecode('Aion+Quintett+28.1.10'),jdecode(''),'/14301/47623.html','true',[],'',''],
		['PAGE','36923',jdecode('Gossau+Gospel+Choir+16.12.09'),jdecode(''),'/14301/36923.html','true',[],'',''],
		['PAGE','62323',jdecode('Stefano+Romerio+2.12.09'),jdecode(''),'/14301/62323.html','true',[],'',''],
		['PAGE','32865',jdecode('Thomas+Scheytt+25.11.09'),jdecode(''),'/14301/32865.html','true',[],'',''],
		['PAGE','32823',jdecode('voice+meets+piano+6.11.09'),jdecode(''),'/14301/32823.html','true',[],'',''],
		['PAGE','29423',jdecode('Altstadt+Ramblers+4.11.09'),jdecode(''),'/14301/29423.html','true',[],'',''],
		['PAGE','14322',jdecode('Dem+Fl%C3%BCgel+Fl%C3%BCgel+verliehen'),jdecode(''),'/14301/14322.html','true',[],'',''],
		['PAGE','62023',jdecode('Der+Mut+hat+sich+ausbezahlt'),jdecode(''),'/14301/62023.html','true',[],'',''],
		['PAGE','61623',jdecode('Monday+Night+Music+neu+im+Park'),jdecode(''),'/14301/61623.html','true',[],'','']
	],'',''],
	['PAGE','70923',jdecode('Roli%26%23x27%3Bs+Fotos'),jdecode(''),'/70923.html','true',[],'',''],
	['PAGE','50023',jdecode('Gala+Night-Music+2011'),jdecode(''),'/50023/index.html','true',[ 
		['PAGE','82623',jdecode('Band+Sponsoring'),jdecode(''),'/50023/82623.html','true',[],'',''],
		['PAGE','80923',jdecode('Komitee+Gala+Night-Music'),jdecode(''),'/50023/80923.html','true',[],'','']
	],'',''],
	['PAGE','3501',jdecode('Mitglied+werden%3F'),jdecode(''),'/3501.html','true',[],'',''],
	['PAGE','3522',jdecode('Statuten'),jdecode(''),'/3522.html','true',[],'',''],
	['PAGE','1342',jdecode('Kontakt'),jdecode(''),'/1342.html','true',[],'',''],
	['PAGE','1321',jdecode('G%C3%A4stebuch'),jdecode(''),'/1321.html','true',[],'',''],
	['PAGE','3543',jdecode('Restaurant+Park'),jdecode(''),'/3543.html','true',[],'',''],
	['PAGE','11201',jdecode('Unser+Pianoservice'),jdecode(''),'/11201.html','true',[],'',''],
	['PAGE','83823',jdecode('Unser+Schlagzeugservice'),jdecode(''),'/83823.html','true',[],'',''],
	['PAGE','84123',jdecode('Unser+Electronicservice'),jdecode(''),'/84123.html','true',[],'',''],
	['PAGE','84623',jdecode('Der+PC-Service+und+Verkauf'),jdecode(''),'/84623.html','true',[],'',''],
	['PAGE','87123',jdecode('Unsere+Beleuchtung'),jdecode(''),'/87123.html','true',[],'',''],
	['PAGE','3564',jdecode('Links'),jdecode(''),'/3564.html','true',[],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Display';
theSitetree.paletteFamily='580D02';
theSitetree.keyvisualId='11383';
theSitetree.keyvisualName='kv_11383.jpg';
theSitetree.fontsetId='31963';
theSitetree.graphicsetId='13803';
theSitetree.contentColor='340800';
theSitetree.contentBGColor='FBE5C3';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Display',
				paletteFamily: 	'580D02',
				keyvisualId: 	'11383',
				keyvisualName: 	'kv_11383.jpg',
				fontsetId: 		'31963',
				graphicsetId: 	'13803',
				contentColor: 	'340800',
				contentBGColor: 'FBE5C3',
				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:  '84123',
internalId:  '',
customField: '20100807-104659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3522',
internalId:  '',
customField: '20091015-111942'
};
webappMappings['7002']=webappMappings['7002-3561']={
webappId:    '7002',
documentId:  '1321',
internalId:  '3561',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-4036']={
webappId:    '7008',
documentId:  '1342',
internalId:  '4036',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1247',
internalId:  '',
customField: '20100807-101645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1268',
internalId:  '',
customField: '20100820-090443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83823',
internalId:  '',
customField: '20100807-104727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20091024-114224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1321',
internalId:  '',
customField: '20091015-012416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1342',
internalId:  '',
customField: '20091015-012202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3543',
internalId:  '',
customField: '20100428-091007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3564',
internalId:  '',
customField: '20100811-092440'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1247',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20100503-083213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20100807-104749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20100113-084104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100530-124330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37923',
internalId:  '',
customField: '20100113-082709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36923',
internalId:  '',
customField: '20100113-081708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29423',
internalId:  '',
customField: '20100113-080938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32823',
internalId:  '',
customField: '20100113-081058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32865',
internalId:  '',
customField: '20100113-082257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38923',
internalId:  '',
customField: '20100113-082517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39623',
internalId:  '',
customField: '20100325-093124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41823',
internalId:  '',
customField: '20100113-083152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43223',
internalId:  '',
customField: '20100503-082936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43244',
internalId:  '',
customField: '20100503-082553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43265',
internalId:  '',
customField: '20100524-121542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47623',
internalId:  '',
customField: '20100128-083055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50023',
internalId:  '',
customField: '20100718-175156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55823',
internalId:  '',
customField: '20100822-150900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59323',
internalId:  '',
customField: '20100325-093228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60723',
internalId:  '',
customField: '20100407-104012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61623',
internalId:  '',
customField: '20100330-085914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62023',
internalId:  '',
customField: '20100330-091409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62323',
internalId:  '',
customField: '20100330-092445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63623',
internalId:  '',
customField: '20100418-181631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80923',
internalId:  '',
customField: '20100530-141308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82623',
internalId:  '',
customField: '20100730-124922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74523',
internalId:  '',
customField: '20100507-203543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66423',
internalId:  '',
customField: '20100418-182007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68123',
internalId:  '',
customField: '20100427-202340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84623',
internalId:  '',
customField: '20100808-104759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70923',
internalId:  '',
customField: '20100610-074614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87123',
internalId:  '',
customField: '20100811-091831'
};
var canonHostname = 'wsc01.webland.ch';
var accountId     = 'AWB010IN2K2X';
var companyName   = 'Herzlichst+willkommen%21';
var htmlTitle	  = 'Verein+NIGHT+MUSIC+ist+online%21';
var metaKeywords  = '';
var metaContents  = 'Restaurant+ParkMonday+Night+MusicUrs+C.+EigenmannJazz+in+Flawil';
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();
};
