/* [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','401',jdecode('Home%2C+Honig+%26+Reico'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('Reiki+%26+Bachbl%C3%BCten'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','473',jdecode('Hot+Stone+Massage'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','494',jdecode('Kr%C3%A4uterstempel'),jdecode(''),'/494.html','true',[],'',''],
	['PAGE','578',jdecode('Aromamassage'),jdecode(''),'/578.html','true',[],'',''],
	['PAGE','32801',jdecode('Edelstein-Massage'),jdecode(''),'/32801.html','true',[],'',''],
	['PAGE','515',jdecode('Dorn+%26+Breuss'),jdecode(''),'/515.html','true',[],'',''],
	['PAGE','10001',jdecode('Zur+Person+%26+Kontakt'),jdecode(''),'/10001.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Bloom';
theSitetree.paletteFamily='93358F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33074';
theSitetree.graphicsetId='14051';
theSitetree.contentColor='3a0d3d';
theSitetree.contentBGColor='e7a99d';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bloom',
				paletteFamily: 	'93358F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33074',
				graphicsetId: 	'14051',
				contentColor: 	'3a0d3d',
				contentBGColor: 'e7a99d',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20101013-141954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20091118-075242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20091118-075532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20091118-075144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20110330-120436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20110330-120835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20091118-074737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20091118-074824'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2L0U';
var companyName   = 'Praxis+f%C3%BCr+mehr+Wohlbefinden';
var htmlTitle	  = 'Iris+Vogt+-+Praxis+f%C3%BCr+mehr+Wohlbefinden';
var metaKeywords  = 'Praxis%2C+Wohlbefinden%2C+Reiki+Seminare%2C+Reiki+Behandlungen%2C+Reiki%2C+universelle+Lebensenergie%2C+Heilen%2C+Hot+Stone+Massage%2C+Kr%EF%BF%BDuterstempel+Massage%2C++Aroma-Massage%2C+Edelstein-Massage%2C+Edelsteine%2C+Heilsteine%2C+Edelstein%EF%BF%BDle%2C+Nat%EF%BF%BDrlich%2C+Chakra%2C+Schwinungsenergie%2C+Mineralien%2C+Spurenelemente%2C+Kopfschmerztherapie%2C+Migr%EF%BF%BDnetherapie%2C+BRAIN+SPICE%2C+Rauchtherapie%2C+Bienenhonig%2C+Iris+Vogt%2C+Schlacken+abtransportieren%2C+Chakren+regulieren%2C+Stressberuhigung%2C+Wintersingen%2C+Baselland%2C+Erholung%2C+Durchblutung%2C+Stoffwechselanregung%2C+Hautbildverbesserung%2C+Hautbild%2C+Verspannungen%2C+Sportverletzungen%2C+R%EF%BF%BDckenbeschwerden%2C+Nackenbeschwerden%2C+Entspannung%2C+Stress%2C+Verbesserung+Lymphfluss%2C+Verbesserung+Energiefluss%2C+Meridianfluss%2C+Kr%EF%BF%BDuter%2C+Duft%2C+Dornmethode%2C+Wirbeltherapie+nach+Dorn%2C+Dieter+Dorn%2C+Dr.+Med.+M.+Graulich%2C+Sanfte+Manuelle+Therapie%2C+Wirbeltherapie+Graulich%2C+Wirbelrichten%2C+Pantha+Jama%2C+Hexenschuss%2C+Ischias%2C+Beckenschiefstand%2C+Skoliose%2C+H%EF%BF%BDftprobleme%2C+Knieprobleme%2C+Fussprobleme%2C+Migr%EF%BF%BDne%2C+Kopfschmerzen%2C+Schwindel%2C+Bandscheibenvorfall%2C+einschlafende+H%EF%BF%BDnde%2C+Schuheinlagen+';
var metaContents  = 'Ich+biete+Behandlungen+an+f%EF%BF%BDr+mehr+Wohlbefinden.+Reiki%2C+Hot+Stone+Massage%2C+Kr%EF%BF%BDuterstempel-Massage+%28Pantha+Jama%29%2C+Aroma-Massage%2C+Edelstein-Massage%2C+Migr%EF%BF%BDne-+und+Kopfschmerz-Therapie+inkl.+BRAIN+SPICE+sind+Behandlungen+f%EF%BF%BDr+das+k%EF%BF%BDrperliche%2C+geistige+und+seelische+Wohlbefinden.+Schweizer+Bienenhonig+direkt+vom+Imker+kann+bei+mir+direkt+gekauft+werden.';
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();
};

