/* [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','4455',jdecode('willkommen'),jdecode(''),'/4455.html','true',[],'',''],
	['PAGE','4512',jdecode('beratung'),jdecode(''),'/4512/index.html','true',[ 
		['PAGE','4539',jdecode('supervision'),jdecode(''),'/4512/4539.html','true',[],'',''],
		['PAGE','4593',jdecode('coaching'),jdecode(''),'/4512/4593.html','true',[],'',''],
		['PAGE','4620',jdecode('organisationsentwicklung'),jdecode(''),'/4512/4620.html','true',[],'','']
	],'',''],
	['PAGE','10290',jdecode('prozessbegleitung'),jdecode(''),'/10290/index.html','true',[ 
		['PAGE','10299',jdecode('moderation'),jdecode(''),'/10290/10299.html','true',[],'',''],
		['PAGE','10308',jdecode('projektbegleitung'),jdecode(''),'/10290/10308.html','true',[],'',''],
		['PAGE','10317',jdecode('workshops'),jdecode(''),'/10290/10317.html','true',[],'','']
	],'',''],
	['PAGE','9461',jdecode('mediation'),jdecode(''),'/9461/index.html','true',[ 
		['PAGE','10134',jdecode('mediation'),jdecode(''),'/9461/10134.html','true',[],'',''],
		['PAGE','10143',jdecode('konfliktmanagement'),jdecode(''),'/9461/10143.html','true',[],'','']
	],'',''],
	['PAGE','9488',jdecode('dialog'),jdecode(''),'/9488.html','true',[],'',''],
	['PAGE','4701',jdecode('qualit%C3%A4t'),jdecode(''),'/4701/index.html','true',[ 
		['PAGE','4728',jdecode('methodisches'),jdecode(''),'/4701/4728.html','true',[],'',''],
		['PAGE','4755',jdecode('qualit%C3%A4t'),jdecode(''),'/4701/4755.html','true',[],'','']
	],'',''],
	['PAGE','4782',jdecode('profil'),jdecode(''),'/4782.html','true',[],'',''],
	['PAGE','4863',jdecode('aktuell'),jdecode(''),'/4863/index.html','true',[ 
		['PAGE','10326',jdecode('veranstaltungen'),jdecode(''),'/4863/10326.html','true',[],'',''],
		['PAGE','10335',jdecode('artikel'),jdecode(''),'/4863/10335.html','true',[],'',''],
		['PAGE','10344',jdecode('literatur'),jdecode(''),'/4863/10344.html','true',[],'','']
	],'',''],
	['PAGE','4836',jdecode('netz'),jdecode(''),'/4836.html','true',[],'',''],
	['PAGE','4809',jdecode('kontakt'),jdecode(''),'/4809.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='006633';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='78';
theSitetree.graphicsetId='90';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='CCE0D6';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'006633',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'78',
				graphicsetId: 	'90',
				contentColor: 	'006633',
				contentBGColor: 'CCE0D6',
				a_color: 		'006633',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4455',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4455',
internalId:  '',
customField: '20100906-115048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4809',
internalId:  '',
customField: '20101018-032722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4836',
internalId:  '',
customField: '20101018-032606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4863',
internalId:  '',
customField: '20080302-181715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10326',
internalId:  '',
customField: '20101018-033204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4512',
internalId:  '',
customField: '20100906-115716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4539',
internalId:  '',
customField: '20101018-035405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4593',
internalId:  '',
customField: '20100906-121011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4620',
internalId:  '',
customField: '20080303-130257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10290',
internalId:  '',
customField: '20080302-181300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10299',
internalId:  '',
customField: '20080909-210712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10308',
internalId:  '',
customField: '20080302-174504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10317',
internalId:  '',
customField: '20080303-122051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9461',
internalId:  '',
customField: '20080908-162349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10134',
internalId:  '',
customField: '20080302-180918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10143',
internalId:  '',
customField: '20080229-204948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9488',
internalId:  '',
customField: '20101018-034906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20080302-180301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4728',
internalId:  '',
customField: '20051220-150142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4755',
internalId:  '',
customField: '20051220-150621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4782',
internalId:  '',
customField: '20101018-034423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10335',
internalId:  '',
customField: '20101018-032126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10344',
internalId:  '',
customField: '20101020-202825'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0IN3RG5';
var companyName   = 'bernhard+knecht+%26+co+++++entwicklungspartner';
var htmlTitle	  = 'bernhard+knecht++co+++entwicklungspartner';
var metaKeywords  = 'Supervision+Konfliktberatung+Coaching+Organisationsentwicklung+Sozialarbeit+Beratung+Schulung+Training++systemisch+Wissen+Dialog+Mediation+Teamentwicklung+Bernhard+Knecht+knechtberatung+';
var metaContents  = 'Bernhard+Knecht+Beratung+und+Schulung+von+Personen%2C+Teams%2C+Organisationen';
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();
};

