/* [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','458',jdecode('Home'),jdecode(''),'/458.html','true',[],'',''],
	['PAGE','509',jdecode('%C3%9Cber+uns'),jdecode(''),'/509/index.html','true',[ 
		['PAGE','13364',jdecode('Unsere+Gr%C3%BCnderin'),jdecode(''),'/509/13364.html','true',[],'',''],
		['PAGE','116958',jdecode('Texte+der+Gr%C3%BCnderin'),jdecode(''),'/509/116958.html','true',[],'',''],
		['PAGE','131858',jdecode('Texte+%C3%BCber+die+Gr%C3%BCnderin'),jdecode(''),'/509/131858.html','true',[],'',''],
		['PAGE','14058',jdecode('St.+Petrus+Claver'),jdecode(''),'/509/14058.html','true',[],'',''],
		['PAGE','114258',jdecode('Gebete'),jdecode(''),'/509/114258.html','true',[],'','']
	],'',''],
	['PAGE','593',jdecode('Aktuelles'),jdecode(''),'/593/index.html','true',[ 
		['PAGE','117658',jdecode('Archiv'),jdecode(''),'/593/117658.html','true',[],'','']
	],'',''],
	['PAGE','79400',jdecode('Projekte'),jdecode(''),'/79400.html','true',[],'',''],
	['PAGE','1958',jdecode('Mitwirken'),jdecode(''),'/1958/index.html','true',[ 
		['PAGE','111858',jdecode('F%C3%B6rderer'),jdecode(''),'/1958/111858.html','true',[],'',''],
		['PAGE','112858',jdecode('Mitbeten'),jdecode(''),'/1958/112858.html','true',[],'',''],
		['PAGE','79379',jdecode('Messbund'),jdecode(''),'/1958/79379.html','true',[],'',''],
		['PAGE','144758',jdecode('Missions+Berufungen'),jdecode(''),'/1958/144758.html','true',[],'','']
	],'',''],
	['PAGE','1979',jdecode('Afrika+Museum'),jdecode(''),'/1979/index.html','true',[ 
		['PAGE','84169',jdecode('Bildergalerie'),jdecode(''),'/1979/84169.html','true',[],'','']
	],'',''],
	['PAGE','79358',jdecode('Publikationen'),jdecode(''),'/79358/index.html','true',[ 
		['PAGE','115958',jdecode('Archiv'),jdecode(''),'/79358/115958.html','true',[],'','']
	],'',''],
	['PAGE','111458',jdecode('Ihr+Gebetsanliegen'),jdecode(''),'/111458.html','true',[],'',''],
	['PAGE','614',jdecode('Kontakt'),jdecode(''),'/614.html','true',[],'',''],
	['PAGE','97758',jdecode('Links'),jdecode(''),'/97758.html','true',[],'',''],
	['PAGE','87469',jdecode('Anfahrt'),jdecode(''),'/87469.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='CECEA9';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10571';
theSitetree.graphicsetId='10772';
theSitetree.contentColor='692643';
theSitetree.contentBGColor='F3F9FC';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Borders',
				paletteFamily: 	'CECEA9',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10571',
				graphicsetId: 	'10772',
				contentColor: 	'692643',
				contentBGColor: 'F3F9FC',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '509',
internalId:  '',
customField: '20070602-165901'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '458',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '458',
internalId:  '',
customField: '20100810-172318'
};
webappMappings['1501']=webappMappings['1501-237707']={
webappId:    '1501',
documentId:  '458',
internalId:  '237707',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-2970e996439779118bd413cd4b7adbf0']={
webappId:    '7060',
documentId:  '84169',
internalId:  '2970e996439779118bd413cd4b7adbf0',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79400',
internalId:  '',
customField: '20091124-213705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1958',
internalId:  '',
customField: '20071106-202349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '593',
internalId:  '',
customField: '20100424-133222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13364',
internalId:  '',
customField: '20090726-222926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14058',
internalId:  '',
customField: '20060524-134847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79358',
internalId:  '',
customField: '20100810-172940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79379',
internalId:  '',
customField: '20060731-111113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1979',
internalId:  '',
customField: '20060421-100211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84169',
internalId:  '',
customField: '20060221-183505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '614',
internalId:  '',
customField: '20090320-193146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97758',
internalId:  '',
customField: '20060426-161316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87469',
internalId:  '',
customField: '20060825-175504'
};
webappMappings['7008']=webappMappings['7008-1147']={
webappId:    '7008',
documentId:  '111458',
internalId:  '1147',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111458',
internalId:  '',
customField: '20081111-153546'
};
webappMappings['7008']=webappMappings['7008-1148']={
webappId:    '7008',
documentId:  '111858',
internalId:  '1148',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111858',
internalId:  '',
customField: '20081126-214451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112858',
internalId:  '',
customField: '20081126-214513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114258',
internalId:  '',
customField: '20081112-221337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115958',
internalId:  '',
customField: '20100810-173252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116958',
internalId:  '',
customField: '20091123-222219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117658',
internalId:  '',
customField: '20090216-210812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131858',
internalId:  '',
customField: '20091124-220252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144758',
internalId:  '',
customField: '20090429-223108'
};
webappMappings['7008']=webappMappings['7008-1146']={
webappId:    '7008',
documentId:  '112858',
internalId:  '1146',
customField: 'language:de;country:CH;'
};
var canonHostname = 'wsc.genotec.ch';
var accountId     = 'AGT010INXSZ8';
var companyName   = 'Missionsschwestern+vom+hl.+Petrus+Claver';
var htmlTitle	  = 'Willkommen+bei+den+Missionsschwestern+des+hl.+Petrus+Claver';
var metaKeywords  = 'Petrus+Claver%2C+Maria+Teresia+Ledochowska%2C+Missionsschwestern%2C+Afrika+Museum%2C+Echo+aus+Afrika%2C+Messbund%2C+Projekte';
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();
};
