/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('Naturheilkundliche+Therapien'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','28301',jdecode('Blutegeln'),jdecode(''),'/452/28301.html','true',[],'',''],
		['PAGE','47301',jdecode('Phytotherapie'),jdecode(''),'/452/47301.html','true',[],'',''],
		['PAGE','47322',jdecode('Bachbl%C3%BCten+'),jdecode(''),'/452/47322.html','true',[],'',''],
		['PAGE','42201',jdecode('Ern%C3%A4hrung'),jdecode(''),'/452/42201.html','true',[],'',''],
		['PAGE','93401',jdecode('Hydrotherapie'),jdecode(''),'/452/93401.html','true',[],'','']
	],'',''],
	['PAGE','11064',jdecode('Lageplan%2C+Pers%C3%B6nliches%2C+Shop'),jdecode(''),'/11064/index.html','true',[ 
		['PAGE','42501',jdecode('Pers%C3%B6nliches+'),jdecode(''),'/11064/42501.html','true',[],'',''],
		['PAGE','52822',jdecode('hausgemachte+Bachbl%C3%BCten'),jdecode(''),'/11064/52822.html','true',[],'',''],
		['PAGE','53601',jdecode('Gutscheine'),jdecode(''),'/11064/53601.html','true',[],'',''],
		['PAGE','515',jdecode('Kosten+-+Krankenkasssen'),jdecode(''),'/11064/515.html','true',[],'','']
	],'',''],
	['PAGE','60301',jdecode('Fotos%2FFilme'),jdecode(''),'/60301/index.html','true',[ 
		['PAGE','59001',jdecode('Blutegel'),jdecode(''),'/60301/59001.html','true',[],'','']
	],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='FFD375';
theSitetree.keyvisualId='1979';
theSitetree.keyvisualName='masage.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='385';
theSitetree.contentColor='A00000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stylus',
				paletteFamily: 	'FFD375',
				keyvisualId: 	'1979',
				keyvisualName: 	'masage.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'385',
				contentColor: 	'A00000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFD375',
				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:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-ce5d602b267f61f6db188ec7b4a8a852']={
webappId:    '7060',
documentId:  '59001',
internalId:  'ce5d602b267f61f6db188ec7b4a8a852',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-1619']={
webappId:    '7008',
documentId:  '53601',
internalId:  '1619',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20091120-143645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20091126-201809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20091126-201849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47301',
internalId:  '',
customField: '20070919-144944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47322',
internalId:  '',
customField: '20071202-162608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42201',
internalId:  '',
customField: '20080112-123405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11064',
internalId:  '',
customField: '20091126-203005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42501',
internalId:  '',
customField: '20091126-202706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93401',
internalId:  '',
customField: '20091120-151845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52822',
internalId:  '',
customField: '20090516-195238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53601',
internalId:  '',
customField: '20090516-194142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20091126-201710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60301',
internalId:  '',
customField: '20091120-150140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20070919-150154'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0INEL3U';
var companyName   = 'Praxis+f%C3%BCr+Naturheilkunde%2C+Hans+Wenk';
var htmlTitle	  = 'Praxis+fuer+Naturheilkunde';
var metaKeywords  = 'Blutegeln%2C+Naturheilkunde%2C+Natur%2C+Nature%2C+Therapie%2C++natural+Therapie%2C+Massage%2C+massage%2C+Akupressur%2C+Heilpraktiker%2C+Phytotherapie%2C+Kr%C3%A4uter%2C+Heilkr%C3%A4uter%2C+Kurs%2C+Medizin%2CEgel+%2C+rescue+me%2C+rescue%2C+Naturmedizin%2C+Naturheilpraxis%2C+rheuma%2C+Rheuma%2C+schmerzen%2C+Schmerzen%2C+Z%C3%BCrich%2C+Zuerich%2C+Praxis%2C+Depressionen%2C+Burnout%2C+Bluthochdruck%2C+Diabetes%2C+Wellness%2C+Wirbels%C3%A4ulen-Basis-Therapie%2C+Mystik%2C+Okkult%2C+Geheimwissen%2C+Devas%2C+Naturgeister%2C+hom%C3%B6opathie%2C+Hom%C3%B6opathie%2C+afterentz%C3%BCndung%2C++Haemoriden%2C+H%C3%A4morieden%2C+H%C3%A4moriden%2C+H%C3%A4morroiden%2C+Natur%2C+Nat%C3%BCrlich%2C+Wildhaus%2C+Toggenburg%2C+Medizin%2C+Naturmedizin%2C+Medicine%2C+Blutegel%2C+Egel%2C+Blutegeltherapie%2C+Schaub+Kost%2C+Schaubkost%2C+Schaub+Institut%2C+Schaub%2C+Trudi+Thali%2C+FX+Meier%2C+FX+Maier%2C+Bauch%2C+Wampe%2C+Venen%2C+Thrombosen%2C+flacher+Bauch%2C+hartes+Abdomen%2C+Bad+Ragaz%2C+Urdorf%2C+Heilpflanzen%2C+Psychiater%2C+Gespr%C3%A4che%2C+Google%2C+Kr%C3%A4uterkissen%2C+Hanf%2C+A-Bulletin%2C+Lebensmittelpyramiede%2C+Ern%C3%A4hrung%2C+Ern%C3%A4hrungsberatung%2C+Naturheilpraktiker%2C+Wellness%2C+Wohlbefinden%2C+Entspannung%2C+Wenk%2C+Hans%2C+Niklaus%2C+Gutscheine%2C+Geschenkgutscheine%2C+krankenversicherung%2C+Kosmetik%2C+';
var metaContents  = 'Praxis+fuer+Naturheilkunde%2C+Hans+Wenk+dipl.+Heilpraktiker';
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();
};
