/* [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','2401',jdecode('Home+%2F+Aktuell'),jdecode(''), jdecode('%2F2401%2Findex.html'), 'true',[ 
		['PAGE','21601',jdecode('Charta+Oecumenica'),jdecode(''), jdecode('%2F2401%2F21601.html'), 'true',[],'',''],
		['PAGE','21622',jdecode('Synode'),jdecode(''), jdecode('%2F2401%2F21622.html'), 'true',[],'',''],
		['PAGE','21643',jdecode('Delegiertenversam.'),jdecode(''), jdecode('%2F2401%2F21643.html'), 'true',[],'',''],
		['PAGE','21664',jdecode('HESO'),jdecode(''), jdecode('%2F2401%2F21664.html'), 'true',[],'',''],
		['PAGE','21685',jdecode('Kirchentag'),jdecode(''), jdecode('%2F2401%2F21685.html'), 'true',[],'',''],
		['PAGE','21801',jdecode('Plakataktion'),jdecode(''), jdecode('%2F2401%2F21801.html'), 'true',[],'','']
	],'',''],
	['PAGE','2452',jdecode('Unser+Bezirk'),jdecode(''), jdecode('%2F2452%2Findex.html'), 'true',[ 
		['PAGE','2473',jdecode('Vorstand'),jdecode(''), jdecode('%2F2452%2F2473.html'), 'true',[],'',''],
		['PAGE','2494',jdecode('Delegierte'),jdecode(''), jdecode('%2F2452%2F2494.html'), 'true',[],'',''],
		['PAGE','2515',jdecode('Synode+%2F+Synodale'),jdecode(''), jdecode('%2F2452%2F2515.html'), 'true',[],'',''],
		['PAGE','2536',jdecode('Kirchgemeinden'),jdecode(''), jdecode('%2F2452%2F2536.html'), 'true',[],'',''],
		['PAGE','77301',jdecode('Pfarrverein'),jdecode(''), jdecode('%2F2452%2F77301.html'), 'true',[],'',''],
		['PAGE','2557',jdecode('Geschichte'),jdecode(''), jdecode('%2F2452%2F2557.html'), 'true',[],'','']
	],'',''],
	['PAGE','2578',jdecode('Agenda+%2F+Kurse'),jdecode(''), jdecode('%2F2578%2Findex.html'), 'true',[ 
		['PAGE','2599',jdecode('Termine+Vorstand'),jdecode(''), jdecode('%2F2578%2F2599.html'), 'true',[],'',''],
		['PAGE','9001',jdecode('Termine+DV'),jdecode(''), jdecode('%2F2578%2F9001.html'), 'true',[],'',''],
		['PAGE','2620',jdecode('Veranstaltungen'),jdecode(''), jdecode('%2F2578%2F2620.html'), 'true',[],'',''],
		['PAGE','2641',jdecode('Kurse'),jdecode(''), jdecode('%2F2578%2F2641.html'), 'true',[],'','']
	],'',''],
	['PAGE','9022',jdecode('Religionsp%C3%A4dagogik'),jdecode(''), jdecode('%2F9022%2Findex.html'), 'true',[ 
		['PAGE','23601',jdecode('Ausbildung'),jdecode(''), jdecode('%2F9022%2F23601.html'), 'true',[],'',''],
		['PAGE','23622',jdecode('Weiterbildung'),jdecode(''), jdecode('%2F9022%2F23622.html'), 'true',[],'',''],
		['PAGE','52901',jdecode('Koordination+hru'),jdecode(''), jdecode('%2F9022%2F52901.html'), 'true',[],'','']
	],'',''],
	['PAGE','2662',jdecode('Beratung+%2F+Hilfe'),jdecode(''), jdecode('%2F2662%2Findex.html'), 'true',[ 
		['PAGE','9043',jdecode('Lebensberatung'),jdecode(''), jdecode('%2F2662%2F9043.html'), 'true',[],'',''],
		['PAGE','2704',jdecode('Spitalseelsorge'),jdecode(''), jdecode('%2F2662%2F2704.html'), 'true',[],'',''],
		['PAGE','2725',jdecode('Gef%C3%A4ngnisseelsorge'),jdecode(''), jdecode('%2F2662%2F2725.html'), 'true',[],'',''],
		['PAGE','2683',jdecode('Notfallseelsorge'),jdecode(''), jdecode('%2F2662%2F2683.html'), 'true',[],'',''],
		['PAGE','2746',jdecode('Geh%C3%B6rlosenseelsorge'),jdecode(''), jdecode('%2F2662%2F2746.html'), 'true',[],'',''],
		['PAGE','2767',jdecode('Nothilfe'),jdecode(''), jdecode('%2F2662%2F2767.html'), 'true',[],'',''],
		['PAGE','2809',jdecode('Kinderheime'),jdecode(''), jdecode('%2F2662%2F2809.html'), 'true',[],'',''],
		['PAGE','9085',jdecode('Prot.-kirch.+Hilfsverein'),jdecode(''), jdecode('%2F2662%2F9085.html'), 'true',[],'','']
	],'',''],
	['PAGE','2830',jdecode('Publikationen'),jdecode(''), jdecode('%2F2830.html'), 'true',[],'',''],
	['PAGE','2851',jdecode('Archiv'),jdecode(''), jdecode('%2F2851.html'), 'true',[],'',''],
	['PAGE','9701',jdecode('Kontakt'),jdecode(''), jdecode('%2F9701.html'), 'true',[],'',''],
	['PAGE','2893',jdecode('Links'),jdecode(''), jdecode('%2F2893.html'), 'true',[],'',''],
	['PAGE','13201',jdecode('Suche'),jdecode(''), jdecode('%2F13201.html'), 'true',[],'','']];
var siteelementCount=37;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='718DF8';
theSitetree.keyvisualId='9684';
theSitetree.keyvisualName='kv_9684.gif';
theSitetree.fontsetId='10658';
theSitetree.graphicsetId='11186';
theSitetree.contentColor='3D57BA';
theSitetree.contentBGColor='CCCACA';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dispose',
				paletteFamily: 	'718DF8',
				keyvisualId: 	'9684',
				keyvisualName: 	'kv_9684.gif',
				fontsetId: 		'10658',
				graphicsetId: 	'11186',
				contentColor: 	'3D57BA',
				contentBGColor: 'CCCACA',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20111102-153007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2452',
internalId:  '',
customField: '20100516-192011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2830',
internalId:  '',
customField: '20111112-172545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2578',
internalId:  '',
customField: '20100516-120719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2851',
internalId:  '',
customField: '20111102-154427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2473',
internalId:  '',
customField: '20111111-090645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2494',
internalId:  '',
customField: '20110623-161204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2515',
internalId:  '',
customField: '20111023-180119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2536',
internalId:  '',
customField: '20101220-121010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2557',
internalId:  '',
customField: '20111219-172652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2599',
internalId:  '',
customField: '20111117-175934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2620',
internalId:  '',
customField: '20110918-175046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2641',
internalId:  '',
customField: '20100312-132531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2662',
internalId:  '',
customField: '20100219-100148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2683',
internalId:  '',
customField: '20100516-132734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2704',
internalId:  '',
customField: '20100516-132614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2725',
internalId:  '',
customField: '20100516-132645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2746',
internalId:  '',
customField: '20100219-103334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2767',
internalId:  '',
customField: '20110320-212829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21601',
internalId:  '',
customField: '20100525-142450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2809',
internalId:  '',
customField: '20100516-133105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20100131-154047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2893',
internalId:  '',
customField: '20111023-173357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20111117-180100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20100516-131749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9043',
internalId:  '',
customField: '20100516-132408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52901',
internalId:  '',
customField: '20100516-132248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9085',
internalId:  '',
customField: '20100409-134208'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-2223']={
webappId:    '7008',
documentId:  '9701',
internalId:  '2223',
customField: 'language:de;country:CH;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '13201',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20100219-202340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21664',
internalId:  '',
customField: '20111117-180609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21685',
internalId:  '',
customField: '20110918-173244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21622',
internalId:  '',
customField: '20100312-132944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21643',
internalId:  '',
customField: '20110918-170200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20100219-092953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20100516-131942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23622',
internalId:  '',
customField: '20100516-132120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77301',
internalId:  '',
customField: '20110623-155839'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHP340INVD58';
var companyName   = 'REFORMIERTE+BEZIRKSSYNODE+SOLOTHURN';
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();
};

