/* [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','4499',jdecode('Home'),jdecode(''), jdecode('%2F4499.html'), 'true',[],'',''],
	['PAGE','21692',jdecode('News'),jdecode(''), jdecode('%2F21692.html'), 'true',[],'',''],
	['PAGE','4556',jdecode('Das+Leiterteam'),jdecode(''), jdecode('%2F4556.html'), 'true',[],'',''],
	['PAGE','4637',jdecode('Energy+Healing+T.'),jdecode(''), jdecode('%2F4637.html'), 'true',[],'',''],
	['PAGE','49411',jdecode('EHT+in+italiano'),jdecode(''), jdecode('%2F49411.html'), 'true',[],'',''],
	['PAGE','41115',jdecode('Vertical+Balancing'),jdecode(''), jdecode('%2F41115.html'), 'true',[],'',''],
	['PAGE','4610',jdecode('Intuitionstraining'),jdecode(''), jdecode('%2F4610.html'), 'true',[],'',''],
	['PAGE','49643',jdecode('Naturprojekt'),jdecode(''), jdecode('%2F49643.html'), 'true',[],'',''],
	['PAGE','4664',jdecode('Tarot+Ausbildung'),jdecode(''), jdecode('%2F4664.html'), 'true',[],'',''],
	['PAGE','49420',jdecode('Retreat'),jdecode(''), jdecode('%2F49420.html'), 'true',[],'',''],
	['PAGE','4583',jdecode('Retreats'),jdecode(''), jdecode('%2F4583%2Findex.html'), 'false',[ 
		['PAGE','4691',jdecode('Meditationsleiter+A.'),jdecode(''), jdecode('%2F4583%2F4691.html'), 'true',[],'','']
	],'',''],
	['PAGE','37692',jdecode('Energetisch+Stellen'),jdecode(''), jdecode('%2F37692.html'), 'true',[],'',''],
	['PAGE','30895',jdecode('Der+Quantensprung'),jdecode(''), jdecode('%2F30895.html'), 'true',[],'',''],
	['PAGE','25573',jdecode('Einzelsitzungen'),jdecode(''), jdecode('%2F25573%2Findex.html'), 'true',[ 
		['PAGE','50081',jdecode('Kurz-Fernbehandlungen+'),jdecode(''), jdecode('%2F25573%2F50081.html'), 'true',[],'','']
	],'',''],
	['PAGE','49155',jdecode('Therapeuten-Liste'),jdecode(''), jdecode('%2F49155.html'), 'true',[],'',''],
	['PAGE','15637',jdecode('Termine-%C3%9Cbersicht'),jdecode(''), jdecode('%2F15637.html'), 'true',[],'',''],
	['PAGE','21746',jdecode('Kontakt%2FAnmeldung'),jdecode(''), jdecode('%2F21746%2Findex.html'), 'true',[ 
		['PAGE','22607',jdecode('Kontakt%2FAnmeldung+%28Folgeseite%29'),jdecode(''), jdecode('%2F21746%2F22607.html'), 'false',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Curve';
theSitetree.paletteFamily='FFE397';
theSitetree.keyvisualId='5771';
theSitetree.keyvisualName='kv_5771.jpg';
theSitetree.fontsetId='11086';
theSitetree.graphicsetId='11856';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFD791';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Curve',
				paletteFamily: 	'FFE397',
				keyvisualId: 	'5771',
				keyvisualName: 	'kv_5771.jpg',
				fontsetId: 		'11086',
				graphicsetId: 	'11856',
				contentColor: 	'000000',
				contentBGColor: 'FFD791',
				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:  '4499',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4637',
internalId:  '',
customField: '20120119-235810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4499',
internalId:  '',
customField: '20100804-012320'
};
webappMappings['7008']=webappMappings['7008-2192']={
webappId:    '7008',
documentId:  '21746',
internalId:  '2192',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21692',
internalId:  '',
customField: '20120119-234854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41115',
internalId:  '',
customField: '20120119-235118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15637',
internalId:  '',
customField: '20120119-235334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4610',
internalId:  '',
customField: '20111222-232858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4583',
internalId:  '',
customField: '20111222-231935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50081',
internalId:  '',
customField: '20120120-010708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20111222-231403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4691',
internalId:  '',
customField: '20110716-171009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37692',
internalId:  '',
customField: '20111222-232806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25573',
internalId:  '',
customField: '20111223-002724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49155',
internalId:  '',
customField: '20120120-000847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20111223-001523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30895',
internalId:  '',
customField: '20111222-232025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21746',
internalId:  '',
customField: '20111222-232346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22607',
internalId:  '',
customField: '20040126-212915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49411',
internalId:  '',
customField: '20111222-233151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49420',
internalId:  '',
customField: '20111223-001822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49643',
internalId:  '',
customField: '20111222-230024'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3R6M';
var companyName   = 'Institut+f%C3%BCr+Angewandte+Intuition';
var htmlTitle	  = 'Institut+f%C3%BCr+Angewandte+Intuition';
var metaKeywords  = 'Intuition%2C+Heilung%2C+Heilverfahren%2C+Energy+Healing%2C+Meditation%2C+Chakras%2C+Energiearbeit%2C+Tarot%2C+Esoterik%2C+Selbstfindung%2C+Seminare%2C+Quantensprung%2C+Erleuchtung%2C+Vortr%C3%A4ge+Trainings%2C+NLP%2C++Ausbildung%2C+Kinesiologie%2C+Satsang%2C+Hypnose%2C+K%C3%B6rperarbeit%2C+Schamanismus%2C+Retreat%2C+Mediale+Arbeit%2C+';
var metaContents  = 'Institut+f%C3%BCr+Angewandte+Intuition.+Seminare%2C+Trainings+Retreats%2C+Ausbildungen.++Energy+Healing+Training+und+Ausbildung%2C+Heil-+und+Bewusstseinsarbeit%2C+Ganzheitliches+Intuitionstraining%2C+Meditationsleiter+Ausbildung%2CTarot-Berater+Ausbildung%2C+Herbst-Retreat%2C+Mit+einem+Quantensprung+ins+neue+Jahr%2C+Einzelsitzungen%2C+Lebensberatung%2C+Mediale+Arbeit%2C+Kinesiologie+';
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();
};

