/* [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','108301',jdecode('Auftritte++'),jdecode(''), jdecode('%2F108301%2Findex.html'), 'true',[ 
		['PAGE','112501',jdecode('Appenzell'),jdecode(''), jdecode('%2F108301%2F112501.html'), 'true',[],'',''],
		['PAGE','108501',jdecode('Gesangfest+Laufen'),jdecode(''), jdecode('%2F108301%2F108501.html'), 'true',[],'',''],
		['PAGE','51801',jdecode('Kulturnacht+2011'),jdecode(''), jdecode('%2F108301%2F51801.html'), 'true',[],'',''],
		['PAGE','103201',jdecode('Konzert+2011'),jdecode(''), jdecode('%2F108301%2F103201.html'), 'true',[],'',''],
		['PAGE','94901',jdecode('Adventskonzert+2010'),jdecode(''), jdecode('%2F108301%2F94901.html'), 'false',[],'',''],
		['PAGE','88401',jdecode('S%C3%A4ngertreffen+2010'),jdecode(''), jdecode('%2F108301%2F88401.html'), 'false',[],'',''],
		['PAGE','701',jdecode('Konzert+2009'),jdecode(''), jdecode('%2F108301%2F701.html'), 'false',[],'',''],
		['PAGE','96801',jdecode('Adventskonzert+2010'),jdecode(''), jdecode('%2F108301%2F96801.html'), 'false',[],'',''],
		['PAGE','62601',jdecode('Bericht'),jdecode(''), jdecode('%2F108301%2F62601.html'), 'false',[],'',''],
		['PAGE','61101',jdecode('Gedicht'),jdecode(''), jdecode('%2F108301%2F61101.html'), 'false',[],'',''],
		['PAGE','99901',jdecode('Flyer'),jdecode(''), jdecode('%2F108301%2F99901.html'), 'false',[],'',''],
		['PAGE','100201',jdecode('Motto'),jdecode(''), jdecode('%2F108301%2F100201.html'), 'false',[],'',''],
		['PAGE','100243',jdecode('Leitung'),jdecode(''), jdecode('%2F108301%2F100243.html'), 'false',[],'',''],
		['PAGE','100222',jdecode('Anfahrt'),jdecode(''), jdecode('%2F108301%2F100222.html'), 'false',[],'','']
	],'',''],
	['PAGE','75101',jdecode('Saengerstimmen'),jdecode(''), jdecode('%2F75101%2Findex.html'), 'true',[ 
		['PAGE','752',jdecode('Chor'),jdecode(''), jdecode('%2F75101%2F752.html'), 'true',[],'',''],
		['PAGE','78201',jdecode('Probenlokal'),jdecode(''), jdecode('%2F75101%2F78201.html'), 'true',[],'',''],
		['PAGE','89101',jdecode('Bericht'),jdecode(''), jdecode('%2F75101%2F89101.html'), 'false',[],'',''],
		['PAGE','89401',jdecode('OK+Pr%C3%A4sident'),jdecode(''), jdecode('%2F75101%2F89401.html'), 'false',[],'','']
	],'',''],
	['PAGE','794',jdecode('Dirigentin'),jdecode(''), jdecode('%2F794.html'), 'true',[],'',''],
	['PAGE','50701',jdecode('Terminkalender'),jdecode(''), jdecode('%2F50701.html'), 'true',[],'',''],
	['PAGE','110301',jdecode('Bildergallerie1'),jdecode(''), jdecode('%2F110301%2Findex.html'), 'true',[ 
		['PAGE','836',jdecode('Bildergallerie'),jdecode(''), jdecode('%2F110301%2F836.html'), 'false',[],'',''],
		['PAGE','81801',jdecode('Impressionen1'),jdecode(''), jdecode('%2F110301%2F81801.html'), 'true',[],'',''],
		['PAGE','77101',jdecode('Impressionen2'),jdecode(''), jdecode('%2F110301%2F77101.html'), 'true',[],'',''],
		['PAGE','84601',jdecode('Impressionen3'),jdecode(''), jdecode('%2F110301%2F84601.html'), 'true',[],'',''],
		['PAGE','86601',jdecode('Impressionen4'),jdecode(''), jdecode('%2F110301%2F86601.html'), 'true',[],'','']
	],'',''],
	['PAGE','773',jdecode('Kontakt'),jdecode(''), jdecode('%2F773%2Findex.html'), 'true',[ 
		['PAGE','50901',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F773%2F50901.html'), 'true',[],'','']
	],'',''],
	['PAGE','857',jdecode('Links'),jdecode(''), jdecode('%2F857.html'), 'true',[],'',''],
	['PAGE','70901',jdecode('Interner+Bereich'),jdecode(''), jdecode('%2F70901.html'), 'true',[],'',''],
	['PAGE','79401',jdecode('Statuten'),jdecode(''), jdecode('%2F79401%2Findex.html'), 'true',[ 
		['PAGE','79601',jdecode('1+Zweck+des+Vereins'),jdecode(''), jdecode('%2F79401%2F79601.html'), 'true',[],'',''],
		['PAGE','79622',jdecode('2+Mitgliedschaft'),jdecode(''), jdecode('%2F79401%2F79622.html'), 'true',[],'',''],
		['PAGE','79643',jdecode('3+Ein-+Austritte'),jdecode(''), jdecode('%2F79401%2F79643.html'), 'true',[],'',''],
		['PAGE','79664',jdecode('4+Rechte+und+Pflichten'),jdecode(''), jdecode('%2F79401%2F79664.html'), 'true',[],'',''],
		['PAGE','79685',jdecode('5+Organisation'),jdecode(''), jdecode('%2F79401%2F79685.html'), 'true',[],'',''],
		['PAGE','79706',jdecode('6+Finanzen'),jdecode(''), jdecode('%2F79401%2F79706.html'), 'true',[],'',''],
		['PAGE','79727',jdecode('7+Schlussbestimmungen'),jdecode(''), jdecode('%2F79401%2F79727.html'), 'true',[],'','']
	],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Seasons_winter';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21093';
theSitetree.graphicsetId='13196';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Seasons_winter',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21093',
				graphicsetId: 	'13196',
				contentColor: 	'2E2E2E',
				contentBGColor: 'FFFFFF',
				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:  '701',
internalId:  '',
customField: '20110119-195025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20090807-080910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20100426-193445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20110328-200715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20110328-202043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20110915-181907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50701',
internalId:  '',
customField: '20111107-200136'
};
webappMappings['1002']=webappMappings['1002-50901ahopt0inv02j']={
webappId:    '1002',
documentId:  '50901',
internalId:  '50901ahopt0inv02j',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50901',
internalId:  '',
customField: '20090909-210300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51801',
internalId:  '',
customField: '20110605-162740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62601',
internalId:  '',
customField: '20100110-205958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61101',
internalId:  '',
customField: '20091220-200601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110301',
internalId:  '',
customField: '20111003-213446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70901',
internalId:  '',
customField: '20110815-195011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75101',
internalId:  '',
customField: '20101013-204040'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '108301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77101',
internalId:  '',
customField: '20100805-210854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78201',
internalId:  '',
customField: '20110119-204526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79401',
internalId:  '',
customField: '20100512-211611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79622',
internalId:  '',
customField: '20100512-202543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79601',
internalId:  '',
customField: '20100512-202345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79643',
internalId:  '',
customField: '20100514-163532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79664',
internalId:  '',
customField: '20100512-203448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79685',
internalId:  '',
customField: '20100512-204341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79706',
internalId:  '',
customField: '20100512-204537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79727',
internalId:  '',
customField: '20100512-211946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103201',
internalId:  '',
customField: '20110605-160325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81801',
internalId:  '',
customField: '20100805-211126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84601',
internalId:  '',
customField: '20100805-211015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86601',
internalId:  '',
customField: '20100805-210036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89401',
internalId:  '',
customField: '20100812-194601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88401',
internalId:  '',
customField: '20100905-211959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89101',
internalId:  '',
customField: '20100914-165612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94901',
internalId:  '',
customField: '20110119-200803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96801',
internalId:  '',
customField: '20101201-195349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99901',
internalId:  '',
customField: '20110213-233829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100201',
internalId:  '',
customField: '20110119-194445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100222',
internalId:  '',
customField: '20110119-194803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100243',
internalId:  '',
customField: '20110213-185539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108501',
internalId:  '',
customField: '20111004-214130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108301',
internalId:  '',
customField: '20110630-202421'
};
webappMappings['7060']=webappMappings['7060-f9966d75f7524a2334b07f4fc5c795f6']={
webappId:    '7060',
documentId:  '103201',
internalId:  'f9966d75f7524a2334b07f4fc5c795f6',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112501',
internalId:  '',
customField: '20111004-213455'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0INV02J';
var companyName   = 'M%C3%A4nnerchor+Aesch+BL';
var htmlTitle	  = 'Maennerchor-AeschBL';
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();
};

