/* [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','4484',jdecode('Home'),jdecode(''),'/4484.html','true',[],'',''],
	['PAGE','96163',jdecode('Page+fran%C3%A7aise'),jdecode(''),'/96163.html','true',[],'',''],
	['PAGE','4568',jdecode('Coaching'),jdecode(''),'/4568.html','true',[],'',''],
	['PAGE','4541',jdecode('Teamentwicklung'),jdecode(''),'/4541.html','true',[],'',''],
	['PAGE','4595',jdecode('Gesundheit+%2F+Wellness'),jdecode(''),'/4595.html','true',[],'',''],
	['PAGE','4622',jdecode('Farb-%2F+Stilberatung'),jdecode(''),'/4622.html','true',[],'',''],
	['PAGE','4649',jdecode('Standort-Emplacement'),jdecode(''),'/4649.html','true',[],'',''],
	['PAGE','30282',jdecode('Dank-Remerciements'),jdecode(''),'/30282.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Garden';
theSitetree.paletteFamily='EDB086';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='79';
theSitetree.graphicsetId='102';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Garden',
				paletteFamily: 	'EDB086',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'79',
				graphicsetId: 	'102',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'EDB086',
				b_color: 		'EEAE7A',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4484',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4484',
internalId:  '',
customField: '20100817-124147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96163',
internalId:  '',
customField: '20100817-124318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4595',
internalId:  '',
customField: '20100817-124824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4568',
internalId:  '',
customField: '20100817-124559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4541',
internalId:  '',
customField: '20100817-124418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4622',
internalId:  '',
customField: '20100817-125000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4649',
internalId:  '',
customField: '20100121-164749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30282',
internalId:  '',
customField: '20100807-225829'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXXPW';
var companyName   = 'QuerBeratung';
var htmlTitle	  = 'Coaching-Mentaltraining-Wellness';
var metaKeywords  = 'Coaching%2C+Mentaltraining%2C+Teamentwicklung%2C+Wellness%2C+Gesundheitscoaching%2C+Breussmassage%2C+Dorntherapie%2C+Farbtherapie%2C+Colonmassage%2C+Tierkommunikation%2C+Unternehmenstheater%2C+EFT%2C+Farb-+und+Stilberatung%2C+D%C3%A9velopement+de+team%2C+Coaching+de+sant%C3%A9%2C+Massage+Breuss%2C+Th%C3%A9rapie+Dorn%2C+Consultation+de+couleurs+et+relookages';
var metaContents  = 'Coaching%2C+EFT%2C+Emotional+freedom+technique%2C+Mentaltraining%2C+MBE%2C+Management+of+business+entertainment%2C+Familienaufstellung%2C+Akupunkturklopfen%2C+Teamentwicklung%2C+Teamberatung%2C+Pr%C3%BCfungsangst%2C+Lebenspr%C3%BCfungen%2C+Diplomarbeitbegleitung%2C+Schulung%2C+Unternehmenstheater%2C+Burnout%2C+Blockaden+l%C3%B6sen%2C+Aufbau+von+Selbstvertrauen%2C+Unternehmensberatung%2C+Tierkommunikation%2C+Gesundheitscoaching%2C+Breussmassage+%28Wirbels%C3%A4ule%29%2C+Dorntherapie%2C+Chromotherapie%2C+Farbtherapie%2C+Lichttherapie%2C+Heilerdentherapie%2C+Bachbl%C3%BCten%2C+Sch%C3%BCsslersalze%2C+Colonmassage%2C+Stresstherapie%3B+Farb-+und+Stilberatung%2C+Lebensberatung%2C+Migr%C3%A4ne%2C+R%C3%BCckenbeschwerden%2C+H%C3%BCftbeschwerden%2C+Schulterbeschwerden%2C+Schwangerschaftsbeschwerden%2C+Wechseljahrbeschwerden%2C+Depressive+Verstimmung%2C+D%C3%A9velopement+de+team%2C+Peur+dexamens%2C+Coaching+de+sant%C3%A9%2C+Massage+Breuss%2C+Th%C3%A9rapie+Dorn+-colonne+vert%C3%A9brale%2C+Th%C3%A9rapie+anti-stress%2C+Fleurs+de+Bache%2C+Sels+de+Sch%C3%BCssler%2C+Migraine%2C+Mal+de+dos%2C+Mal+des+hanches%2C+Mal+aux+%C3%A9paules%2C+Consultation+de+couleurs+et+relookages';
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();
};
