/* [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','10101',jdecode('HOME'),jdecode(''), jdecode('%2F10101.html'), 'true',[],'',''],
	['PAGE','10152',jdecode('ABOUT+THE+FOUNDATION'),jdecode(''), jdecode('%2F10152%2Findex.html'), 'true',[ 
		['PAGE','10194',jdecode('Organization'),jdecode(''), jdecode('%2F10152%2F10194.html'), 'true',[],'',''],
		['PAGE','10173',jdecode('Mission+%26+Vision'),jdecode(''), jdecode('%2F10152%2F10173.html'), 'true',[],'',''],
		['PAGE','16301',jdecode('Values'),jdecode(''), jdecode('%2F10152%2F16301.html'), 'true',[],'','']
	],'',''],
	['PAGE','10215',jdecode('ABOUT+REID'),jdecode(''), jdecode('%2F10215%2Findex.html'), 'true',[ 
		['PAGE','10236',jdecode('In+Words'),jdecode(''), jdecode('%2F10215%2F10236.html'), 'true',[],'',''],
		['PAGE','10257',jdecode('In+Images'),jdecode(''), jdecode('%2F10215%2F10257.html'), 'true',[],'',''],
		['PAGE','10278',jdecode('In+Memorial'),jdecode(''), jdecode('%2F10215%2F10278.html'), 'true',[],'','']
	],'',''],
	['PAGE','10299',jdecode('CANCER+IN+YOUNG+ADULTS'),jdecode(''), jdecode('%2F10299%2Findex.html'), 'true',[ 
		['PAGE','11222',jdecode('Resources'),jdecode(''), jdecode('%2F10299%2F11222.html'), 'true',[],'',''],
		['PAGE','11243',jdecode('Funding+by+Foundation'),jdecode(''), jdecode('%2F10299%2F11243.html'), 'true',[],'','']
	],'',''],
	['PAGE','10362',jdecode('REID%26%23x27%3BS+RIDE'),jdecode(''), jdecode('%2F10362%2Findex.html'), 'true',[ 
		['PAGE','35401',jdecode('2011+Reid%26%23x27%3Bs+Ride'),jdecode(''), jdecode('%2F10362%2F35401.html'), 'true',[],'',''],
		['PAGE','35422',jdecode('2010+Reid%26%23x27%3Bs+Ride'),jdecode(''), jdecode('%2F10362%2F35422.html'), 'true',[],'',''],
		['PAGE','32201',jdecode('2009+Reid%26%23x27%3Bs+Ride'),jdecode(''), jdecode('%2F10362%2F32201.html'), 'true',[],'',''],
		['PAGE','10383',jdecode('2008+Reid%26%23x27%3Bs+Ride'),jdecode(''), jdecode('%2F10362%2F10383.html'), 'true',[],'',''],
		['PAGE','10404',jdecode('2007+Reid%26%23x27%3Bs+Ride'),jdecode(''), jdecode('%2F10362%2F10404.html'), 'true',[],'',''],
		['PAGE','10425',jdecode('2006+Reid%26%23x27%3Bs+Ride'),jdecode(''), jdecode('%2F10362%2F10425.html'), 'true',[],'',''],
		['PAGE','10446',jdecode('2005+Reid%26%23x27%3Bs+Ride'),jdecode(''), jdecode('%2F10362%2F10446.html'), 'true',[],'',''],
		['PAGE','49701',jdecode('Sponsors'),jdecode(''), jdecode('%2F10362%2F49701.html'), 'true',[],'','']
	],'',''],
	['PAGE','14301',jdecode('EVENTS'),jdecode(''), jdecode('%2F14301%2Findex.html'), 'true',[ 
		['PAGE','56901',jdecode('Past+Events'),jdecode(''), jdecode('%2F14301%2F56901.html'), 'true',[],'','']
	],'',''],
	['PAGE','10341',jdecode('SCHOLARSHIP'),jdecode(''), jdecode('%2F10341.html'), 'true',[],'',''],
	['PAGE','54201',jdecode('GIFTS+%2F+DONATIONS'),jdecode(''), jdecode('%2F54201%2Findex.html'), 'true',[ 
		['PAGE','54301',jdecode('Bracelets'),jdecode(''), jdecode('%2F54201%2F54301.html'), 'true',[],'',''],
		['PAGE','54322',jdecode('Scrolls'),jdecode(''), jdecode('%2F54201%2F54322.html'), 'true',[],'',''],
		['PAGE','54343',jdecode('Donations'),jdecode(''), jdecode('%2F54201%2F54343.html'), 'true',[],'','']
	],'',''],
	['PAGE','17101',jdecode('PHOTO+ALBUM'),jdecode(''), jdecode('%2F17101.html'), 'true',[],'',''],
	['PAGE','55101',jdecode('COMMENTS'),jdecode(''), jdecode('%2F55101.html'), 'true',[],'',''],
	['PAGE','10701',jdecode('CONTACT+US'),jdecode(''), jdecode('%2F10701.html'), 'true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='012253';
theSitetree.keyvisualId='2496';
theSitetree.keyvisualName='labor.jpg';
theSitetree.fontsetId='433';
theSitetree.graphicsetId='484';
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: 			'Aeskulap',
				paletteFamily: 	'012253',
				keyvisualId: 	'2496',
				keyvisualName: 	'labor.jpg',
				fontsetId: 		'433',
				graphicsetId: 	'484',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20110713-182626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10362',
internalId:  '',
customField: '20110715-084931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10383',
internalId:  '',
customField: '20110503-222323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10152',
internalId:  '',
customField: '20110502-194952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10299',
internalId:  '',
customField: '20110502-201819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10173',
internalId:  '',
customField: '20110428-104250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10194',
internalId:  '',
customField: '20110502-195339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10215',
internalId:  '',
customField: '20110502-193552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10236',
internalId:  '',
customField: '20110505-075424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10257',
internalId:  '',
customField: '20110502-201326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10278',
internalId:  '',
customField: '20110428-194511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54201',
internalId:  '',
customField: '20110718-193637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11222',
internalId:  '',
customField: '20110502-202900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11243',
internalId:  '',
customField: '20110502-193252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10404',
internalId:  '',
customField: '20110503-222338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10425',
internalId:  '',
customField: '20110503-222404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10446',
internalId:  '',
customField: '20110503-223456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10341',
internalId:  '',
customField: '20120126-111159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20110510-075759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20110510-205352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54343',
internalId:  '',
customField: '20110718-193438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20110510-075110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16301',
internalId:  '',
customField: '20110428-104318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49701',
internalId:  '',
customField: '20110531-223002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20110502-213242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20110503-221917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20110715-084805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35422',
internalId:  '',
customField: '20110503-221906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54322',
internalId:  '',
customField: '20110505-082526'
};
webappMappings['7050']=webappMappings['7050-20891']={
webappId:    '7050',
documentId:  '55101',
internalId:  '20891',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55101',
internalId:  '',
customField: '20110510-080610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56901',
internalId:  '',
customField: '20110510-205013'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2AHX';
var companyName   = '';
var htmlTitle	  = 'Reid+Sacco+Memorial+Foundation';
var metaKeywords  = 'cancers+young+adults+adolescents';
var metaContents  = 'Reid+Sacco+Memorial+Foundation';
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();
};

