/* [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','4518',jdecode('HOME'),jdecode(''), jdecode('%2F4518.html'), 'true',[],'',''],
	['PAGE','96801',jdecode('NEWS'),jdecode(''), jdecode('%2F96801.html'), 'true',[],'',''],
	['PAGE','217801',jdecode('RACES'),jdecode(''), jdecode('%2F217801.html'), 'true',[],'',''],
	['PAGE','217901',jdecode('SEASON'),jdecode(''), jdecode('%2F217901.html'), 'true',[],'',''],
	['PAGE','9551',jdecode('DRIVERS'),jdecode(''), jdecode('%2F9551%2Findex.html'), 'true',[ 
		['PAGE','45803',jdecode('LEVIN'),jdecode(''), jdecode('%2F9551%2F45803.html'), 'true',[],'',''],
		['PAGE','4602',jdecode('SEVERIN'),jdecode(''), jdecode('%2F9551%2F4602.html'), 'true',[],'',''],
		['PAGE','4629',jdecode('JESINA'),jdecode(''), jdecode('%2F9551%2F4629.html'), 'true',[],'','']
	],'',''],
	['PAGE','9632',jdecode('GALLERY'),jdecode(''), jdecode('%2F9632.html'), 'true',[],'',''],
	['PAGE','42518',jdecode('PARTNER'),jdecode(''), jdecode('%2F42518.html'), 'true',[],'',''],
	['PAGE','156301',jdecode('MEDIA'),jdecode(''), jdecode('%2F156301%2Findex.html'), 'true',[ 
		['PAGE','227801',jdecode('PHOTOS'),jdecode(''), jdecode('%2F156301%2F227801.html'), 'true',[],'','']
	],'',''],
	['PAGE','34352',jdecode('LINKS'),jdecode(''), jdecode('%2F34352%2Findex.html'), 'true',[ 
		['PAGE','4945',jdecode('ENTRYLIST'),jdecode(''), jdecode('%2F34352%2F4945.html'), 'false',[],'','']
	],'',''],
	['PAGE','59764',jdecode('ARCHIVE'),jdecode(''), jdecode('%2F59764%2Findex.html'), 'true',[ 
		['PAGE','218601',jdecode('News+2010'),jdecode(''), jdecode('%2F59764%2F218601.html'), 'true',[],'',''],
		['PAGE','185801',jdecode('Reports+2010'),jdecode(''), jdecode('%2F59764%2F185801.html'), 'true',[],'',''],
		['PAGE','183601',jdecode('Dates+2010'),jdecode(''), jdecode('%2F59764%2F183601.html'), 'true',[],'',''],
		['PAGE','189601',jdecode('News+2009'),jdecode(''), jdecode('%2F59764%2F189601.html'), 'true',[],'',''],
		['PAGE','139001',jdecode('Berichte+2009'),jdecode(''), jdecode('%2F59764%2F139001.html'), 'true',[],'',''],
		['PAGE','135401',jdecode('Dates+2009'),jdecode(''), jdecode('%2F59764%2F135401.html'), 'true',[],'',''],
		['PAGE','139022',jdecode('Ranking+2009'),jdecode(''), jdecode('%2F59764%2F139022.html'), 'true',[],'',''],
		['PAGE','135422',jdecode('News+2008'),jdecode(''), jdecode('%2F59764%2F135422.html'), 'true',[],'',''],
		['PAGE','96201',jdecode('Rennberichte+2008'),jdecode(''), jdecode('%2F59764%2F96201.html'), 'true',[],'',''],
		['PAGE','88801',jdecode('Termine+2008'),jdecode(''), jdecode('%2F59764%2F88801.html'), 'true',[],'',''],
		['PAGE','96222',jdecode('Ranglisten+2008'),jdecode(''), jdecode('%2F59764%2F96222.html'), 'true',[],'',''],
		['PAGE','9524',jdecode('News+2007'),jdecode(''), jdecode('%2F59764%2F9524.html'), 'true',[],'',''],
		['PAGE','59755',jdecode('Rennberichte+2007'),jdecode(''), jdecode('%2F59764%2F59755.html'), 'true',[],'',''],
		['PAGE','65377',jdecode('Ranglisten+2007'),jdecode(''), jdecode('%2F59764%2F65377.html'), 'true',[],'',''],
		['PAGE','41043',jdecode('Rennberichte+2006'),jdecode(''), jdecode('%2F59764%2F41043.html'), 'true',[],'',''],
		['PAGE','40418',jdecode('Rennberichte+2005'),jdecode(''), jdecode('%2F59764%2F40418.html'), 'true',[],'','']
	],'',''],
	['PAGE','4656',jdecode('CONTACT'),jdecode(''), jdecode('%2F4656%2Findex.html'), 'true',[ 
		['PAGE','32488',jdecode('Kontakt+%28Form+followup+page%29'),jdecode(''), jdecode('%2F4656%2F32488.html'), 'false',[],'','']
	],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='000066';
theSitetree.keyvisualId='1344';
theSitetree.keyvisualName='sektflasche.jpg';
theSitetree.fontsetId='235';
theSitetree.graphicsetId='292';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Startup',
				paletteFamily: 	'000066',
				keyvisualId: 	'1344',
				keyvisualName: 	'sektflasche.jpg',
				fontsetId: 		'235',
				graphicsetId: 	'292',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000066',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4518',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139001',
internalId:  '',
customField: '20091204-092459'
};
webappMappings['1009']=webappMappings['1009-5929233']={
webappId:    '1009',
documentId:  '32488',
internalId:  '5929233',
customField: 'isFollowupPage:true;documentId:4656;'
};
webappMappings['1501']=webappMappings['1501-783204']={
webappId:    '1501',
documentId:  '4518',
internalId:  '783204',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-21']={
webappId:    '7008',
documentId:  '4656',
internalId:  '21',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4518',
internalId:  '',
customField: '20111113-192429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96801',
internalId:  '',
customField: '20111224-160521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139022',
internalId:  '',
customField: '20091204-092749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135401',
internalId:  '',
customField: '20090701-202444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9551',
internalId:  '',
customField: '20110114-124332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45803',
internalId:  '',
customField: '20110926-182727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4602',
internalId:  '',
customField: '20110926-182809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4629',
internalId:  '',
customField: '20110114-120918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9632',
internalId:  '',
customField: '20111209-161826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42518',
internalId:  '',
customField: '20110405-194935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34352',
internalId:  '',
customField: '20110211-154815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59764',
internalId:  '',
customField: '20110114-123200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135422',
internalId:  '',
customField: '20081203-170918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96222',
internalId:  '',
customField: '20081025-085135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96201',
internalId:  '',
customField: '20110116-195010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88801',
internalId:  '',
customField: '20080414-114351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9524',
internalId:  '',
customField: '20080102-145001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59755',
internalId:  '',
customField: '20071215-181843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65377',
internalId:  '',
customField: '20071119-101412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41043',
internalId:  '',
customField: '20080107-142906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40418',
internalId:  '',
customField: '20070612-171937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4656',
internalId:  '',
customField: '20110114-123224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32488',
internalId:  '',
customField: '20051024-225026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4945',
internalId:  '',
customField: '20051018-162911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '227801',
internalId:  '',
customField: '20111012-214241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156301',
internalId:  '',
customField: '20111113-181612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183601',
internalId:  '',
customField: '20100425-181028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185801',
internalId:  '',
customField: '20101026-211048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217801',
internalId:  '',
customField: '20111025-104651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217901',
internalId:  '',
customField: '20111012-214251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '218601',
internalId:  '',
customField: '20110114-120021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189601',
internalId:  '',
customField: '20100102-195741'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXXB0';
var companyName   = 'AMWEG+RACING';
var htmlTitle	  = '';
var metaKeywords  = 'Levin+Severin+Jesina+Amweg+Kart+ROK+Cup+ASS+Schweizermeisterschaft+Swiss+Kart++Resultate+Fahrer+lista+office+LO+Tony+Vortex+LKT+KF3+verkaufen+Material+Formel+Renault+2.0+Fredy+Lienhard+Nachwuchstalent+Talent+Motorsport';
var metaContents  = 'Levin+und+Severin+Amweg%2C+Kart+Racing+Team%2C+fahren+Tony+Chassis+und+Vortex++Motoren+und+bestreiten+die+Schweizermeisterschaft+%28SM%29+und+den+LO+lista+office+ROK+Cup.';
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();
};

