/* [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','4596',jdecode('Home'),jdecode(''),'/4596.html','true',[],'',''],
	['PAGE','52195',jdecode('Mein+Angebot'),jdecode(''),'/52195.html','true',[],'',''],
	['PAGE','69814',jdecode('Seminare'),jdecode(''),'/69814/index.html','true',[ 
		['PAGE','73014',jdecode('NEU%3A+Geistheilungsseminar+%28Folgeseite%29'),jdecode(''),'/69814/73014.html','false',[],'','']
	],'',''],
	['PAGE','23295',jdecode('CD+Chakrameditation'),jdecode(''),'/23295/index.html','true',[ 
		['PAGE','57615',jdecode('Aktuelles%2FHeilhypnose-CD+%28Folgeseite%29'),jdecode(''),'/23295/57615.html','false',[],'','']
	],'',''],
	['PAGE','5701',jdecode('Portrait'),jdecode(''),'/5701.html','true',[],'',''],
	['PAGE','4653',jdecode('Kontakt%2FTermine'),jdecode(''),'/4653/index.html','true',[ 
		['PAGE','49203',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/4653/49203.html','false',[],'','']
	],'',''],
	['PAGE','22335',jdecode('G%C3%A4stebuch'),jdecode(''),'/22335/index.html','true',[ 
		['PAGE','22336',jdecode('Eintr%C3%A4ge'),jdecode(''),'/22335/22336.html','false',[],'','']
	],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='315881';
theSitetree.keyvisualId='2287';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='367';
theSitetree.graphicsetId='419';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='315881';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'315881',
				keyvisualId: 	'2287',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'367',
				graphicsetId: 	'419',
				contentColor: 	'FFFFFF',
				contentBGColor: '315881',
				a_color: 		'315881',
				b_color: 		'2985B5',
				c_color: 		'3366CC',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4596',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-22335ahp010in22ty']={
webappId:    '1002',
documentId:  '22335',
internalId:  '22335ahp010in22ty',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4653',
internalId:  '',
customField: '20091117-141104'
};
webappMappings['7008']=webappMappings['7008-1163']={
webappId:    '7008',
documentId:  '4653',
internalId:  '1163',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20100709-212425'
};
webappMappings['7008']=webappMappings['7008-1164']={
webappId:    '7008',
documentId:  '23295',
internalId:  '1164',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23295',
internalId:  '',
customField: '20091116-221544'
};
webappMappings['7008']=webappMappings['7008-1165']={
webappId:    '7008',
documentId:  '69814',
internalId:  '1165',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69814',
internalId:  '',
customField: '20100208-224847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4596',
internalId:  '',
customField: '20100727-225707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52195',
internalId:  '',
customField: '20100727-220605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73014',
internalId:  '',
customField: '20070109-135450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57615',
internalId:  '',
customField: '20060831-234647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49203',
internalId:  '',
customField: '20060115-163843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22335',
internalId:  '',
customField: '20050306-235500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22336',
internalId:  '',
customField: '20061231-113900'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010IN22TY';
var companyName   = 'Dille+Hill%2C+Praxis+f%C3%BCr+Mediale+Geistheilung';
var htmlTitle	  = 'Dille+Hill';
var metaKeywords  = 'Geistheilung%2C+R%EF%BF%BDckf%EF%BF%BDhrung%2CSVNH-gepr%EF%BF%BDft+in+geistigem+Heilen%2C+Clearing%2C+spirituelle+Hausreinigung%2C+Journey+nach+Brandon+Bays%2C+Chakra-Heilreisen%2C+Chakra-Ausgleich%2C+Chakra-Reinigung%2C+Aura-Reinigung%2C+Dille+Hill%2C+Dilles+Praxis%2C+Reinkarnation%2C+Chakra%2C+Aura%2C+mediale+Beratung%2C+Medium%2C+Jenseitskontakt%2C+Seminare+mediale+Geistheilung%2CCQM';
var metaContents  = 'Geistheilung%2C+R%EF%BF%BDckf%EF%BF%BDhrung%2CSVNH-gepr%EF%BF%BDft+in+geistigem+Heilen%2C+Clearing%2C+spirituelle+Hausreinigung%2C+Journey+nach+Brandon+Bays%2C+Chakra-Heilreisen%2C+Chakra-Ausgleich%2C+Chakra-Reinigung%2C+Aura-Reinigung%2C+Dille+Hill%2C+Dilles+Praxis%2C+Reinkarnation%2C+Chakra%2C+Aura%2C+mediale+Beratung%2C+Medium%2C+Jenseitskontakt%2C+Seminare+mediale+Geistheilung%2C+CQM';
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();
};
