/* [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','301',jdecode('Eskaringa'),jdecode(''), jdecode('%2F301%2Findex.html'), 'true',[ 
		['PAGE','351412',jdecode('%C3%9Cber+mich'),jdecode(''), jdecode('%2F301%2F351412.html'), 'true',[],'',''],
		['PAGE','357612',jdecode('+Mein+Buch'),jdecode(''), jdecode('%2F301%2F357612.html'), 'true',[],'',''],
		['PAGE','223201',jdecode('Meine+R%C3%A4ume'),jdecode(''), jdecode('%2F301%2F223201.html'), 'true',[],'','']
	],'',''],
	['PAGE','351712',jdecode('Behandlungen'),jdecode(''), jdecode('%2F351712%2Findex.html'), 'true',[ 
		['PAGE','352112',jdecode('Be+yourself'),jdecode(''), jdecode('%2F351712%2F352112.html'), 'true',[],'',''],
		['PAGE','352133',jdecode('Feel+Good'),jdecode(''), jdecode('%2F351712%2F352133.html'), 'true',[],'',''],
		['PAGE','352154',jdecode('Rollout'),jdecode(''), jdecode('%2F351712%2F352154.html'), 'true',[],'','']
	],'',''],
	['PAGE','354712',jdecode('Nikken'),jdecode(''), jdecode('%2F354712%2Findex.html'), 'true',[ 
		['PAGE','195101',jdecode('Die+5+S%C3%A4ulen'),jdecode(''), jdecode('%2F354712%2F195101.html'), 'true',[],'',''],
		['PAGE','362512',jdecode('Ihr+Termin'),jdecode(''), jdecode('%2F354712%2F362512.html'), 'true',[],'','']
	],'',''],
	['PAGE','377012',jdecode('Aktion+Eskaringa'),jdecode(''), jdecode('%2F377012.html'), 'true',[],'',''],
	['PAGE','373512',jdecode('Energiebahnen'),jdecode(''), jdecode('%2F373512.html'), 'true',[],'',''],
	['PAGE','115301',jdecode('Kontakt'),jdecode(''), jdecode('%2F115301%2Findex.html'), 'true',[ 
		['PAGE','115701',jdecode('Lageplan'),jdecode(''), jdecode('%2F115301%2F115701.html'), 'true',[],'',''],
		['PAGE','21022',jdecode('Links'),jdecode(''), jdecode('%2F115301%2F21022.html'), 'true',[],'','']
	],'',''],
	['PAGE','359612',jdecode('G%C3%A4stebuch+'),jdecode(''), jdecode('%2F359612.html'), 'true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Palette';
theSitetree.paletteFamily='8F56C6';
theSitetree.keyvisualId='9344';
theSitetree.keyvisualName='kv_9344.jpg';
theSitetree.fontsetId='17396';
theSitetree.graphicsetId='12847';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Palette',
				paletteFamily: 	'8F56C6',
				keyvisualId: 	'9344',
				keyvisualName: 	'kv_9344.jpg',
				fontsetId: 		'17396',
				graphicsetId: 	'12847',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20120109-140838'
};
webappMappings['1501']=webappMappings['1501-23914120']={
webappId:    '1501',
documentId:  '301',
internalId:  '23914120',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115301',
internalId:  '',
customField: '20120119-080329'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '115701',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21022',
internalId:  '',
customField: '20111101-091307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '373512',
internalId:  '',
customField: '20120119-080216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '351412',
internalId:  '',
customField: '20120116-125837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '351712',
internalId:  '',
customField: '20120116-130243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352112',
internalId:  '',
customField: '20120119-084523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352133',
internalId:  '',
customField: '20111129-140643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352154',
internalId:  '',
customField: '20120103-103419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '354712',
internalId:  '',
customField: '20120116-135943'
};
webappMappings['7008']=webappMappings['7008-1624']={
webappId:    '7008',
documentId:  '115301',
internalId:  '1624',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115701',
internalId:  '',
customField: '20111101-091943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '362512',
internalId:  '',
customField: '20120116-140915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '357612',
internalId:  '',
customField: '20110912-053016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '377012',
internalId:  '',
customField: '20120103-073444'
};
webappMappings['1002']=webappMappings['1002-359612ahopt0in3m8s']={
webappId:    '1002',
documentId:  '359612',
internalId:  '359612ahopt0in3m8s',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '359612',
internalId:  '',
customField: '20110919-084700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195101',
internalId:  '',
customField: '20120116-133219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223201',
internalId:  '',
customField: '20110913-174114'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3M8S';
var companyName   = '';
var htmlTitle	  = 'Eskaringa+-++Leben+das+bewegt';
var metaKeywords  = 'Energietherapie%2C+Bewusstseins-Coaching%2C+Energiearbeit%2C+Bewusstseinsentwicklung%2C+Coaching%2C+Massage%2C+Energie-Massage%2C+Nikken+Rollout-Massage%2C+Nikken+Fachberatrin%2C+Wellness+%2C+Gesundheit%2C+mehr+Energie+im+Alltag%2C+Lebensberatung%2C+Spiritualit%C3%A4t%2C+positiver+Ver%C3%A4nderung%2C+R%C3%BCckenproblem%2C+Kopfscherzen%2C+Schleudertrauma%2C+Schwindel';
var metaContents  = 'Leben+das+bewegt%0D%0ANikken%2C+Energietherapie%2C+Bewusstseins-Coaching%2C+%0D%0AEnergie-Massage%2C+Rollout-Energiemassage+%28mit+Magenttechnologie%29%2C++Nikken-Vital+Wellness%2C+Beratung+f%C3%BCr+Gesundheit+und+Wohlbefinden%2C+ganzheitliche+Therapie';
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();
};

