/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('About+Us'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','573',jdecode('Event+Calendar'),jdecode(''),'/573.html','true',[],'',''],
	['PAGE','66097',jdecode('10+Vehicle+Raffle'),jdecode(''),'/66097/index.html','true',[ 
		['PAGE','66704',jdecode('2010+Raffle+Vehicle+Specs'),jdecode(''),'/66097/66704.html','true',[],'','']
	],'',''],
	['PAGE','66106',jdecode('10+Harley+Raffle'),jdecode(''),'/66106.html','true',[],'',''],
	['PAGE','66359',jdecode('Purchase+Raffle+Tickets'),jdecode(''),'/66359.html','true',[],'',''],
	['PAGE','66912',jdecode('10+Golf+Scramble'),jdecode(''),'/66912/index.html','true',[ 
		['PAGE','66921',jdecode('Golf+Registration'),jdecode(''),'/66912/66921.html','true',[],'','']
	],'',''],
	['PAGE','66960',jdecode('10+Awareness+Ride'),jdecode(''),'/66960/index.html','true',[ 
		['PAGE','66969',jdecode('Ride+Registration'),jdecode(''),'/66960/66969.html','true',[],'','']
	],'',''],
	['PAGE','66978',jdecode('10+Car+Show+%2F+Craft+Fair'),jdecode(''),'/66978/index.html','true',[ 
		['PAGE','66987',jdecode('Car+Show+Registration'),jdecode(''),'/66978/66987.html','true',[],'',''],
		['PAGE','66996',jdecode('Craft+Fair+Registration'),jdecode(''),'/66978/66996.html','true',[],'','']
	],'',''],
	['PAGE','17001',jdecode('Latest+News'),jdecode(''),'/17001.html','true',[],'',''],
	['PAGE','56522',jdecode('09+Vehicle+Raffle+Winners'),jdecode(''),'/56522.html','true',[],'',''],
	['PAGE','63578',jdecode('09+Harley+Raffle+Winners'),jdecode(''),'/63578.html','true',[],'',''],
	['PAGE','64329',jdecode('10+Derby+Raffle+Winners'),jdecode(''),'/64329.html','true',[],'',''],
	['PAGE','657',jdecode('Photo+Album'),jdecode(''),'/657/index.html','true',[ 
		['PAGE','30801',jdecode('2009+March+of+Dimes+Walk'),jdecode(''),'/657/30801.html','true',[],'',''],
		['PAGE','52401',jdecode('2009+Golf+Scramble'),jdecode(''),'/657/52401.html','true',[],'',''],
		['PAGE','52601',jdecode('2008+Awareness+Ride'),jdecode(''),'/657/52601.html','true',[],'',''],
		['PAGE','53001',jdecode('2008+JDRF+Walk'),jdecode(''),'/657/53001.html','true',[],'',''],
		['PAGE','19622',jdecode('2009+Craft+%26+Flea+Market'),jdecode(''),'/657/19622.html','true',[],'','']
	],'',''],
	['PAGE','7701',jdecode('Contact+Information'),jdecode(''),'/7701.html','true',[],'',''],
	['PAGE','5601',jdecode('Sponsor+Opportunities'),jdecode(''),'/5601/index.html','true',[ 
		['PAGE','25401',jdecode('Platinum+Sponsors'),jdecode(''),'/5601/25401.html','true',[],'','']
	],'',''],
	['PAGE','741',jdecode('Links'),jdecode(''),'/741.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-947646']={
webappId:    '1501',
documentId:  '501',
internalId:  '947646',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66987',
internalId:  '',
customField: '20100503-134830'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-5075af6c044ef823cd264daad7bafd46']={
webappId:    '7060',
documentId:  '52401',
internalId:  '5075af6c044ef823cd264daad7bafd46',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-858a1647997ab6f80a66ebf05c7b1869']={
webappId:    '7060',
documentId:  '52601',
internalId:  '858a1647997ab6f80a66ebf05c7b1869',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-ad16f8c591a44487d67c9cf0a1a029d2']={
webappId:    '7060',
documentId:  '53001',
internalId:  'ad16f8c591a44487d67c9cf0a1a029d2',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64329',
internalId:  '',
customField: '20100503-150305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100203-171514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66359',
internalId:  '',
customField: '20100203-170504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100203-171542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20100503-135837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56522',
internalId:  '',
customField: '20100203-170622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66921',
internalId:  '',
customField: '20100503-150821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63578',
internalId:  '',
customField: '20091012-082825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20091215-173901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20091215-172422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20090713-195749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19622',
internalId:  '',
customField: '20091215-173624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52401',
internalId:  '',
customField: '20080916-164535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52601',
internalId:  '',
customField: '20080916-164656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53001',
internalId:  '',
customField: '20080929-191936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20081027-071825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66960',
internalId:  '',
customField: '20100503-160432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20091215-174058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20091215-174138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20090130-162443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66996',
internalId:  '',
customField: '20100503-134830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66969',
internalId:  '',
customField: '20100503-160316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66978',
internalId:  '',
customField: '20100503-161124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66912',
internalId:  '',
customField: '20100503-141858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66704',
internalId:  '',
customField: '20100222-164204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66097',
internalId:  '',
customField: '20100208-105334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66106',
internalId:  '',
customField: '20100203-171255'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INEAZU';
var companyName   = 'Ford+Kentucky+Truck+Plant';
var htmlTitle	  = 'Ford+KTP+Cares';
var metaKeywords  = 'Ford+Charity+Community+Service+Events+KTP+Kentucky+Truck+Plant+JDRF+Juvenile+Diabetes+Research+Foundation+March+of+Dimes+Assistance+Cause';
var metaContents  = 'This+site+is+a+new+way+to+communicate+about+opportunities+about+events+that+Ford+Kentucky+Truck+Plant+is+working+with+area+charities+to+support+their+cause+and+how+you+can+help.+';
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();
};
