/* [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','2801',jdecode('Home'),jdecode(''), jdecode('%2F2801.html'), 'true',[],'',''],
	['PAGE','2873',jdecode('Who+We+Are'),jdecode(''), jdecode('%2F2873.html'), 'true',[],'',''],
	['PAGE','45623',jdecode('Where+We%26%23x27%3Bre+Located'),jdecode(''), jdecode('%2F45623.html'), 'true',[],'',''],
	['PAGE','3020',jdecode('PMC+Event+Schedule'),jdecode(''), jdecode('%2F3020%2Findex.html'), 'true',[ 
		['PAGE','21501',jdecode('08-21-11+AMA+GNC+TT'),jdecode(''), jdecode('%2F3020%2F21501.html'), 'true',[],'',''],
		['PAGE','91523',jdecode('09-11-11+AHRMA+Vintage+TT'),jdecode(''), jdecode('%2F3020%2F91523.html'), 'true',[],'',''],
		['PAGE','103234',jdecode('10-1%262-11+NITRO+2-Day+Trials'),jdecode(''), jdecode('%2F3020%2F103234.html'), 'true',[],'',''],
		['PAGE','104934',jdecode('10-09-11+Bruce%26%23x27%3Bs+Turkey+Run'),jdecode(''), jdecode('%2F3020%2F104934.html'), 'true',[],'','']
	],'',''],
	['PAGE','9001',jdecode('PMC+Race+Results'),jdecode(''), jdecode('%2F9001%2Findex.html'), 'true',[ 
		['PAGE','57623',jdecode('Past+Champions'),jdecode(''), jdecode('%2F9001%2F57623.html'), 'true',[],'',''],
		['PAGE','3041',jdecode('06-19-11+All-Star+Series+TT'),jdecode(''), jdecode('%2F9001%2F3041.html'), 'true',[],'',''],
		['PAGE','86823',jdecode('08-19-11+All-Star+Series+Short+Track'),jdecode(''), jdecode('%2F9001%2F86823.html'), 'true',[],'',''],
		['PAGE','9101',jdecode('08-21-11+AMA+GNC+TT'),jdecode(''), jdecode('%2F9001%2F9101.html'), 'true',[],'',''],
		['PAGE','114834',jdecode('09-11-11+AHRMA+Vintage+TT'),jdecode(''), jdecode('%2F9001%2F114834.html'), 'true',[],'',''],
		['PAGE','111634',jdecode('10-1%262-11+NITRO+Trials'),jdecode(''), jdecode('%2F9001%2F111634.html'), 'true',[],'','']
	],'',''],
	['PAGE','3062',jdecode('PMC+Race+Photos'),jdecode(''), jdecode('%2F3062%2Findex.html'), 'true',[ 
		['PAGE','95723',jdecode('08-21-11+AMA+GNC+TT'),jdecode(''), jdecode('%2F3062%2F95723.html'), 'true',[],'',''],
		['PAGE','107934',jdecode('09-11-11+AHRMA+TT'),jdecode(''), jdecode('%2F3062%2F107934.html'), 'true',[],'',''],
		['PAGE','118334',jdecode('10-1%262-11+NITRO+Trials'),jdecode(''), jdecode('%2F3062%2F118334.html'), 'true',[],'','']
	],'',''],
	['PAGE','28112',jdecode('Races%2C+Rides+%26+Riders'),jdecode(''), jdecode('%2F28112.html'), 'true',[],'',''],
	['PAGE','2894',jdecode('For+Members+Only'),jdecode(''), jdecode('%2F2894%2Findex.html'), 'true',[ 
		['PAGE','33312',jdecode('Members+and+Officers'),jdecode(''), jdecode('%2F2894%2F33312.html'), 'true',[],'',''],
		['PAGE','2936',jdecode('Club+News'),jdecode(''), jdecode('%2F2894%2F2936.html'), 'true',[],'',''],
		['PAGE','2915',jdecode('Club+Events'),jdecode(''), jdecode('%2F2894%2F2915.html'), 'true',[],'',''],
		['PAGE','131167',jdecode('Ride+Reports'),jdecode(''), jdecode('%2F2894%2F131167.html'), 'true',[],'',''],
		['PAGE','98934',jdecode('PMC+Off-Road+Rules'),jdecode(''), jdecode('%2F2894%2F98934.html'), 'true',[],'',''],
		['PAGE','2957',jdecode('Help+Wanted'),jdecode(''), jdecode('%2F2894%2F2957.html'), 'true',[],'',''],
		['PAGE','2978',jdecode('Race+Day+Assignments'),jdecode(''), jdecode('%2F2894%2F2978.html'), 'true',[],'',''],
		['PAGE','30912',jdecode('Members%26%23x27%3B+Photos'),jdecode(''), jdecode('%2F2894%2F30912.html'), 'true',[],'',''],
		['PAGE','68423',jdecode('For+Sale'),jdecode(''), jdecode('%2F2894%2F68423.html'), 'true',[],'',''],
		['PAGE','68444',jdecode('Tips+%26+Tricks'),jdecode(''), jdecode('%2F2894%2F68444.html'), 'true',[],'','']
	],'',''],
	['PAGE','10322',jdecode('Links'),jdecode(''), jdecode('%2F10322.html'), 'true',[],'',''],
	['PAGE','3083',jdecode('Visitor+Book'),jdecode(''), jdecode('%2F3083.html'), 'true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Capacity';
theSitetree.paletteFamily='5692C2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33280';
theSitetree.graphicsetId='14155';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Capacity',
				paletteFamily: 	'5692C2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33280',
				graphicsetId: 	'14155',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-3083aendu0infob8']={
webappId:    '1002',
documentId:  '3083',
internalId:  '3083aendu0infob8',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20120122-011538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68423',
internalId:  '',
customField: '20111001-192148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2873',
internalId:  '',
customField: '20120122-003604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20120218-062143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2915',
internalId:  '',
customField: '20120214-232635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2936',
internalId:  '',
customField: '20120219-183923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2957',
internalId:  '',
customField: '20111103-213659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2978',
internalId:  '',
customField: '20111012-014810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28112',
internalId:  '',
customField: '20120103-232733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3020',
internalId:  '',
customField: '20120123-235014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3041',
internalId:  '',
customField: '20111012-010809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3062',
internalId:  '',
customField: '20111012-010733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3083',
internalId:  '',
customField: '20110630-232202'
};
webappMappings['1501']=webappMappings['1501-40727417']={
webappId:    '1501',
documentId:  '2801',
internalId:  '40727417',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20111010-233746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20111012-010849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95723',
internalId:  '',
customField: '20111012-000950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98934',
internalId:  '',
customField: '20111121-222916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10322',
internalId:  '',
customField: '20120122-011615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68444',
internalId:  '',
customField: '20111204-231250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57623',
internalId:  '',
customField: '20110715-121627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30912',
internalId:  '',
customField: '20111017-214419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20111116-000012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45623',
internalId:  '',
customField: '20111012-015038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33312',
internalId:  '',
customField: '20120219-184345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131167',
internalId:  '',
customField: '20111206-232515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91523',
internalId:  '',
customField: '20111012-011312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86823',
internalId:  '',
customField: '20111009-221637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103234',
internalId:  '',
customField: '20111012-011411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104934',
internalId:  '',
customField: '20111017-214801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107934',
internalId:  '',
customField: '20111012-005630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111634',
internalId:  '',
customField: '20111009-221853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114834',
internalId:  '',
customField: '20111010-233539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118334',
internalId:  '',
customField: '20111012-010644'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INFOB8';
var companyName   = 'Peoria+Motorcycle+Club';
var htmlTitle	  = 'Peoria+Motorcycle+Club+PMC+AMA+Grand+National+Championship+TT';
var metaKeywords  = 'Peoria+Motorcycle+Club%2C+AMA+Grand+National+Championship+TT%2C+PMC%2C+PMC+Race+Park%2C+Peoria+IL%2C++Dick+Mann%2C+Bart+Markel%2C+Mert+Lawwill%2C+Jay+Springsteen%2C+Bubba+Shobert%2C+Joe+Kopp%2C+Chris+Carr%2C+%22Prince+of+Peoria%22%2C+Henry+Wiles%2C+Budweiser%2C+Dr.+Pepper%2C+Caterpillar%2C+Go-T%27s';
var metaContents  = 'Peoria+Motorcycle+Club+-+Home+of+the+AMA+Grand+National+Championship+TT+since+1947%2C+making+it+the+longest+consecutive+running+dirt+track+event+in+the+world.++PMC+Race+Park+is+located+near+Peoria%2C+IL.+Past+Champions+include+the+likes+of+Dick+Mann%2C+Bart+Markel%2C+Mert+Lawwill%2C+Jay+Springsteen%2C+Bubba+Shobert%2C+Joe+Kopp%2C+Chris+Carr+the+%22Prince+of+Peoria%22+and+most+recently%2C+six-time+winner+Henry+Wiles.+PMC%27s+5%2F8+mile+TT+course+sits+in+a+natural+ampitheater+that+provides+an+excellent+view+of+the+entire+track.+Being+a+TT+course%2C+it+consists+of+two+flat-track+style+ends+-+Turns+1+%26+2+and+Turns+3+%26+4%2C+a+jump%2C+a+right-hand+dog-leg+and+a+long+straight+section+that+allows+racers+to+hit+speeds+topping+100+mph.';
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();
};

