/* [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','6201',jdecode('Robert+Jacobson+Sports'),jdecode(''),'/6201.html','true',[],'',''],
	['PAGE','88265',jdecode('*Tutoring%2FOrganization*'),jdecode(''),'/88265.html','true',[],'',''],
	['PAGE','91165',jdecode('Drew+Watson+Basketball'),jdecode(''),'/91165.html','true',[],'',''],
	['PAGE','74754',jdecode('June+19th+Clinics'),jdecode(''),'/74754.html','false',[],'',''],
	['PAGE','83265',jdecode('Tackle+Football+2010'),jdecode(''),'/83265.html','true',[],'',''],
	['PAGE','83565',jdecode('Flag+Football+2010'),jdecode(''),'/83565.html','true',[],'',''],
	['PAGE','86765',jdecode('Cheerleading+2010'),jdecode(''),'/86765.html','true',[],'',''],
	['PAGE','54354',jdecode('Online+Registration'),jdecode(''),'/54354.html','true',[],'',''],
	['PAGE','12601',jdecode('Sponsors+'),jdecode(''),'/12601.html','true',[],'',''],
	['PAGE','72775',jdecode('Basketball+Update'),jdecode(''),'/72775.html','false',[],'',''],
	['PAGE','6294',jdecode('Lacrosse+Registration'),jdecode(''),'/6294.html','false',[],'',''],
	['PAGE','71554',jdecode('Girls+Volleyball+'),jdecode(''),'/71554.html','true',[],'',''],
	['PAGE','3727',jdecode('Girls+Basketball'),jdecode(''),'/3727.html','true',[],'',''],
	['PAGE','6252',jdecode('Boys+Basketball'),jdecode(''),'/6252.html','true',[],'',''],
	['PAGE','6273',jdecode('Star+Boxing+'),jdecode(''),'/6273.html','true',[],'',''],
	['PAGE','81565',jdecode('Baseball%2FSoftball+Clinic'),jdecode(''),'/81565.html','false',[],'',''],
	['PAGE','10701',jdecode('Directions+to+Gym'),jdecode(''),'/10701.html','true',[],'',''],
	['PAGE','68954',jdecode('ShopForMyCause.Com'),jdecode(''),'/68954.html','false',[],'',''],
	['PAGE','87565',jdecode('Fan+merchandising'),jdecode(''),'/87565.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Porthole';
theSitetree.paletteFamily='064B91';
theSitetree.keyvisualId='6729';
theSitetree.keyvisualName='kv_6729.jpg';
theSitetree.fontsetId='11200';
theSitetree.graphicsetId='12013';
theSitetree.contentColor='002952';
theSitetree.contentBGColor='E9F3FF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Porthole',
				paletteFamily: 	'064B91',
				keyvisualId: 	'6729',
				keyvisualName: 	'kv_6729.jpg',
				fontsetId: 		'11200',
				graphicsetId: 	'12013',
				contentColor: 	'002952',
				contentBGColor: 'E9F3FF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6252',
internalId:  '',
customField: '20091117-225247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6273',
internalId:  '',
customField: '20091227-133113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54354',
internalId:  '',
customField: '20090710-164952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20100901-181114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3727',
internalId:  '',
customField: '20091211-235803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100901-155928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74754',
internalId:  '',
customField: '20100509-004334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6294',
internalId:  '',
customField: '20100306-132301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20091205-131720'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '68954',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['1501']=webappMappings['1501-8291451']={
webappId:    '1501',
documentId:  '6201',
internalId:  '8291451',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87565',
internalId:  '',
customField: '20100509-010815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68954',
internalId:  '',
customField: '20091227-133928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71554',
internalId:  '',
customField: '20100509-010518'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72775',
internalId:  '',
customField: '20100407-013834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91165',
internalId:  '',
customField: '20100902-154813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88265',
internalId:  '',
customField: '20100624-170816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86765',
internalId:  '',
customField: '20100509-010243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83565',
internalId:  '',
customField: '20100509-004839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83265',
internalId:  '',
customField: '20100509-005041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81565',
internalId:  '',
customField: '20100306-141755'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2T1Z';
var companyName   = 'Robert+Jacobson+Sports';
var htmlTitle	  = 'Robert+Jacobson+Sports+-+Ardsley+Youth+Football+Cheerleading+-+Tutoring';
var metaKeywords  = 'Robert+Jacobson+Sports%2C+basketball%2C+football%2C+flag+football%2C+tackle+football%2C+Kindergarten%2C+1st+grade%2C+2nd+grade%2C+3rd+grade%2C+4th+grade%2C+5th+grade%2C+6th+grade%2C+athletics%2C+co-ed+sports%2C+Ardsley%2C+Westchester+Youth+Football+League%2C+softball+clinics%2C+baseball+clinics%2C++teamwork%2C+sportsmanship%2C+volunteer+coaches%2C+registration+forms%2C+Westchester+County%2C+New+York%2C+Rivertowns%2C+Jewish+sports%2C+synagogue+sports%2C+boys%2C+girls%2C+athletics%2C+sports+clubs%2C+youth+clubs%2C+youth+clinics%2C+sports+clinics%2C+sports%2C+youth%2C+leagues%2C+fun%2C+teamwork%2C+team%2C+work%2C+sportsmanship%2C+hired+coaches%2C+professional+coaches%2C+adult+leagues%2C+flag%2C+tackle%2Cvolleyball%2C+cheerleading%2C+boxing+';
var metaContents  = 'Robert+Jacobson+Sports+-+providing+all+youth+and+adults+an+opportunity+to+play+competitive+sports+in+a+fun%2C+safe%2C+friendly+and+caring+environment.++Our+league+stresses+the+importance+of+teamwork%2C+sportsmanship+and+making+long+lasting+friendships+above+winning+at+all+costs.++We+hire+trained+professional+coaches+to+teach+our+youngest+children+the+fundamentals+of+basketball.++Our+volunteer+football+coaches+teach+our+children+how+to+run%2C+catch%2C+pass%2C+block+and+kick+while+stressing+safety+and+sportsmanship.';
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();
};
