/* [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 theSitetree=[ 
	['PAGE','5022',jdecode('Home'),jdecode(''),'/5022.html','true',[],''],
	['PAGE','13601',jdecode('Lebenslauf'),jdecode(''),'/13601/index.html','true',[ 
		['PAGE','13622',jdecode('Damaskus-Erlebnis'),jdecode(''),'/13601/13622.html','true',[],'']
	],''],
	['PAGE','13643',jdecode('Reisen'),jdecode(''),'/13643/index.html','true',[ 
		['PAGE','18201',jdecode('%C3%9Cbersichtskarte'),jdecode(''),'/13643/18201.html','true',[],''],
		['PAGE','18222',jdecode('Lystra'),jdecode(''),'/13643/18222.html','true',[],''],
		['PAGE','17801',jdecode('Philippi'),jdecode(''),'/13643/17801.html','true',[],''],
		['PAGE','13664',jdecode('Korinth'),jdecode(''),'/13643/13664.html','true',[],''],
		['PAGE','13685',jdecode('Ephesus'),jdecode(''),'/13643/13685.html','true',[],''],
		['PAGE','18243',jdecode('Athen'),jdecode(''),'/13643/18243.html','true',[],''],
		['PAGE','18801',jdecode('Kreta'),jdecode(''),'/13643/18801.html','true',[],'']
	],''],
	['PAGE','13706',jdecode('Theologie'),jdecode(''),'/13706/index.html','true',[ 
		['PAGE','13727',jdecode('Paulusbriefe'),jdecode(''),'/13706/13727.html','true',[],''],
		['PAGE','13748',jdecode('Apostelkonzil'),jdecode(''),'/13706/13748.html','true',[],'']
	],''],
	['PAGE','13769',jdecode('Kirchen'),jdecode(''),'/13769/index.html','true',[ 
		['PAGE','13790',jdecode('St.+Paul+vor+den+Mauern'),jdecode(''),'/13769/13790.html','true',[],''],
		['PAGE','13811',jdecode('Tarsus'),jdecode(''),'/13769/13811.html','true',[],'']
	],''],
	['PAGE','13832',jdecode('Vorbild'),jdecode(''),'/13832.html','true',[],''],
	['PAGE','13853',jdecode('Links'),jdecode(''),'/13853.html','true',[],''],
	['PAGE','13874',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/13874/index.html','true',[ 
		['PAGE','13895',jdecode('Unser+Team'),jdecode(''),'/13874/13895.html','true',[],'']
	],''],
	['PAGE','13916',jdecode('Impressum'),jdecode(''),'/13916.html','true',[],'']];
var siteelementCount=22;
theSitetree.topTemplateName='nc-picture';
theSitetree.paletteFamily='157E03';
theSitetree.keyvisualId='6997';
theSitetree.keyvisualName='kv_6997.jpg';
theSitetree.fontsetId='13635';
theSitetree.graphicsetId='12099';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'DE'
};
var theTemplate={
				name: 			'nc-picture',
				paletteFamily: 	'157E03',
				keyvisualId: 	'6997',
				keyvisualName: 	'kv_6997.jpg',
				fontsetId: 		'13635',
				graphicsetId: 	'12099',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:  '5022',
internalId:  '',
customField: '20100316-112445'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5022',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20100301-200641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13622',
internalId:  '',
customField: '20100317-181507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13643',
internalId:  '',
customField: '20100316-105515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13664',
internalId:  '',
customField: '20100316-111518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13685',
internalId:  '',
customField: '20100316-104422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13706',
internalId:  '',
customField: '20100302-104350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13727',
internalId:  '',
customField: '20100302-104742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13748',
internalId:  '',
customField: '20100322-201020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13769',
internalId:  '',
customField: '20100319-164717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13790',
internalId:  '',
customField: '20100319-162829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13811',
internalId:  '',
customField: '20100319-163917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13832',
internalId:  '',
customField: '20100317-181704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13853',
internalId:  '',
customField: '20100319-164810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13874',
internalId:  '',
customField: '20100216-152718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13895',
internalId:  '',
customField: '20100317-182142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13916',
internalId:  '',
customField: '20100309-101710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20100316-111605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18222',
internalId:  '',
customField: '20100316-110558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18243',
internalId:  '',
customField: '20100316-112533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20100313-141737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20100316-104743'
};
var canonHostname = 'cm4all3.netcologne.de';
var accountId     = 'ANC330IN2XB2';
var companyName   = 'Paulus+-+Ganz+sch%C3%B6n+mutig%21%21';
var htmlTitle	  = 'Paulus+-+Ganz+sch%C3%B6n+mutig%21%21';
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();
};

