/* [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','4521',jdecode('Home'),jdecode(''), jdecode('%2F4521.html'), 'true',[],'',''],
	['PAGE','15101',jdecode('Meine+Philosophie'),jdecode(''), jdecode('%2F15101.html'), 'true',[],'',''],
	['PAGE','22937',jdecode('Beratung+und+Healing'),jdecode(''), jdecode('%2F22937.html'), 'true',[],'',''],
	['PAGE','22883',jdecode('Geistheilung'),jdecode(''), jdecode('%2F22883.html'), 'true',[],'',''],
	['PAGE','15236',jdecode('Fernheilungen'),jdecode(''), jdecode('%2F15236.html'), 'true',[],'',''],
	['PAGE','22802',jdecode('Tierheilung'),jdecode(''), jdecode('%2F22802.html'), 'true',[],'',''],
	['PAGE','22910',jdecode('Reinigung+von+Wohnungen+und+H%C3%A4user'),jdecode(''), jdecode('%2F22910.html'), 'true',[],'',''],
	['PAGE','14401',jdecode('Workshops-Selbstheilung'),jdecode(''), jdecode('%2F14401.html'), 'true',[],'',''],
	['PAGE','41937',jdecode('Diverse-Massagenkurse-Meditation'),jdecode(''), jdecode('%2F41937.html'), 'true',[],'',''],
	['PAGE','22829',jdecode('Ganzk%C3%B6rper-Energiemassage'),jdecode(''), jdecode('%2F22829.html'), 'true',[],'',''],
	['PAGE','22856',jdecode('Indian+Head+Massage'),jdecode(''), jdecode('%2F22856.html'), 'true',[],'',''],
	['PAGE','36667',jdecode('Hot+Stone-Massage'),jdecode(''), jdecode('%2F36667.html'), 'true',[],'',''],
	['PAGE','43525',jdecode('Partnermassage'),jdecode(''), jdecode('%2F43525.html'), 'true',[],'',''],
	['PAGE','15209',jdecode('Kontakt'),jdecode(''), jdecode('%2F15209.html'), 'true',[],'',''],
	['PAGE','25676',jdecode('Anfahrt'),jdecode(''), jdecode('%2F25676.html'), 'true',[],'',''],
	['PAGE','24546',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F24546%2Findex.html'), 'true',[ 
		['PAGE','24547',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F24546%2F24547.html'), 'false',[],'','']
	],'',''],
	['PAGE','25940',jdecode('Routenplan'),jdecode(''), jdecode('%2F25940.html'), 'true',[],'',''],
	['PAGE','41221',jdecode('Links'),jdecode(''), jdecode('%2F41221.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='FF9F21';
theSitetree.keyvisualId='2245';
theSitetree.keyvisualName='love6.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='418';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FF9F21';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'FF9F21',
				keyvisualId: 	'2245',
				keyvisualName: 	'love6.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'418',
				contentColor: 	'000000',
				contentBGColor: 'FF9F21',
				a_color: 		'FF9F21',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				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:  '4521',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20110925-164234'
};
webappMappings['1002']=webappMappings['1002-24546ABW0X0INXZFT']={
webappId:    '1002',
documentId:  '24546',
internalId:  '24546ABW0X0INXZFT',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '25676',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '25940',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4521',
internalId:  '',
customField: '20110925-201828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15209',
internalId:  '',
customField: '20100128-144500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43525',
internalId:  '',
customField: '20100806-230409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20100128-142257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22937',
internalId:  '',
customField: '20101105-232328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22883',
internalId:  '',
customField: '20100128-142633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15236',
internalId:  '',
customField: '20100128-143835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22802',
internalId:  '',
customField: '20100128-143658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22910',
internalId:  '',
customField: '20100128-144128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41937',
internalId:  '',
customField: '20110925-200450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22829',
internalId:  '',
customField: '20100128-141855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22856',
internalId:  '',
customField: '20100128-141932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36667',
internalId:  '',
customField: '20100128-144330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25676',
internalId:  '',
customField: '20100308-105218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24546',
internalId:  '',
customField: '20050617-090939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24547',
internalId:  '',
customField: '20050616-182238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25940',
internalId:  '',
customField: '20090202-135957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41221',
internalId:  '',
customField: '20110730-161506'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXZFT';
var companyName   = 'oase+der+ruhe';
var htmlTitle	  = 'www.oase-der-ruhe.ch';
var metaKeywords  = '';
var metaContents  = 'parapsychologe-Lebensberatung-Selbstheilung-Geistheilung-Fernheilung-Tierheilung-Seelenmassage.Indian+Head+massage-Reinigung+von+Wohnungen+und+H%C3%A4usern.Laufend+neue+Kurse';
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();
};

