/* [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','4599',jdecode('Willkommen'),jdecode(''),'/4599/index.html','true',[ 
		['PAGE','4791',jdecode('%C3%BCber+mich'),jdecode(''),'/4599/4791.html','true',[],'',''],
		['PAGE','14412',jdecode('meine+Praxis'),jdecode(''),'/4599/14412.html','true',[],'','']
	],'',''],
	['PAGE','21922',jdecode('Beratungen'),jdecode(''),'/21922/index.html','true',[ 
		['PAGE','4656',jdecode('Tarot'),jdecode(''),'/21922/4656.html','true',[],'',''],
		['PAGE','4683',jdecode('Bachbl%C3%BCten'),jdecode(''),'/21922/4683.html','true',[],'',''],
		['PAGE','10477',jdecode('Tarot+Kurse'),jdecode(''),'/21922/10477.html','true',[],'','']
	],'',''],
	['PAGE','4710',jdecode('Einzel-Coaching'),jdecode(''),'/4710.html','true',[],'',''],
	['PAGE','22801',jdecode('Tarot-Mobil'),jdecode(''),'/22801.html','true',[],'',''],
	['PAGE','21901',jdecode('Behandlungen'),jdecode(''),'/21901.html','true',[],'',''],
	['PAGE','9402',jdecode('Gesamtangebot'),jdecode(''),'/9402.html','true',[],'',''],
	['PAGE','4764',jdecode('Aktuelles+%2F+Links'),jdecode(''),'/4764.html','true',[],'',''],
	['PAGE','4818',jdecode('Kontakt'),jdecode(''),'/4818/index.html','true',[ 
		['PAGE','6964',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/4818/6964.html','false',[],'','']
	],'',''],
	['PAGE','10512',jdecode('G%C3%A4stebuch'),jdecode(''),'/10512/index.html','true',[ 
		['PAGE','10513',jdecode('Eintr%C3%A4ge'),jdecode(''),'/10512/10513.html','false',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Vignette';
theSitetree.paletteFamily='E79E6E';
theSitetree.keyvisualId='3549';
theSitetree.keyvisualName='kv_3549.jpg';
theSitetree.fontsetId='10783';
theSitetree.graphicsetId='10833';
theSitetree.contentColor='875534';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Vignette',
				paletteFamily: 	'E79E6E',
				keyvisualId: 	'3549',
				keyvisualName: 	'kv_3549.jpg',
				fontsetId: 		'10783',
				graphicsetId: 	'10833',
				contentColor: 	'875534',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'E79E6E',
				e_color: 		'886146',
				f_color: 		'C97556',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20100513-191603'
};
webappMappings['1002']=webappMappings['1002-10512ABW0X0INXX7W']={
webappId:    '1002',
documentId:  '10512',
internalId:  '10512ABW0X0INXX7W',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-652492']={
webappId:    '1501',
documentId:  '4599',
internalId:  '652492',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20100616-154337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9402',
internalId:  '',
customField: '20100508-175701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4791',
internalId:  '',
customField: '20100508-174346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14412',
internalId:  '',
customField: '20081026-192329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21922',
internalId:  '',
customField: '20100508-175437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4656',
internalId:  '',
customField: '20100508-175520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4683',
internalId:  '',
customField: '20100508-175008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4710',
internalId:  '',
customField: '20100508-175534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10477',
internalId:  '',
customField: '20100508-175252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21901',
internalId:  '',
customField: '20081026-192658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20100508-175604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4818',
internalId:  '',
customField: '20100306-141208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6964',
internalId:  '',
customField: '20041112-235605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10512',
internalId:  '',
customField: '20081026-193105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10513',
internalId:  '',
customField: '20081026-193125'
};
webappMappings['7008']=webappMappings['7008-6646']={
webappId:    '7008',
documentId:  '4818',
internalId:  '6646',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXX7W';
var companyName   = 'Praxis+f%C3%BCr+K%C3%B6rper%2C+Geist+%26+Seele';
var htmlTitle	  = 'Praxis+f%C3%BCr+K%C3%B6rper%2C+Geist+und+Seele';
var metaKeywords  = 'Tarotkurs+Beratungen+Tarot%2C+Astrologie+Horoskop+Handlesen+Bauchtanz+Enertree+Lebensberatung+orientalischer+Tanz+Pratteln+Basel+Lichtarbeit+Energiearbeit+Chakraarbeit+Reinkernationsanalyse';
var metaContents  = 'Bauchtanz+Astrologie+Tarot+Tarotkurs+Handlesen+orientalischer+Tanz+Pratteln+Basel++K%C3%B6rper-Energiearbeit%2C+Chakraarbeit%2C+Lichtarbeit%2C+Behandlungen%2C+Beratungen%2C+Kurse';
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();
};
