/* [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','4480',jdecode('Home'),jdecode(''),'/4480/index.html','true',[ 
		['PAGE','20904',jdecode('Leitbild'),jdecode(''),'/4480/20904.html','true',[],'','']
	],'',''],
	['PAGE','36622',jdecode('Geerenpost'),jdecode(''),'/36622.html','true',[],'',''],
	['PAGE','37303',jdecode('Jahresbericht'),jdecode(''),'/37303.html','true',[],'',''],
	['PAGE','30903',jdecode('Veranstaltungen'),jdecode(''),'/30903.html','true',[],'',''],
	['PAGE','4537',jdecode('Unser+Haus'),jdecode(''),'/4537/index.html','true',[ 
		['PAGE','4564',jdecode('Wohnen'),jdecode(''),'/4537/4564.html','true',[],'',''],
		['PAGE','4618',jdecode('Pflege'),jdecode(''),'/4537/4618.html','true',[],'',''],
		['PAGE','19303',jdecode('Cafeteria'),jdecode(''),'/4537/19303.html','true',[],'',''],
		['PAGE','28503',jdecode('Menuplan'),jdecode(''),'/4537/28503.html','true',[],'',''],
		['PAGE','19330',jdecode('Diverses'),jdecode(''),'/4537/19330.html','true',[],'','']
	],'',''],
	['PAGE','19357',jdecode('Kultur+und+Freizeit'),jdecode(''),'/19357/index.html','true',[ 
		['PAGE','19384',jdecode('Aktivit%C3%A4ten'),jdecode(''),'/19357/19384.html','true',[],'','']
	],'',''],
	['PAGE','4780',jdecode('Mitarbeiter+%2F+Vorstand'),jdecode(''),'/4780/index.html','true',[ 
		['PAGE','4807',jdecode('Vorstand'),jdecode(''),'/4780/4807.html','true',[],'',''],
		['PAGE','76401',jdecode('Zentrumsleitung'),jdecode(''),'/4780/76401.html','true',[],'',''],
		['PAGE','4834',jdecode('Care+Management'),jdecode(''),'/4780/4834.html','true',[],'',''],
		['PAGE','4861',jdecode('Verwaltungsmanagement'),jdecode(''),'/4780/4861.html','true',[],'','']
	],'',''],
	['PAGE','4915',jdecode('Kontakt'),jdecode(''),'/4915/index.html','true',[ 
		['PAGE','21405',jdecode('Anfahrt'),jdecode(''),'/4915/21405.html','true',[],'',''],
		['PAGE','21507',jdecode('Ihr+Weg+zu+uns'),jdecode(''),'/4915/21507.html','true',[],'',''],
		['PAGE','24003',jdecode('Kontaktformular'),jdecode(''),'/4915/24003/index.html','true',[ 
			['PAGE','24034',jdecode('Kontaktformular+%28Form+followup+page%29'),jdecode(''),'/4915/24003/24034.html','false',[],'','']
		],'','']
	],'',''],
	['PAGE','30403',jdecode('Extranet'),jdecode(''),'/30403/index.html','true',[ 
		['PAGE','33403',jdecode('Basisordner'),jdecode(''),'/30403/33403.html','true',[],'',''],
		['PAGE','33839',jdecode('Qualit%C3%A4tsordner'),jdecode(''),'/30403/33839.html','true',[],'',''],
		['PAGE','41477',jdecode('Adressen'),jdecode(''),'/30403/41477.html','true',[],'',''],
		['PAGE','43507',jdecode('N%C3%A4chste+Sitzung'),jdecode(''),'/30403/43507.html','true',[],'','']
	],'',''],
	['PAGE','4888',jdecode('Jobs'),jdecode(''),'/4888/index.html','true',[ 
		['PAGE','27703',jdecode('Verwaltung'),jdecode(''),'/4888/27703.html','true',[],'',''],
		['PAGE','27730',jdecode('Pflege'),jdecode(''),'/4888/27730.html','true',[],'','']
	],'',''],
	['PAGE','36284',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/36284/index.html','true',[ 
		['PAGE','36311',jdecode('Verbandsgemeinden'),jdecode(''),'/36284/36311.html','true',[],'',''],
		['PAGE','40902',jdecode('Zweckverband+Statuten'),jdecode(''),'/36284/40902.html','true',[],'','']
	],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='1280';
theSitetree.keyvisualName='feder.jpg';
theSitetree.fontsetId='190';
theSitetree.graphicsetId='230';
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: 			'Profile',
				paletteFamily: 	'336699',
				keyvisualId: 	'1280',
				keyvisualName: 	'feder.jpg',
				fontsetId: 		'190',
				graphicsetId: 	'230',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'336699',
				b_color: 		'336699',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4480',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4480',
internalId:  '',
customField: '20090513-152614'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '21405',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '21507',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['1501']=webappMappings['1501-2533277']={
webappId:    '1501',
documentId:  '4480',
internalId:  '2533277',
customField: '1501'
};
webappMappings['1009']=webappMappings['1009-5186142']={
webappId:    '1009',
documentId:  '24034',
internalId:  '5186142',
customField: 'isFollowupPage:true;documentId:24003;'
};
webappMappings['7008']=webappMappings['7008-192']={
webappId:    '7008',
documentId:  '24003',
internalId:  '192',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20904',
internalId:  '',
customField: '20061011-081550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36622',
internalId:  '',
customField: '20100901-082909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37303',
internalId:  '',
customField: '20100429-125624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30903',
internalId:  '',
customField: '20100831-100418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4537',
internalId:  '',
customField: '20060511-100502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4564',
internalId:  '',
customField: '20051230-092131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4618',
internalId:  '',
customField: '20051230-092759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19303',
internalId:  '',
customField: '20090519-154248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28503',
internalId:  '',
customField: '20051229-091114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19330',
internalId:  '',
customField: '20070320-164821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19357',
internalId:  '',
customField: '20060104-154649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19384',
internalId:  '',
customField: '20070629-164332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4780',
internalId:  '',
customField: '20050323-111552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4807',
internalId:  '',
customField: '20100602-094305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76401',
internalId:  '',
customField: '20100831-085119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4834',
internalId:  '',
customField: '20100811-135443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4861',
internalId:  '',
customField: '20100419-100128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4915',
internalId:  '',
customField: '20061011-152943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21405',
internalId:  '',
customField: '20050323-083026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21507',
internalId:  '',
customField: '20050323-083121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24003',
internalId:  '',
customField: '20050323-175039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24034',
internalId:  '',
customField: '20050323-175002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30403',
internalId:  '',
customField: '20100528-111505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33403',
internalId:  '',
customField: '20100528-213906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33839',
internalId:  '',
customField: '20061116-085833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41477',
internalId:  '',
customField: '20091102-082247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43507',
internalId:  '',
customField: '20100528-110929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4888',
internalId:  '',
customField: '20060530-145939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27703',
internalId:  '',
customField: '20100802-145001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27730',
internalId:  '',
customField: '20100721-171307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36284',
internalId:  '',
customField: '20061012-080922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36311',
internalId:  '',
customField: '20061011-112428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40902',
internalId:  '',
customField: '20100528-214041'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXZAN';
var companyName   = 'Alterszentrum+im+Geeren';
var htmlTitle	  = 'Alterszentrum+im+Geeren%2C+Seuzach';
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();
};
