/* [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','276344',jdecode('HOME'),jdecode(''), jdecode('%2F276344.html'), 'true',[],'',''],
	['PAGE','229244',jdecode('EVENTS'),jdecode(''), jdecode('%2F229244%2Findex.html'), 'true',[ 
		['PAGE','183952',jdecode('EVENTS'),jdecode(''), jdecode('%2F229244%2F183952.html'), 'true',[],'',''],
		['PAGE','183889',jdecode('REGISTRATION'),jdecode(''), jdecode('%2F229244%2F183889.html'), 'true',[],'',''],
		['PAGE','252744',jdecode('2010+Turkey+Trot'),jdecode(''), jdecode('%2F229244%2F252744.html'), 'true',[],'',''],
		['PAGE','184078',jdecode('DIRECTIONS'),jdecode(''), jdecode('%2F229244%2F184078.html'), 'true',[],'',''],
		['PAGE','48948',jdecode('5K+SPONSORS'),jdecode(''), jdecode('%2F229244%2F48948.html'), 'true',[],'','']
	],'',''],
	['PAGE','275644',jdecode('SERVICES'),jdecode(''), jdecode('%2F275644.html'), 'true',[],'',''],
	['PAGE','229295',jdecode('RESULTS+'),jdecode(''), jdecode('%2F229295%2Findex.html'), 'true',[ 
		['PAGE','234265',jdecode('Results'),jdecode(''), jdecode('%2F229295%2F234265.html'), 'true',[],'','']
	],'',''],
	['PAGE','31501',jdecode('OUR+TECHNOLOGY'),jdecode(''), jdecode('%2F31501.html'), 'true',[],'',''],
	['PAGE','239544',jdecode('TESTIMONIALS'),jdecode(''), jdecode('%2F239544.html'), 'true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='666666';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='49';
theSitetree.graphicsetId='55';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easy',
				paletteFamily: 	'666666',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'49',
				graphicsetId: 	'55',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'666666',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '184078',
internalId:  '',
customField: '20101013-064455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183952',
internalId:  '',
customField: '20111111-145024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31501',
internalId:  '',
customField: '20110912-143116'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '276344',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '275644',
internalId:  '',
customField: '20120119-131554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252744',
internalId:  '',
customField: '20110919-133657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229244',
internalId:  '',
customField: '20120119-133428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48948',
internalId:  '',
customField: '20111111-145155'
};
webappMappings['7060']=webappMappings['7060-3532409b62b6cdf8346923d5b63d3573']={
webappId:    '7060',
documentId:  '252744',
internalId:  '3532409b62b6cdf8346923d5b63d3573',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183889',
internalId:  '',
customField: '20101113-161634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229295',
internalId:  '',
customField: '20120119-101119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '276344',
internalId:  '',
customField: '20120119-125710'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '276344',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239544',
internalId:  '',
customField: '20110607-151925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234265',
internalId:  '',
customField: '20111125-101016'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '184078',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXV32';
var companyName   = 'CTFC+RACE+TIMING+%26+MANAGEMENT';
var htmlTitle	  = 'COACH+TO+FIRSTCLASS+INC';
var metaKeywords  = 'SERIOUS+TRAINING+FOR+ENDURANCE+ATHLETES.+TEENAGERS.+HIGH+SCHOOL+CROSS+COUNTRY.+MIAMI+DADE+COUNTY.+HIALEAH.+MIAMI+LAKES.+OPA-LOCKA.+STRENGTH+AND+CONDITIONING.+COLLEGE+PREP+DISTANCE+RUNNING.+ROAD+RACING%3F+TRAIN+SMARTER+NOT+HARDER.+BOYS+SUMMER+CAMP.+ATHLETIC+CAMP.+5K.+10K.+HALF+MARATHON.+HML.+TRACK++FIELD.+PEAK+PERFORMANCE.+OPTIMUM+FITNESS.+WELLNESS.+SPEED+TRAINING.+AGILITY.+HIGH+ALTITUDE+TRAINING.+LONG+RUNS.+NON+PROFIT.+DONATIONS+TO+A+GREAT+CAUSE.+VOLUNTEERING.+SPONSORSHIP.+COMMUNITY+SERVICE.+BOYS+ATHLETIC+CLUB.+INTERNATIONAL+RUNNING+TEAM.+ELITE.+POINT+RUNNING.+NUTRITION.+STRETCHING.+INTERVAL+TRAINING.+TIMED+TRIALS.+OLYMPICS.+TRACK+AND+FIELD.+ENDURANCE.+800M.+1500M%2C+2+MILES.+8K.+NCAA.+TRAINING+IN+MIAMI.+SOUTH+FLORIDA.+MIAMI+BEACH+RUNNING%2C+++';
var metaContents  = 'SERIOUS+TRAINING+FOR+ENDURANCE+ATHLETES.+TEENAGERS.+HIGH+SCHOOL+CROSS+COUNTRY.+MIAMI+DADE+COUNTY.+HIALEAH.+MIAMI+LAKES.+OPA-LOCKA.+STRENGTH+AND+CONDITIONING.+COLLEGE+PREP+DISTANCE+RUNNING.+ROAD+RACING%3F+TRAIN+SMARTER+NOT+HARDER.+BOYS+SUMMER+CAMP.+ATHLETIC+CAMP.+5K.+10K.+HALF+MARATHON.+HML.+TRACK++FIELD.+PEAK+PERFORMANCE.+OPTIMUM+FITNESS.+WELLNESS.+SPEED+TRAINING.+AGILITY.+HIGH+ALTITUDE+TRAINING.+LONG+RUNS.+NON+PROFIT.+DONATIONS+TO+A+GREAT+CAUSE.+VOLUNTEERING.+SPONSORSHIP.+COMMUNITY+SERVICE.+BOYS+ATHLETIC+CLUB.+INTERNATIONAL+RUNNING+TEAM.+ELITE.+POINT+RUNNING.+NUTRITION.+STRETCHING.+INTERVAL+TRAINING.+TIMED+TRIALS.+OLYMPICS.+TRACK+AND+FIELD.+ENDURANCE.+800M.+1500M%2C+2+MILES.+8K.+NCAA.+TRAINING+IN+MIAMI.+SOUTH+FLORIDA.+MIAMI+BEACH+RUNNING%2C+++';
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();
};

