/* [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'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','452',jdecode('Naturheilkunde'),jdecode(''), jdecode('%2F452.html'), 'true',[],'',''],
	['PAGE','40301',jdecode('Coaching'),jdecode(''), jdecode('%2F40301.html'), 'true',[],'',''],
	['PAGE','641',jdecode('Portrait'),jdecode(''), jdecode('%2F641.html'), 'true',[],'',''],
	['PAGE','662',jdecode('Honorar'),jdecode(''), jdecode('%2F662.html'), 'true',[],'',''],
	['PAGE','7401',jdecode('Wegbeschreibung'),jdecode(''), jdecode('%2F7401.html'), 'true',[],'',''],
	['PAGE','725',jdecode('Links'),jdecode(''), jdecode('%2F725.html'), 'true',[],'',''],
	['PAGE','746',jdecode('Kurse%2C+Aktuelles'),jdecode(''), jdecode('%2F746.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='999966';
theSitetree.keyvisualId='1354';
theSitetree.keyvisualName='flacons.jpg';
theSitetree.fontsetId='237';
theSitetree.graphicsetId='283';
theSitetree.contentColor='002F2F';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2QE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'999966',
				keyvisualId: 	'1354',
				keyvisualName: 	'flacons.jpg',
				fontsetId: 		'237',
				graphicsetId: 	'283',
				contentColor: 	'002F2F',
				contentBGColor: 'FFFFFF',
				a_color: 		'999966',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120109-113329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20110215-132041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40301',
internalId:  '',
customField: '20110215-132545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20111022-191617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20111111-135108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20110202-153443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '725',
internalId:  '',
customField: '20111022-183214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20120109-113414'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2RLP';
var companyName   = 'Praxis+Sandra+Ulrich';
var htmlTitle	  = 'Praxis+f%C3%BCr+Naturheilkunde+%26+Coaching+Sandra+Ulrich%2C++Affoltern+am+Albis%2C+044+776+20+76';
var metaKeywords  = 'Abenteuer%0D%0AAbnehmen%0D%0AAffoltern+am+Albis%0D%0AAllergie%0D%0AAlternativmedizin%0D%0AAnatomie%0D%0AAusleitverfahren%0D%0ABaunscheidtieren%0D%0ABeratung%0D%0ABioresonanz%0D%0ABioresonanztherapie%0D%0ABlutegel%0D%0ABlutegeltherapie%0D%0ABurnout%0D%0ABurn-Out%0D%0ACoach%0D%0ACoachCompact%0D%0ACoaching%0D%0ADi%C3%A4tetik%0D%0ADorn-Therapie%0D%0ADVNLP%0D%0AEnergie%0D%0AEnergiearbeit%0D%0AErn%C3%A4hrung%0D%0AErn%C3%A4hrungsberatung%0D%0AFirmencoaching%0D%0AGelassenheit%0D%0AGesunde+Lebensf%C3%BChrung%0D%0AGesundheit%0D%0AGesundheit%0D%0AGesundheitspraxis%0D%0AGewichtsprobleme%0D%0AGl%C3%BCck%0D%0AHausapotheke%0D%0AHeilpraktiker%0D%0AHeilpraktikerin%0D%0AHumor%0D%0AHypno-Coach%0D%0AHypnose%0D%0AHypnose%0D%0AHypnosetherapie%0D%0AHypnotherapie%0D%0AKantonal+approbiert%0D%0AKantonale+Approbation%0D%0AKrafttiere%0D%0AKrankenkassen+anerkannt%0D%0AKurse%0D%0ALebensfreude%0D%0ALebensqualit%C3%A4t%0D%0AL%C3%B6sungsorientierte+Begleitung%0D%0AMotivationstraining%0D%0ANaturarzt%0D%0ANatur%C3%A4rztin%0D%0ANaturheilkunde%0D%0ANaturheilpraktiker%0D%0ANaturheilpraktikerin%0D%0ANaturheilpraxis%0D%0ANLP%0D%0ANLP-Master%0D%0APaarberatung%0D%0APflanzenheilkunde%0D%0APhytotherapie%0D%0APotential%0D%0APraxis%0D%0APsychologische+Beratung%0D%0ARessourcen%0D%0ARituale%0D%0ASandra%0D%0AS%C3%A4uliamt%0D%0ASchamanisch%0D%0ASchamanische+Rituale%0D%0ASchamanismus%0D%0ASchr%C3%B6pfen%0D%0ASchr%C3%B6pfmassage%0D%0ASelbstheilungskr%C3%A4fte%0D%0ASeminare%0D%0ATherapie%0D%0ATrance%0D%0AUlrich%0D%0AVerb%C3%BCndete%0D%0AVisionen%0D%0AWickel%0D%0AWirbels%C3%A4ulentherapie+nach+Dorn%0D%0AZusatzversicherung';
var metaContents  = 'Abenteuer%0D%0AAbnehmen%0D%0AAffoltern+am+Albis%0D%0AAllergie%0D%0AAlternativmedizin%0D%0AAnatomie%0D%0AAusleitverfahren%0D%0ABaunscheidtieren%0D%0ABeratung%0D%0ABioresonanz%0D%0ABioresonanztherapie%0D%0ABlutegel%0D%0ABlutegeltherapie%0D%0ABurnout%0D%0ABurn-Out%0D%0ACoach%0D%0ACoachCompact%0D%0ACoaching%0D%0ADi%C3%A4tetik%0D%0ADorn-Therapie%0D%0ADVNLP%0D%0AEnergie%0D%0AEnergiearbeit%0D%0AErn%C3%A4hrung%0D%0AErn%C3%A4hrungsberatung%0D%0AFirmencoaching%0D%0AGelassenheit%0D%0AGesunde+Lebensf%C3%BChrung%0D%0AGesundheit%0D%0AGesundheit%0D%0AGesundheitspraxis%0D%0AGewichtsprobleme%0D%0AGl%C3%BCck%0D%0AHausapotheke%0D%0AHeilpraktiker%0D%0AHeilpraktikerin%0D%0AHumor%0D%0AHypno-Coach%0D%0AHypnose%0D%0AHypnose%0D%0AHypnosetherapie%0D%0AHypnotherapie%0D%0AKantonal+approbiert%0D%0AKantonale+Approbation%0D%0AKrafttiere%0D%0AKrankenkassen+anerkannt%0D%0AKurse%0D%0ALebensfreude%0D%0ALebensqualit%C3%A4t%0D%0AL%C3%B6sungsorientierte+Begleitung%0D%0AMotivationstraining%0D%0ANaturarzt%0D%0ANatur%C3%A4rztin%0D%0ANaturheilkunde%0D%0ANaturheilpraktiker%0D%0ANaturheilpraktikerin%0D%0ANaturheilpraxis%0D%0ANLP%0D%0ANLP-Master%0D%0APaarberatung%0D%0APflanzenheilkunde%0D%0APhytotherapie%0D%0APotential%0D%0APraxis%0D%0APsychologische+Beratung%0D%0ARessourcen%0D%0ARituale%0D%0ASandra%0D%0AS%C3%A4uliamt%0D%0ASchamanisch%0D%0ASchamanische+Rituale%0D%0ASchamanismus%0D%0ASchr%C3%B6pfen%0D%0ASchr%C3%B6pfmassage%0D%0ASelbstheilungskr%C3%A4fte%0D%0ASeminare%0D%0ATherapie%0D%0ATrance%0D%0AUlrich%0D%0AVerb%C3%BCndete%0D%0AVisionen%0D%0AWickel%0D%0AWirbels%C3%A4ulentherapie+nach+Dorn%0D%0AZusatzversicherung';
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();
};

