/* [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','5201',jdecode('Home'),jdecode(''),'/5201.html','true',[],'',''],
	['PAGE','42801',jdecode('Unsere+Angebote'),jdecode(''),'/42801/index.html','true',[ 
		['PAGE','5273',jdecode('Aura-Soma'),jdecode(''),'/42801/5273.html','true',[],'',''],
		['PAGE','21201',jdecode('Asiatische+Energiemassage'),jdecode(''),'/42801/21201.html','true',[],'',''],
		['PAGE','21390',jdecode('Chakren-Ausgleich'),jdecode(''),'/42801/21390.html','true',[],'',''],
		['PAGE','5294',jdecode('Facial+Harmony+'),jdecode(''),'/42801/5294.html','true',[],'',''],
		['PAGE','21222',jdecode('Farb-+%26+Farblicht-Therapie'),jdecode(''),'/42801/21222.html','true',[],'',''],
		['PAGE','21243',jdecode('Farbpunktur'),jdecode(''),'/42801/21243.html','true',[],'',''],
		['PAGE','21264',jdecode('Spektro-Chrom-Farblicht-Therapie'),jdecode(''),'/42801/21264.html','true',[],'',''],
		['PAGE','53001',jdecode('Energetische+Behandlung+ESB'),jdecode(''),'/42801/53001.html','true',[],'',''],
		['PAGE','21285',jdecode('Heart+Connection+Journey'),jdecode(''),'/42801/21285.html','true',[],'',''],
		['PAGE','21369',jdecode('Lichtbahnen-Therapie'),jdecode(''),'/42801/21369.html','true',[],'',''],
		['PAGE','21411',jdecode('Methamorphose'),jdecode(''),'/42801/21411.html','true',[],'',''],
		['PAGE','21306',jdecode('Mikunea+Vital+Balance+%26+Innere+Sonne'),jdecode(''),'/42801/21306.html','true',[],'',''],
		['PAGE','21432',jdecode('Numerologie'),jdecode(''),'/42801/21432.html','true',[],'',''],
		['PAGE','53022',jdecode('Punktuelle+Schmerz-+und+Organtherapie'),jdecode(''),'/42801/53022.html','true',[],'',''],
		['PAGE','21453',jdecode('Reiki'),jdecode(''),'/42801/21453.html','true',[],'',''],
		['PAGE','21474',jdecode('Space+Clearing'),jdecode(''),'/42801/21474.html','true',[],'','']
	],'',''],
	['PAGE','44201',jdecode('Kurse+%2F+Workshops'),jdecode(''),'/44201/index.html','true',[ 
		['PAGE','45401',jdecode('After+Work+Balance'),jdecode(''),'/44201/45401.html','true',[],'','']
	],'',''],
	['PAGE','37801',jdecode('Leistungen+-+Preise+-+Termine'),jdecode(''),'/37801.html','true',[],'',''],
	['PAGE','5336',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/5336/index.html','true',[ 
		['PAGE','5357',jdecode('Kontaktformular'),jdecode(''),'/5336/5357.html','true',[],'',''],
		['PAGE','5378',jdecode('Feedback'),jdecode(''),'/5336/5378.html','true',[],'',''],
		['PAGE','5399',jdecode('Routenplaner'),jdecode(''),'/5336/5399.html','true',[],'',''],
		['PAGE','40501',jdecode('Impressum'),jdecode(''),'/5336/40501.html','true',[],'','']
	],'',''],
	['PAGE','5420',jdecode('Partnerlink'),jdecode(''),'/5420.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Case';
theSitetree.paletteFamily='82C1DC';
theSitetree.keyvisualId='11061';
theSitetree.keyvisualName='kv_11061.jpg';
theSitetree.fontsetId='31939';
theSitetree.graphicsetId='13781';
theSitetree.contentColor='34454C';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Case',
				paletteFamily: 	'82C1DC',
				keyvisualId: 	'11061',
				keyvisualName: 	'kv_11061.jpg',
				fontsetId: 		'31939',
				graphicsetId: 	'13781',
				contentColor: 	'34454C',
				contentBGColor: 'F6FBFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-7029']={
webappId:    '7008',
documentId:  '5357',
internalId:  '7029',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-5378abw330ine830']={
webappId:    '1002',
documentId:  '5378',
internalId:  '5378abw330ine830',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5399',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100513-193435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53022',
internalId:  '',
customField: '20100219-170149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5294',
internalId:  '',
customField: '20100330-233451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5273',
internalId:  '',
customField: '20100611-110627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5378',
internalId:  '',
customField: '20090913-150438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20100331-091719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5336',
internalId:  '',
customField: '20100611-112014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5357',
internalId:  '',
customField: '20090913-150346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5399',
internalId:  '',
customField: '20090823-134942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5420',
internalId:  '',
customField: '20100204-223204'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21453',
internalId:  '',
customField: '20091002-211604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21222',
internalId:  '',
customField: '20100330-233656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20091231-213606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21243',
internalId:  '',
customField: '20100330-230224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21264',
internalId:  '',
customField: '20100219-165800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21285',
internalId:  '',
customField: '20090824-103038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21306',
internalId:  '',
customField: '20100331-092644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21369',
internalId:  '',
customField: '20091002-204325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21390',
internalId:  '',
customField: '20100611-111033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21411',
internalId:  '',
customField: '20091002-205942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21432',
internalId:  '',
customField: '20091002-210417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21474',
internalId:  '',
customField: '20091231-213804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37801',
internalId:  '',
customField: '20100513-194206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40501',
internalId:  '',
customField: '20090824-230815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53001',
internalId:  '',
customField: '20100219-170149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44201',
internalId:  '',
customField: '20100513-193714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45401',
internalId:  '',
customField: '20091109-130154'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW330INE830';
var companyName   = 'Chrisal-life-in-balance';
var htmlTitle	  = '';
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();
};
