/* [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','301',jdecode('Willkommen+%2F+%C3%9Cber+mich+%26+Kontakt'),jdecode(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','352',jdecode('Fussreflexzonen-Massagen'),jdecode(''), jdecode('%2F352.html'), 'true',[],'',''],
	['PAGE','35001',jdecode('Klang-Massagen+%26+Gong-Meditationen'),jdecode(''), jdecode('%2F35001.html'), 'true',[],'',''],
	['PAGE','35085',jdecode('Aroma-Massagen'),jdecode(''), jdecode('%2F35085.html'), 'true',[],'',''],
	['PAGE','35043',jdecode('Reiki-Behandlungen+%26+-Seminare'),jdecode(''), jdecode('%2F35043.html'), 'true',[],'',''],
	['PAGE','35064',jdecode('Die+Metamorphische+Methode'),jdecode(''), jdecode('%2F35064.html'), 'true',[],'',''],
	['PAGE','37201',jdecode('R%C3%BCckf%C3%BChrungs-Therapie'),jdecode(''), jdecode('%2F37201.html'), 'true',[],'',''],
	['PAGE','35106',jdecode('Aktuelles+%2F+Termine+%2F+Links'),jdecode(''), jdecode('%2F35106.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Case';
theSitetree.paletteFamily='82C1DC';
theSitetree.keyvisualId='11061';
theSitetree.keyvisualName='kv_11061.jpg';
theSitetree.fontsetId='31938';
theSitetree.graphicsetId='13781';
theSitetree.contentColor='34454C';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2QE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Case',
				paletteFamily: 	'82C1DC',
				keyvisualId: 	'11061',
				keyvisualName: 	'kv_11061.jpg',
				fontsetId: 		'31938',
				graphicsetId: 	'13781',
				contentColor: 	'34454C',
				contentBGColor: 'F6FBFE',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20120112-195916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20120112-193438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37201',
internalId:  '',
customField: '20111215-070239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35043',
internalId:  '',
customField: '20111112-085646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20111214-181637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35106',
internalId:  '',
customField: '20120112-193243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35085',
internalId:  '',
customField: '20111112-085852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35064',
internalId:  '',
customField: '20111112-085748'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INE4WA';
var companyName   = 'Raum+des+EinKlangs++++++++++++++Janine+Rosen++++++++++++++Rheinfelden';
var htmlTitle	  = '';
var metaKeywords  = 'Janine+Rosen%2C+Kelbert%2C+Raum+des+EinKlangs+und+Entspannung%2C+Klangmassage+nach+Peter+Hess%2C+Aromamassage%2C+Reiki+Behandlungen+und+-Seminare+Rheinfelden+Klangschale+Reiki+Rheinfelden+Behandlung+Massage+Klopfakupunktur+Meridian+Energie+Technik+Rheinfelden+Reiki+Seminar+Rheinfelden+Meister+Lehrer+Mikao+Usui+Reiki+Treffen+Rheinfelden+Meditation+Peter+Hess+Geschenk+Gutschein+Wohlbefinden+Energiearbeit+Aargau+Erholung+Entspannung+Reikitreffen+Metamorphische+Methode+Metamorphose+Praenataltherapie+Hausbesuche+Tam-Tam+Gong+Geschenkgutschein+Fussreflexzonenmassage+Fuss+dipl.+Therapeutin+Fussreflex+Fussreflexzonentherapeutin+Stimmgabel+Sonama+Lebensmuster+Mandala+Schwingungen+Hanne+Marquardt+Tonpunktur+Phonophorese+R%C3%BCckf%C3%BChrung+R%C3%BCckf%C3%BChrungstherapie+Reinkarnation+Reinkarnationstherapie+Jan+Erik+Sigdell+';
var metaContents  = 'Janine+Rosen+-+Raum+des+EinKlangs+++++++++++++++++';
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();
};

