/* [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','1008',jdecode('Home'),jdecode(''),'/1008.html','true',[],'',''],
	['PAGE','1363',jdecode('Sitemap'),jdecode(''),'/1363.html','true',[],'',''],
	['PAGE','1390',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/1390.html','true',[],'',''],
	['PAGE','1417',jdecode('Der+Ort'),jdecode(''),'/1417.html','true',[],'',''],
	['PAGE','37326',jdecode('Routenplaner'),jdecode(''),'/37326.html','true',[],'',''],
	['PAGE','53201',jdecode('Schamanismus'),jdecode(''),'/53201/index.html','true',[ 
		['PAGE','54301',jdecode('Inhalte'),jdecode(''),'/53201/54301.html','true',[],'',''],
		['PAGE','54901',jdecode('Pers%C3%B6nlich'),jdecode(''),'/53201/54901.html','true',[],'',''],
		['PAGE','56801',jdecode('Die+Behandlung'),jdecode(''),'/53201/56801.html','true',[],'',''],
		['PAGE','57501',jdecode('Das+Bewusstsein'),jdecode(''),'/53201/57501.html','true',[],'',''],
		['PAGE','59501',jdecode('Spirits'),jdecode(''),'/53201/59501.html','true',[],'','']
	],'',''],
	['PAGE','65901',jdecode('Suchen+und+finden'),jdecode(''),'/65901.html','true',[],'',''],
	['PAGE','1471',jdecode('Seminare'),jdecode(''),'/1471.html','true',[],'',''],
	['PAGE','39287',jdecode('Kursinhalte'),jdecode(''),'/39287.html','true',[],'',''],
	['PAGE','41203',jdecode('Erfahrungen'),jdecode(''),'/41203.html','true',[],'',''],
	['PAGE','1525',jdecode('Theater'),jdecode(''),'/1525.html','true',[],'',''],
	['PAGE','1552',jdecode('Gesundheitspraxis'),jdecode(''),'/1552.html','true',[],'',''],
	['PAGE','22077',jdecode('Schatzkiste'),jdecode(''),'/22077.html','true',[],'',''],
	['PAGE','51901',jdecode('ZeitSchrift'),jdecode(''),'/51901.html','true',[],'',''],
	['PAGE','53501',jdecode('Impressum'),jdecode(''),'/53501.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Seasons_spring';
theSitetree.paletteFamily='F5E7EE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21090';
theSitetree.graphicsetId='13189';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='F5E7EE';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Seasons_spring',
				paletteFamily: 	'F5E7EE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21090',
				graphicsetId: 	'13189',
				contentColor: 	'2E2E2E',
				contentBGColor: 'F5E7EE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53201',
internalId:  '',
customField: '20100323-101649'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '37326',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20100323-132901'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1008',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1936']={
webappId:    '7008',
documentId:  '39287',
internalId:  '1936',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54901',
internalId:  '',
customField: '20100323-102513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1008',
internalId:  '',
customField: '20100302-125806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1363',
internalId:  '',
customField: '20100120-130757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1390',
internalId:  '',
customField: '20090223-113020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51901',
internalId:  '',
customField: '20100420-120451'
};
webappMappings['1501']=webappMappings['1501-1285906']={
webappId:    '1501',
documentId:  '1008',
internalId:  '1285906',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22077',
internalId:  '',
customField: '20100119-152500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1417',
internalId:  '',
customField: '20100505-141631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37326',
internalId:  '',
customField: '20100505-141719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1471',
internalId:  '',
customField: '20100119-142215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39287',
internalId:  '',
customField: '20100419-103620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41203',
internalId:  '',
customField: '20090324-145244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1525',
internalId:  '',
customField: '20091124-175450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1552',
internalId:  '',
customField: '20081201-121429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53501',
internalId:  '',
customField: '20100126-161617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56801',
internalId:  '',
customField: '20100302-161706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57501',
internalId:  '',
customField: '20100323-132816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59501',
internalId:  '',
customField: '20100420-112258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65901',
internalId:  '',
customField: '20100508-142906'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '65901',
internalId:  'search',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INX22T';
var companyName   = 'CHOLERE+-+Begegnung%2C+Kultur%2C+Gesundheit';
var htmlTitle	  = '';
var metaKeywords  = 'CHOLERE%2C+Paul+Thomet%2C+Renate+Urfer%2C+Schamanismus%2C+Krafttiere%2C+Schamanen%2C+schamanisch%2C+Schamanenschule%2C+Seelenr%C3%BCckholung%2C+Extraktion%2C+Gesundheitspraxis%2C+Regie%2C+Seminare%2C++Reiki%2C+Reikilehrerin%2C+Theater%2C+Regisseur%2C++Lebensberatung%2C+Energiearbeit%2C++Familienstellen%2C+Systemstellen%2C+Geistheilung%2C+spirituelle+Lebensberatung%2C+Spiritualit%C3%A4t';
var metaContents  = 'Willkommen+in+der+Cholere%2C+dem++idyllischen+Seminarort+f%C3%BCr+Schamanismus+und+individuelle+Lebensgestaltung.+Willkommen+in+der+Gesundheitspraxis+Cholere.';
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();
};
