/* [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','4598',jdecode('Home'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','4655',jdecode('Worum+geht+es%3F'),jdecode(''),'/4655/index.html','true',[ 
		['PAGE','9603',jdecode('Worauf+baut+es+auf%3F'),jdecode(''),'/4655/9603.html','true',[],'',''],
		['PAGE','54301',jdecode('Indikationen'),jdecode(''),'/4655/54301.html','true',[],'',''],
		['PAGE','81301',jdecode('Atemarbeit+%28Detail%29'),jdecode(''),'/4655/81301.html','true',[],'','']
	],'',''],
	['PAGE','4709',jdecode('News'),jdecode(''),'/4709.html','true',[],'',''],
	['PAGE','84501',jdecode('Kursangebote'),jdecode(''),'/84501.html','true',[],'',''],
	['PAGE','4682',jdecode('Ueber+mich'),jdecode(''),'/4682/index.html','true',[ 
		['PAGE','29605',jdecode('Mitgliedschaften'),jdecode(''),'/4682/29605.html','true',[],'','']
	],'',''],
	['PAGE','11339',jdecode('Kosten+%26+Sonstiges'),jdecode(''),'/11339.html','true',[],'',''],
	['PAGE','20028',jdecode('Links'),jdecode(''),'/20028.html','true',[],'',''],
	['PAGE','4736',jdecode('Kontakt+%26+Anfahrt'),jdecode(''),'/4736/index.html','true',[ 
		['PAGE','13748',jdecode('Kontakt+%26+Anfahrt+%28Form+followup+page%29'),jdecode(''),'/4736/13748.html','false',[],'','']
	],'',''],
	['PAGE','11576',jdecode('English+%28short%29'),jdecode(''),'/11576.html','true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Grace';
theSitetree.paletteFamily='CECDD0';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32050';
theSitetree.graphicsetId='13873';
theSitetree.contentColor='484848';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Grace',
				paletteFamily: 	'CECDD0',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32050',
				graphicsetId: 	'13873',
				contentColor: 	'484848',
				contentBGColor: 'FFFFFF',
				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:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20028',
internalId:  '',
customField: '20100103-120819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4682',
internalId:  '',
customField: '20100102-175421'
};
webappMappings['1009']=webappMappings['1009-5314392']={
webappId:    '1009',
documentId:  '13748',
internalId:  '5314392',
customField: 'isFollowupPage:true;documentId:4736;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20091018-140637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29605',
internalId:  '',
customField: '20091018-143105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4736',
internalId:  '',
customField: '20091219-113714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4655',
internalId:  '',
customField: '20100102-184723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9603',
internalId:  '',
customField: '20100103-115159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20091018-142358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4709',
internalId:  '',
customField: '20091130-104412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11339',
internalId:  '',
customField: '20100102-175931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84501',
internalId:  '',
customField: '20100103-122033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13748',
internalId:  '',
customField: '20050415-191411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11576',
internalId:  '',
customField: '20100102-184618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81301',
internalId:  '',
customField: '20100103-115801'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXZAR';
var companyName   = 'K%C3%B6rper-+%26+Atemtherapie%2C+Psychologische+Beratung++++++++++++++++++++++';
var htmlTitle	  = 'Psychologische+Beratung+++Atemtherapie+IKP';
var metaKeywords  = 'Monica+Brunner%2C+Psychologische+Beratung%2C+Psychologische+Beratung+Zuerich%2C+Psychologie%2C+Beratung%2C+Psychologie+Beratung+Zuerich%2C+Koerperzentrierte+Psychologische+Beratung%2C+Koerperzentrierte+Psychotherapie+IKP%2C+Atemtherapie%2C+Atemmassage%2C+Atemmeditation%2C+Asthma%2C+Depression%2C+Stress%2C+Stressmanagement%2C+Burnout%2C+Entspannung%2C+Psyche%2C+K%3Frper%2C+Atem%2C+Koerper+und+Atem%2C+Psyche+und+K%3Frper%2C+koerperzentriert%2C+Psychotherapie%2C+Lebensdimensionen%2C+Yvonne+Maurer%2C+IKP-Modell%2C+Gestalttherapie%2C+beduerfniszentriert%2C+prozesshaft%2C+Standortbestimmung%2C+zwischenmenschliche+Fragen%2C+depressive+Verstimmung%2C+Trennungs-+und+Trauerreaktionen%2C+Koerperged%3Fchtnis%2C+breathing+therapy%2C+Kierperarbeit%2C+Selbstwert%2C+Schlafstoerungen%2C+Ants-%2C+und+Panikst%3Frungen%2C+Krisen%2C+psychische+Blockaden%2C+Kopflastigkeit%2C+mentales+Training%2C+Mentaltraining%2C+Beziehungsprobleme%2C+Sexualitaet%2C+Neuorientierung%2C+Standortbestimmung%2C+ASCA-anerkannt%2C+ASCA%2C+Krankenkasse%2C+Krankenkassen-anerkannt%2C+EMR-anerkannt%2C+EMR%2C+EGK-anerkannt%2C+EGK';
var metaContents  = 'Die+koerperzentrierte+psychologislche+Beratung++unnd+Atemtherapie+IKP+%28body-centred+psychotherapy+and++breathing+therapy%29+ist+eine+ganzheitliche+Beratungsform%2C+die+hilft+Loesungen+zu+finden+bei+Problemen+in+zwischenmenschlichen+Beziehungen%2C+Alltagsaengsten%2C+Trennungs-%2C+und+Trauerreaktionen%2C+etc.';
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();
};
