/* [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','4496',jdecode('Home'),jdecode(''),'/4496.html','true',[],'',''],
	['PAGE','4634',jdecode('Zu+mir'),jdecode(''),'/4634.html','true',[],'',''],
	['PAGE','4661',jdecode('Dienstleistungen'),jdecode(''),'/4661/index.html','true',[ 
		['PAGE','4688',jdecode('Coaching'),jdecode(''),'/4661/4688.html','true',[],'',''],
		['PAGE','4823',jdecode('Lehrlingscoaching'),jdecode(''),'/4661/4823.html','true',[],'',''],
		['PAGE','4715',jdecode('Supervision'),jdecode(''),'/4661/4715.html','true',[],'',''],
		['PAGE','5901',jdecode('Teamentwicklung'),jdecode(''),'/4661/5901.html','true',[],'',''],
		['PAGE','5928',jdecode('Moderation'),jdecode(''),'/4661/5928.html','true',[],'',''],
		['PAGE','4742',jdecode('Konzeption'),jdecode(''),'/4661/4742.html','true',[],'',''],
		['PAGE','45608',jdecode('Projektauftrag'),jdecode(''),'/4661/45608.html','true',[],'',''],
		['PAGE','105474',jdecode('Referenzen'),jdecode(''),'/4661/105474.html','true',[],'','']
	],'',''],
	['PAGE','43346',jdecode('Direkt-Kontakt'),jdecode(''),'/43346/index.html','true',[ 
		['PAGE','43788',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/43346/43788.html','false',[],'',''],
		['PAGE','4769',jdecode('Sie+finden+mich'),jdecode(''),'/43346/4769.html','true',[],'','']
	],'',''],
	['PAGE','90050',jdecode('Literatur+Hit-Tipp'),jdecode(''),'/90050.html','true',[],'',''],
	['PAGE','44365',jdecode('Links'),jdecode(''),'/44365.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Vacation';
theSitetree.paletteFamily='A7CFF9';
theSitetree.keyvisualId='11851';
theSitetree.keyvisualName='kv_11851.jpg';
theSitetree.fontsetId='33159';
theSitetree.graphicsetId='14080';
theSitetree.contentColor='647c8c';
theSitetree.contentBGColor='f8f8f8';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Vacation',
				paletteFamily: 	'A7CFF9',
				keyvisualId: 	'11851',
				keyvisualName: 	'kv_11851.jpg',
				fontsetId: 		'33159',
				graphicsetId: 	'14080',
				contentColor: 	'647c8c',
				contentBGColor: 'f8f8f8',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4496',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4634',
internalId:  '',
customField: '20091110-071142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4496',
internalId:  '',
customField: '20070919-205420'
};
webappMappings['7008']=webappMappings['7008-3632']={
webappId:    '7008',
documentId:  '43346',
internalId:  '3632',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4661',
internalId:  '',
customField: '20070610-093400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4688',
internalId:  '',
customField: '20070608-225135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4823',
internalId:  '',
customField: '20060712-201330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4715',
internalId:  '',
customField: '20060429-185845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20060705-215733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5928',
internalId:  '',
customField: '20060429-190419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4742',
internalId:  '',
customField: '20060429-180139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45608',
internalId:  '',
customField: '20060429-175424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105474',
internalId:  '',
customField: '20070610-094111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43346',
internalId:  '',
customField: '20040211-193406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43788',
internalId:  '',
customField: '20040922-204937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4769',
internalId:  '',
customField: '20060808-212134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90050',
internalId:  '',
customField: '20081030-172109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44365',
internalId:  '',
customField: '20070610-094842'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXX2V';
var companyName   = 'CREAKTIV++Coaching+Supervision+Atmosph%C3%A4re';
var htmlTitle	  = 'CREaKTIV++Coaching4you++Supervision4you';
var metaKeywords  = 'Creaktiv+Coaching+Supervision+Beratung+Fachberatung+Beratung+Teamentwicklung+Kreative+Beratung+Praxisausbildung+Coaching4you+Supervision4you+Gruppe+Gruppenprozessbegleitung';
var metaContents  = 'Creaktiv+Coaching+Supervision+Beratung+Fachberatung+Beratung+Teamentwicklung+Kreative+Beratung+Praxisausbildung+Coaching4you+Supervision4you+Gruppe+Gruppenprozessbegleitung';
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();
};

