/* [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','4437',jdecode('Anfangsseite+DEUTSCH'),jdecode(''),'/4437/index.html','true',[ 
		['PAGE','9347',jdecode('Wir+%C3%BCber+uns+%2F+Team'),jdecode(''),'/4437/9347.html','true',[],'',''],
		['PAGE','9401',jdecode('Therapie'),jdecode(''),'/4437/9401.html','true',[],'',''],
		['PAGE','10064',jdecode('Intensivprogramm+'),jdecode(''),'/4437/10064.html','true',[],'',''],
		['PAGE','10091',jdecode('Speicheltestungen'),jdecode(''),'/4437/10091.html','true',[],'',''],
		['PAGE','25485',jdecode('Produkte-Testungen'),jdecode(''),'/4437/25485.html','true',[],'',''],
		['PAGE','9482',jdecode('Seminare+nach+Dr.+Clark'),jdecode(''),'/4437/9482.html','true',[],'',''],
		['PAGE','9536',jdecode('Produkte'),jdecode(''),'/4437/9536.html','true',[],'',''],
		['PAGE','21416',jdecode('Texte'),jdecode(''),'/4437/21416.html','true',[],'',''],
		['PAGE','22586',jdecode('Krankenkassen'),jdecode(''),'/4437/22586.html','true',[],'',''],
		['PAGE','10386',jdecode('So+finden+Sie+uns'),jdecode(''),'/4437/10386.html','true',[],'',''],
		['PAGE','23492',jdecode('Ihr+Weg+zu+uns'),jdecode(''),'/4437/23492.html','true',[],'',''],
		['PAGE','25729',jdecode('AGB'),jdecode(''),'/4437/25729.html','true',[],'',''],
		['PAGE','25756',jdecode('wichtiger+Hinweis'),jdecode(''),'/4437/25756.html','true',[],'',''],
		['PAGE','30043',jdecode('Links'),jdecode(''),'/4437/30043.html','true',[],'','']
	],'',''],
	['PAGE','28337',jdecode('Home+Page+in+ENGLISH'),jdecode(''),'/28337/index.html','true',[ 
		['PAGE','29643',jdecode('About+us+%2F+Team'),jdecode(''),'/28337/29643.html','true',[],'',''],
		['PAGE','29652',jdecode('Therapies'),jdecode(''),'/28337/29652.html','true',[],'',''],
		['PAGE','29661',jdecode('Intensive+program'),jdecode(''),'/28337/29661.html','true',[],'',''],
		['PAGE','29670',jdecode('Saliva+tests'),jdecode(''),'/28337/29670.html','true',[],'',''],
		['PAGE','29679',jdecode('Products+testing'),jdecode(''),'/28337/29679.html','true',[],'',''],
		['PAGE','29688',jdecode('Seminar+programs'),jdecode(''),'/28337/29688.html','true',[],'',''],
		['PAGE','29697',jdecode('Products'),jdecode(''),'/28337/29697.html','true',[],'',''],
		['PAGE','29706',jdecode('Texts'),jdecode(''),'/28337/29706.html','true',[],'',''],
		['PAGE','29715',jdecode('Health+Insurance'),jdecode(''),'/28337/29715.html','true',[],'',''],
		['PAGE','29733',jdecode('How+to+find+us'),jdecode(''),'/28337/29733.html','true',[],'',''],
		['PAGE','29742',jdecode('Terms+of+Business'),jdecode(''),'/28337/29742.html','true',[],'',''],
		['PAGE','29751',jdecode('Disclaimer'),jdecode(''),'/28337/29751.html','true',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Success';
theSitetree.paletteFamily='336600';
theSitetree.keyvisualId='1652';
theSitetree.keyvisualName='garten.jpg';
theSitetree.fontsetId='263';
theSitetree.graphicsetId='332';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F1F1F1';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Success',
				paletteFamily: 	'336600',
				keyvisualId: 	'1652',
				keyvisualName: 	'garten.jpg',
				fontsetId: 		'263',
				graphicsetId: 	'332',
				contentColor: 	'000000',
				contentBGColor: 'F1F1F1',
				a_color: 		'336600',
				b_color: 		'C80021',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4437',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4437',
internalId:  '',
customField: '20080410-085026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9482',
internalId:  '',
customField: '20100211-101129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9347',
internalId:  '',
customField: '20080521-114500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20070518-093413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10064',
internalId:  '',
customField: '20060917-185533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10091',
internalId:  '',
customField: '20080419-152242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25485',
internalId:  '',
customField: '20060919-220518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9536',
internalId:  '',
customField: '20060130-163929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21416',
internalId:  '',
customField: '20060917-185951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22586',
internalId:  '',
customField: '20050119-225310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10386',
internalId:  '',
customField: '20080217-202026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23492',
internalId:  '',
customField: '20051119-203611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25729',
internalId:  '',
customField: '20080414-204109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25756',
internalId:  '',
customField: '20060130-161156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30043',
internalId:  '',
customField: '20071016-213925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28337',
internalId:  '',
customField: '20080410-085015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29643',
internalId:  '',
customField: '20080521-114542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29652',
internalId:  '',
customField: '20060917-195206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29661',
internalId:  '',
customField: '20060913-192401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29670',
internalId:  '',
customField: '20080626-144832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29679',
internalId:  '',
customField: '20060919-220551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29688',
internalId:  '',
customField: '20100215-163803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29697',
internalId:  '',
customField: '20060913-184739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29706',
internalId:  '',
customField: '20060917-195429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29715',
internalId:  '',
customField: '20060913-184923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29733',
internalId:  '',
customField: '20060913-185652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29742',
internalId:  '',
customField: '20060917-195800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29751',
internalId:  '',
customField: '20060917-195622'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX3CV';
var companyName   = 'Gesundheitspraxis+SanaVital';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
