/* [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(''), jdecode('%2F5201.html'), 'true',[],'',''],
	['PAGE','42801',jdecode('Unsere+Angebote'),jdecode(''), jdecode('%2F42801%2Findex.html'), 'true',[ 
		['PAGE','5273',jdecode('Aura-Soma'),jdecode(''), jdecode('%2F42801%2F5273.html'), 'true',[],'',''],
		['PAGE','21201',jdecode('Asiatische+Energiemassage'),jdecode(''), jdecode('%2F42801%2F21201.html'), 'true',[],'',''],
		['PAGE','5294',jdecode('Facial+Harmony+'),jdecode(''), jdecode('%2F42801%2F5294.html'), 'true',[],'',''],
		['PAGE','21222',jdecode('Farb-+%26+Farblicht-Therapie'),jdecode(''), jdecode('%2F42801%2F21222.html'), 'true',[],'',''],
		['PAGE','21243',jdecode('Farbpunktur'),jdecode(''), jdecode('%2F42801%2F21243.html'), 'true',[],'',''],
		['PAGE','21285',jdecode('Heart+Connection+Journey'),jdecode(''), jdecode('%2F42801%2F21285.html'), 'true',[],'',''],
		['PAGE','21369',jdecode('Lichtbahnen-Therapie'),jdecode(''), jdecode('%2F42801%2F21369.html'), 'true',[],'',''],
		['PAGE','21306',jdecode('Mikunea+Vital+Balance+%26+Innere+Sonne'),jdecode(''), jdecode('%2F42801%2F21306.html'), 'true',[],'',''],
		['PAGE','21432',jdecode('Numerologie'),jdecode(''), jdecode('%2F42801%2F21432.html'), 'true',[],'',''],
		['PAGE','61801',jdecode('Pranic+Healing'),jdecode(''), jdecode('%2F42801%2F61801.html'), 'true',[],'',''],
		['PAGE','21453',jdecode('Reiki+%26+Space+Clearing'),jdecode(''), jdecode('%2F42801%2F21453.html'), 'true',[],'','']
	],'',''],
	['PAGE','56701',jdecode('Meditation+%C3%BCber+2+Herzen'),jdecode(''), jdecode('%2F56701.html'), 'true',[],'',''],
	['PAGE','44201',jdecode('Kurse+%2F+Workshops'),jdecode(''), jdecode('%2F44201.html'), 'true',[],'',''],
	['PAGE','37801',jdecode('Leistungen+-+Preise+-+Termine'),jdecode(''), jdecode('%2F37801.html'), 'true',[],'',''],
	['PAGE','5336',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F5336%2Findex.html'), 'true',[ 
		['PAGE','5357',jdecode('Kontaktformular'),jdecode(''), jdecode('%2F5336%2F5357.html'), 'true',[],'',''],
		['PAGE','5399',jdecode('Routenplaner'),jdecode(''), jdecode('%2F5336%2F5399.html'), 'true',[],'',''],
		['PAGE','40501',jdecode('Impressum'),jdecode(''), jdecode('%2F5336%2F40501.html'), 'true',[],'','']
	],'',''],
	['PAGE','5420',jdecode('Partnerlink'),jdecode(''), jdecode('%2F5420.html'), 'true',[],'','']];
var siteelementCount=21;
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 prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
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['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5399',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20110705-163904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5294',
internalId:  '',
customField: '20100330-233451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5273',
internalId:  '',
customField: '20110331-165516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20110705-091045'
};
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: '20110705-081516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21222',
internalId:  '',
customField: '20110705-082526'
};
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:  '21285',
internalId:  '',
customField: '20090824-103038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21306',
internalId:  '',
customField: '20100331-092644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56701',
internalId:  '',
customField: '20120109-161258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21369',
internalId:  '',
customField: '20091002-204325'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '61801',
internalId:  '-',
customField: '20120109-164501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21432',
internalId:  '',
customField: '20091002-210417'
};
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:  '44201',
internalId:  '',
customField: '20120109-162000'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.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();
};

