/* [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','4556',jdecode('Home'),jdecode(''),'/4556.html','true',[],'',''],
	['PAGE','5103',jdecode('Wer+sind+wir%3F'),jdecode(''),'/5103/index.html','true',[ 
		['PAGE','5157',jdecode('Unser+Leitbild'),jdecode(''),'/5103/5157.html','true',[],'',''],
		['PAGE','5211',jdecode('So+arbeiten+wir'),jdecode(''),'/5103/5211.html','true',[],'','']
	],'',''],
	['PAGE','4613',jdecode('Dienstleistungen'),jdecode(''),'/4613/index.html','true',[ 
		['PAGE','4640',jdecode('Trainingsberatung'),jdecode(''),'/4613/4640.html','true',[],'',''],
		['PAGE','51701',jdecode('Lehr-+und+Referentent%C3%A4tigkeit'),jdecode(''),'/4613/51701.html','true',[],'',''],
		['PAGE','5265',jdecode('Aquatic-Fitness'),jdecode(''),'/4613/5265.html','true',[],'',''],
		['PAGE','39103',jdecode('Nordic+Walking'),jdecode(''),'/4613/39103.html','true',[],'',''],
		['PAGE','5292',jdecode('Ern%C3%A4hrungsCoaching'),jdecode(''),'/4613/5292.html','true',[],'',''],
		['PAGE','4667',jdecode('Gesundheitscoaching'),jdecode(''),'/4613/4667.html','true',[],'',''],
		['PAGE','4694',jdecode('K%C3%B6rperkomposition'),jdecode(''),'/4613/4694.html','true',[],'','']
	],'',''],
	['PAGE','5319',jdecode('Partner'),jdecode(''),'/5319.html','true',[],'',''],
	['PAGE','22702',jdecode('Sie+haben+eine+Frage%3F'),jdecode(''),'/22702.html','true',[],'',''],
	['PAGE','27901',jdecode('Tipps+und+Tricks'),jdecode(''),'/27901/index.html','true',[ 
		['PAGE','34705',jdecode('Ern%C3%A4hrung'),jdecode(''),'/27901/34705.html','true',[],'',''],
		['PAGE','34732',jdecode('Timing'),jdecode(''),'/27901/34732.html','true',[],'',''],
		['PAGE','34759',jdecode('Wellness'),jdecode(''),'/27901/34759.html','true',[],'','']
	],'',''],
	['PAGE','27202',jdecode('G%C3%A4stebuch'),jdecode(''),'/27202/index.html','true',[ 
		['PAGE','27203',jdecode('Eintr%C3%A4ge'),jdecode(''),'/27202/27203.html','false',[],'','']
	],'',''],
	['PAGE','27302',jdecode('So+finden+Sie+uns%21'),jdecode(''),'/27302.html','true',[],'',''],
	['PAGE','42179',jdecode('Kontakt'),jdecode(''),'/42179/index.html','true',[ 
		['PAGE','42188',jdecode('Adresse%2C+Telefon'),jdecode(''),'/42179/42188.html','true',[],'',''],
		['PAGE','42243',jdecode('So+finden+Sie+uns'),jdecode(''),'/42179/42243.html','true',[],'','']
	],'',''],
	['PAGE','42442',jdecode('Anfahrt'),jdecode(''),'/42442.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='F9C116';
theSitetree.keyvisualId='2450';
theSitetree.keyvisualName='fitness.jpg';
theSitetree.fontsetId='405';
theSitetree.graphicsetId='459';
theSitetree.contentColor='F9C116';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Collage',
				paletteFamily: 	'F9C116',
				keyvisualId: 	'2450',
				keyvisualName: 	'fitness.jpg',
				fontsetId: 		'405',
				graphicsetId: 	'459',
				contentColor: 	'F9C116',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'F9C116',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5103',
internalId:  '',
customField: '20100317-202110'
};
webappMappings['1002']=webappMappings['1002-27202ABW0X0INXVZH']={
webappId:    '1002',
documentId:  '27202',
internalId:  '27202ABW0X0INXVZH',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-2290638']={
webappId:    '1501',
documentId:  '4556',
internalId:  '2290638',
customField: '1501'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '27302',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20070917-131533'
};
webappMappings['7008']=webappMappings['7008-9301']={
webappId:    '7008',
documentId:  '22702',
internalId:  '9301',
customField: 'language:de;country:CH;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '42442',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42179',
internalId:  '',
customField: '20100317-094031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5157',
internalId:  '',
customField: '20070917-104706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27302',
internalId:  '',
customField: '20070909-152746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5211',
internalId:  '',
customField: '20070917-104809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4613',
internalId:  '',
customField: '20070917-130357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4640',
internalId:  '',
customField: '20070917-121422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51701',
internalId:  '',
customField: '20100317-202244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5265',
internalId:  '',
customField: '20100317-203020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39103',
internalId:  '',
customField: '20070917-121750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5292',
internalId:  '',
customField: '20070917-122305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4667',
internalId:  '',
customField: '20070917-130130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4694',
internalId:  '',
customField: '20070917-125905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5319',
internalId:  '',
customField: '20070908-135614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22702',
internalId:  '',
customField: '20041002-204217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20041115-090206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34705',
internalId:  '',
customField: '20041115-092932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34732',
internalId:  '',
customField: '20041115-082811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34759',
internalId:  '',
customField: '20070130-141956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27202',
internalId:  '',
customField: '20041002-201905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27203',
internalId:  '',
customField: '20041002-201906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42188',
internalId:  '',
customField: '20070108-193528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42243',
internalId:  '',
customField: '20070108-193743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42442',
internalId:  '',
customField: '20070909-152807'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXVZH';
var companyName   = 'seg+sport+ern%C3%A4hrung+gesundheit+GmbH+';
var htmlTitle	  = 'Sportberatung+by+seg+sport+ern%C3%A4hrung+gesundheit+GmbH';
var metaKeywords  = 'Sportberatung%2C+Sport%2C+Ern%C3%A4hrung%2C+Gesundheit%2C+Coaching%2C+Fitness%2C+Kondition%2C+Timing%2C+Krafttraining%2C+Ausdauer%2C+Aqua-Fit%2C+Trainingslehre%2C+Anatomie%2C+Conconitest%2C+Trainingsplanung%2C+Trainingssteuerung%2C+Gewichtsreduktion%2C+Dozent%2C+Ern%C3%A4hrungsberatung%2C+Ern%C3%A4hrungscoaching%2C+Umfeldmanagement%2C+Ern%C3%A4htungsstrategie%2C+Peter+Regli%2C+Beratung+im+Sport%2C+Trainingsplanung%2C+differenziertes+Krafttraining%2C+herzfrequenzkontrolliertes+Training%2C+HRCT%2C+Marathonvorbereitung%2C+Personaltraining%2C+Personal-Trainer%2C+Ern%C3%A4hrungsberatung%2C+Ern%C3%A4hrung+und+Sport%2C+Seminare%2C+Workshops%2CAusbildung%2C+Trainerbildung%2C+Trainerausbildung%2C+Athletenbetreuung%2C+Nachwuchs%2C+Nachwuchsleistungssport%2C+Peter+Regli%2C+seg%2C+seg+GmbH%2C+Ausdauertraining%2C+Nordic-Walking%2C+Jogging';
var metaContents  = 'Beratungsunternehmen+f%C3%BCr+ganzheitliche+Leistungsoptimierung+in+Privatwirtschaft+und+Sport.+Peter+Regli+ist+ein+kompetenter+Gespr%C3%A4chspartner+f%C3%BCr+Fragen+aus+Sport%2C+Ern%C3%A4hrung+und+Gesundheit.';
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();
};
