/* [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','601',jdecode('Home'),jdecode(''), jdecode('%2F601%2Findex.html'), 'true',[ 
		['PAGE','5101',jdecode('%C3%9Cber+mich'),jdecode(''), jdecode('%2F601%2F5101.html'), 'true',[],'',''],
		['PAGE','5122',jdecode('Meine+Ausbildung'),jdecode(''), jdecode('%2F601%2F5122.html'), 'true',[],'',''],
		['PAGE','91301',jdecode('Wege+entstehen'),jdecode(''), jdecode('%2F601%2F91301.html'), 'true',[],'',''],
		['PAGE','105901',jdecode('Weisheiten'),jdecode(''), jdecode('%2F601%2F105901.html'), 'true',[],'','']
	],'',''],
	['PAGE','5164',jdecode('Angebote'),jdecode(''), jdecode('%2F5164%2Findex.html'), 'true',[ 
		['PAGE','5248',jdecode('Bioenergie'),jdecode(''), jdecode('%2F5164%2F5248.html'), 'true',[],'',''],
		['PAGE','5185',jdecode('Massage'),jdecode(''), jdecode('%2F5164%2F5185.html'), 'true',[],'',''],
		['PAGE','100101',jdecode('Natur+Begegnungen'),jdecode(''), jdecode('%2F5164%2F100101.html'), 'true',[],'',''],
		['PAGE','5206',jdecode('Reiki'),jdecode(''), jdecode('%2F5164%2F5206.html'), 'true',[],'','']
	],'',''],
	['PAGE','116001',jdecode('Tarass+-+Heiler'),jdecode(''), jdecode('%2F116001.html'), 'true',[],'',''],
	['PAGE','68101',jdecode('Heiler+der+Neuen+Zeit'),jdecode(''), jdecode('%2F68101.html'), 'true',[],'',''],
	['PAGE','34401',jdecode('Intuitionstrainerin'),jdecode(''), jdecode('%2F34401.html'), 'true',[],'',''],
	['PAGE','28143',jdecode('Kryonschule+-+Enja'),jdecode(''), jdecode('%2F28143.html'), 'true',[],'',''],
	['PAGE','5311',jdecode('Seminare'),jdecode(''), jdecode('%2F5311.html'), 'true',[],'',''],
	['PAGE','113201',jdecode('Tiere'),jdecode(''), jdecode('%2F113201%2Findex.html'), 'true',[ 
		['PAGE','114501',jdecode('Tier-Behandlung'),jdecode(''), jdecode('%2F113201%2F114501.html'), 'true',[],'','']
	],'',''],
	['PAGE','28101',jdecode('Unsere+Hunde'),jdecode(''), jdecode('%2F28101.html'), 'true',[],'',''],
	['PAGE','50201',jdecode('N%C3%BCtzliche+Links'),jdecode(''), jdecode('%2F50201.html'), 'true',[],'',''],
	['PAGE','104001',jdecode('Link+zur+Ferienvilla'),jdecode(''), jdecode('%2F104001.html'), 'true',[],'',''],
	['PAGE','5374',jdecode('Kontakt'),jdecode(''), jdecode('%2F5374%2Findex.html'), 'true',[ 
		['PAGE','5395',jdecode('Feedback+Formular'),jdecode(''), jdecode('%2F5374%2F5395.html'), 'true',[],'','']
	],'',''],
	['PAGE','22001',jdecode('Ihr+Weg+zu+mir'),jdecode(''), jdecode('%2F22001.html'), 'true',[],'',''],
	['PAGE','14401',jdecode('Impressum'),jdecode(''), jdecode('%2F14401.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='1280';
theSitetree.keyvisualName='feder.jpg';
theSitetree.fontsetId='192';
theSitetree.graphicsetId='232';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'990000',
				keyvisualId: 	'1280',
				keyvisualName: 	'feder.jpg',
				fontsetId: 		'192',
				graphicsetId: 	'232',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'990000',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-965']={
webappId:    '7008',
documentId:  '5395',
internalId:  '965',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '22001',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104001',
internalId:  '',
customField: '20110501-132641'
};
webappMappings['7008']=webappMappings['7008-967']={
webappId:    '7008',
documentId:  '5311',
internalId:  '967',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20120118-100629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20120118-100002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20120118-095808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5164',
internalId:  '',
customField: '20111128-213537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5185',
internalId:  '',
customField: '20090601-155344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5206',
internalId:  '',
customField: '20120118-100949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5248',
internalId:  '',
customField: '20110316-145507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28143',
internalId:  '',
customField: '20111118-193429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20110501-132427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68101',
internalId:  '',
customField: '20110501-132310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5311',
internalId:  '',
customField: '20111221-143922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50201',
internalId:  '',
customField: '20091216-172328'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113201',
internalId:  '-',
customField: '20111121-084937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100101',
internalId:  '',
customField: '20110501-132146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20110226-152750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105901',
internalId:  '',
customField: '20120118-100109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5374',
internalId:  '',
customField: '20110217-184444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5395',
internalId:  '',
customField: '20080122-134402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22001',
internalId:  '',
customField: '20080127-184701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20100925-100549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91301',
internalId:  '',
customField: '20110502-100537'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '116001',
internalId:  '-',
customField: '20111221-143355'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '114501',
internalId:  '-',
customField: '20111121-085016'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW1X0INE0LV';
var companyName   = 'Praxis+f%C3%BCr+K%C3%B6rper%2C+Geist+und+Seele';
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();
};

