/* [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','601',jdecode('Raymond+%2B+Barbara+Klaus'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','51101',jdecode('News'),jdecode(''), jdecode('%2F51101.html'), 'true',[],'',''],
	['PAGE','652',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F652%2Findex.html'), 'true',[ 
		['PAGE','15301',jdecode('Behandlungsr%C3%A4ume'),jdecode(''), jdecode('%2F652%2F15301.html'), 'true',[],'','']
	],'',''],
	['PAGE','19701',jdecode('Geistheilung'),jdecode(''), jdecode('%2F19701%2Findex.html'), 'true',[ 
		['PAGE','19722',jdecode('Fernheilung'),jdecode(''), jdecode('%2F19701%2F19722.html'), 'true',[],'',''],
		['PAGE','19401',jdecode('Beratung'),jdecode(''), jdecode('%2F19701%2F19401.html'), 'true',[],'','']
	],'',''],
	['PAGE','59030',jdecode('Die+spirituelle+Aufrichtung'),jdecode(''), jdecode('%2F59030.html'), 'true',[],'',''],
	['PAGE','44601',jdecode('Ausbildung+%2F+Seminare'),jdecode(''), jdecode('%2F44601.html'), 'true',[],'',''],
	['PAGE','20101',jdecode('Zirkel+Geistheilung'),jdecode(''), jdecode('%2F20101.html'), 'true',[],'',''],
	['PAGE','736',jdecode('Mediales+Portr%C3%A4tieren'),jdecode(''), jdecode('%2F736%2Findex.html'), 'true',[ 
		['PAGE','15322',jdecode('Galerie'),jdecode(''), jdecode('%2F736%2F15322.html'), 'true',[],'','']
	],'',''],
	['PAGE','28301',jdecode('Mediale+Abende'),jdecode(''), jdecode('%2F28301.html'), 'true',[],'',''],
	['PAGE','59009',jdecode('Aura+Soma'),jdecode(''), jdecode('%2F59009.html'), 'true',[],'',''],
	['PAGE','20122',jdecode('Links'),jdecode(''), jdecode('%2F20122.html'), 'true',[],'',''],
	['PAGE','23806',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F23806%2Findex.html'), 'true',[ 
		['PAGE','23801',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F23806%2F23801.html'), 'true',[],'','']
	],'',''],
	['PAGE','49901',jdecode('Allgemeine+Gesch%C3%A4ftsbedingungen'),jdecode(''), jdecode('%2F49901.html'), 'true',[],'',''],
	['PAGE','24501',jdecode('G%C3%BCmligen+20.+Februar+2012'),jdecode(''), jdecode('%2F24501.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='FDBC3F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10896';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Alpha',
				paletteFamily: 	'FDBC3F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10896',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FDBC3F',
				e_color: 		'FDBC3F',
				f_color: 		'FDBC3F',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '24501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-23806ahopt0inezx2']={
webappId:    '1002',
documentId:  '23806',
internalId:  '23806ahopt0inezx2',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20110322-135531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20110831-102032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20080904-152340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19722',
internalId:  '',
customField: '20080609-202150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20080609-202359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15322',
internalId:  '',
customField: '20110322-160719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20080609-202424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20110322-155443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20120222-213000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44601',
internalId:  '',
customField: '20111206-154710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20111207-090419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20122',
internalId:  '',
customField: '20110124-154805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23806',
internalId:  '',
customField: '20080609-201051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20080609-201051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24501',
internalId:  '',
customField: '20101005-130005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49901',
internalId:  '',
customField: '20091211-094952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51101',
internalId:  '',
customField: '20111207-090035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59009',
internalId:  '',
customField: '20110322-150910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59030',
internalId:  '',
customField: '20111102-104329'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0INEZX2';
var companyName   = 'Der+Kanal';
var htmlTitle	  = 'derkanal+%2F+geistiges+spirituelles+Heilen+%2F+Mediales+Portr%C3%A4tieren+Barbara+Klaus+Raymond+Klaus';
var metaKeywords  = 'Geistheilung%2C+Geistheiler%2CSpirituelles+Heilen%2C+Heilenergie%2C+Meditation%2C+Chakra%2C+Mediales+Portr%C3%A4tieren%2C+Mediales+Zeichnen%2C+Beratung%2C+Raymond+E.+Klaus%2C+Raymond+Klaus%2C+Barbara+Klaus%2C+Barbara+Klaus-Lis%2C+Fernheilung%2C+Fernbehandlung%2C+Lichtarbeit%2C+Energiearbeit%2C+Energietische+Heilbehandlung%2C+Spirituelle+Lebensberatung%2C+Aura+Soma%2C+gesitige+Aufrichtung%2C+Wirbels%C3%A4ulenbegradigung%2C+spirituelle+Aufrichtung.';
var metaContents  = 'Geistheilung%2C+Geistheiler%2C+Spirituelles+Heilen%2C+Heilenergie%2C+Meditation%2C+Chakra%2C+Mediales+Portr%C3%A4tieren%2C+Mediales+Zeichnen%2C+Beratung%2C+Raymond+E.+Klaus%2C+Raymond+Klaus%2C+Barbara+Klaus%2C+Barbara+Klaus-Lis%2C+Fernheilung%2C+Fernhilfe%2C+Fernbehandlung%2C+Lichtarbeit%2C+Energiearbeit%2C+Energietische+Heilbehandlung%2C+Spirituelle+Lebensberatung.+Aura+Soma%2C+gesitige+Aufrichtung%2C+Wirbels%C3%A4ulenbegradigung%2C+spirituelle+Aufrichtung.';
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();
};

