/* [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','4529',jdecode('Home'),jdecode(''), jdecode('%2F4529.html'), 'true',[],'',''],
	['PAGE','4586',jdecode('About+me'),jdecode(''), jdecode('%2F4586.html'), 'true',[],'',''],
	['PAGE','161112',jdecode('NEWSBLOG'),jdecode(''), jdecode('%2F161112%2Findex.html'), 'true',[ 
		['PAGE','163212',jdecode('Saisonr%C3%BCckblick+2010'),jdecode(''), jdecode('%2F161112%2F163212.html'), 'true',[],'','']
	],'',''],
	['PAGE','122036',jdecode('News'),jdecode(''), jdecode('%2F122036.html'), 'false',[],'',''],
	['PAGE','5143',jdecode('Rennkalender'),jdecode(''), jdecode('%2F5143.html'), 'true',[],'',''],
	['PAGE','120049',jdecode('Team+'),jdecode(''), jdecode('%2F120049.html'), 'true',[],'',''],
	['PAGE','25426',jdecode('Ausr%C3%BCstung'),jdecode(''), jdecode('%2F25426.html'), 'true',[],'',''],
	['PAGE','150401',jdecode('Bilder'),jdecode(''), jdecode('%2F150401.html'), 'true',[],'',''],
	['PAGE','167312',jdecode('Resultate'),jdecode(''), jdecode('%2F167312%2Findex.html'), 'true',[ 
		['PAGE','149922',jdecode('2010'),jdecode(''), jdecode('%2F167312%2F149922.html'), 'true',[],'',''],
		['PAGE','122203',jdecode('2009'),jdecode(''), jdecode('%2F167312%2F122203.html'), 'true',[],'',''],
		['PAGE','120137',jdecode('2008'),jdecode(''), jdecode('%2F167312%2F120137.html'), 'true',[],'',''],
		['PAGE','115080',jdecode('2007'),jdecode(''), jdecode('%2F167312%2F115080.html'), 'true',[],'',''],
		['PAGE','5116',jdecode('2006'),jdecode(''), jdecode('%2F167312%2F5116.html'), 'true',[],'',''],
		['PAGE','66792',jdecode('2005'),jdecode(''), jdecode('%2F167312%2F66792.html'), 'true',[],'',''],
		['PAGE','7317',jdecode('2004'),jdecode(''), jdecode('%2F167312%2F7317.html'), 'true',[],'',''],
		['PAGE','7290',jdecode('2003'),jdecode(''), jdecode('%2F167312%2F7290.html'), 'true',[],'',''],
		['PAGE','8535',jdecode('2002'),jdecode(''), jdecode('%2F167312%2F8535.html'), 'true',[],'','']
	],'',''],
	['PAGE','5197',jdecode('Links'),jdecode(''), jdecode('%2F5197.html'), 'true',[],'',''],
	['PAGE','49014',jdecode('G%C3%B6nnervereinigung'),jdecode(''), jdecode('%2F49014.html'), 'true',[],'',''],
	['PAGE','88669',jdecode('Sponsoren'),jdecode(''), jdecode('%2F88669.html'), 'true',[],'',''],
	['PAGE','149943',jdecode('Kontakt'),jdecode(''), jdecode('%2F149943.html'), 'true',[],'',''],
	['PAGE','164412',jdecode('Juice+PLUS%2B%C2%AE'),jdecode(''), jdecode('%2F164412%2Findex.html'), 'true',[ 
		['PAGE','164712',jdecode('Informationen'),jdecode(''), jdecode('%2F164412%2F164712.html'), 'true',[],'',''],
		['PAGE','165412',jdecode('Studien'),jdecode(''), jdecode('%2F164412%2F165412.html'), 'true',[],'',''],
		['PAGE','165612',jdecode('Kontakt'),jdecode(''), jdecode('%2F164412%2F165612.html'), 'true',[],'',''],
		['PAGE','166112',jdecode('Shop'),jdecode(''), jdecode('%2F164412%2F166112.html'), 'true',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Draft';
theSitetree.paletteFamily='2D50A1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10399';
theSitetree.graphicsetId='10611';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='2D50A1';
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: 			'Draft',
				paletteFamily: 	'2D50A1',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10399',
				graphicsetId: 	'10611',
				contentColor: 	'FFFFFF',
				contentBGColor: '2D50A1',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D09868',
				e_color: 		'9E9E9F',
				f_color: 		'051E56',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4529',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4586',
internalId:  '',
customField: '20101225-102928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161112',
internalId:  '',
customField: '20100829-203944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4529',
internalId:  '',
customField: '20110613-182641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122036',
internalId:  '',
customField: '20100829-204005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5143',
internalId:  '',
customField: '20110613-182532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120049',
internalId:  '',
customField: '20101124-200307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25426',
internalId:  '',
customField: '20110412-162928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163212',
internalId:  '',
customField: '20101124-200249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164412',
internalId:  '',
customField: '20101224-223800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150401',
internalId:  '',
customField: '20110412-165416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120137',
internalId:  '',
customField: '20080930-162115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115080',
internalId:  '',
customField: '20070923-184628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5116',
internalId:  '',
customField: '20061021-184118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66792',
internalId:  '',
customField: '20051210-180059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7317',
internalId:  '',
customField: '20041220-180536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7290',
internalId:  '',
customField: '20041220-180519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8535',
internalId:  '',
customField: '20041220-180513'
};
webappMappings['7008']=webappMappings['7008-9223']={
webappId:    '7008',
documentId:  '149943',
internalId:  '9223',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5197',
internalId:  '',
customField: '20101129-143020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49014',
internalId:  '',
customField: '20080120-200512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88669',
internalId:  '',
customField: '20101129-143542'
};
webappMappings['7050']=webappMappings['7050-1584']={
webappId:    '7050',
documentId:  '161112',
internalId:  '1584',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122203',
internalId:  '',
customField: '20090913-182511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149922',
internalId:  '',
customField: '20101103-204012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149943',
internalId:  '',
customField: '20100401-123606'
};
webappMappings['7060']=webappMappings['7060-d76fface54cff76b922d20078b191762']={
webappId:    '7060',
documentId:  '150401',
internalId:  'd76fface54cff76b922d20078b191762',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164712',
internalId:  '',
customField: '20101224-221315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165412',
internalId:  '',
customField: '20101224-222404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165612',
internalId:  '',
customField: '20101224-223845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166112',
internalId:  '',
customField: '20101225-102618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167312',
internalId:  '',
customField: '20110518-190518'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXXT2';
var companyName   = 'marcolippuner.ch';
var htmlTitle	  = '';
var metaKeywords  = 'Marco+Lippuner+marcolippuner+grabs+Radrennfahrer+LRV+++Schweizermeister+Zeitfahren+Swiss-Cycling';
var metaContents  = 'Pers%C3%B6nliche+Homepage+von+Marco+Lippuner-Schweizer+Radrennfahrer.+';
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();
};

