/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','111401',jdecode('FAQ%26%23x27%3BS'),jdecode(''),'/111401.html','true',[],'',''],
	['PAGE','124301',jdecode('Eagles+News+and+Info'),jdecode(''),'/124301.html','true',[],'',''],
	['PAGE','161753',jdecode('Events'),jdecode(''),'/161753.html','true',[],'',''],
	['PAGE','161774',jdecode('Calendar'),jdecode(''),'/161774.html','true',[],'',''],
	['PAGE','174295',jdecode('2010+Schedule'),jdecode(''),'/174295.html','true',[],'',''],
	['PAGE','128201',jdecode('Scores+%26+Standing'),jdecode(''),'/128201.html','true',[],'',''],
	['PAGE','40401',jdecode('Forms+%26+Handouts'),jdecode(''),'/40401.html','true',[],'',''],
	['PAGE','35201',jdecode('PayPal+Payment'),jdecode(''),'/35201.html','true',[],'',''],
	['PAGE','17901',jdecode('Sponsorship+Programs'),jdecode(''),'/17901/index.html','true',[ 
		['PAGE','116001',jdecode('Sponsors+%26+Contributors'),jdecode(''),'/17901/116001.html','true',[],'','']
	],'',''],
	['PAGE','2036',jdecode('2010++Board+of+Directors'),jdecode(''),'/2036/index.html','true',[ 
		['PAGE','106801',jdecode('Executive+Board'),jdecode(''),'/2036/106801.html','true',[],'',''],
		['PAGE','106822',jdecode('General+Board'),jdecode(''),'/2036/106822.html','true',[],'','']
	],'',''],
	['PAGE','90001',jdecode('2010+Teams+%26+Coaches'),jdecode(''),'/90001/index.html','true',[ 
		['PAGE','177195',jdecode('Cheer+%26+Mascot'),jdecode(''),'/90001/177195.html','true',[],'',''],
		['PAGE','124001',jdecode('Flag'),jdecode(''),'/90001/124001.html','true',[],'',''],
		['PAGE','90422',jdecode('Mitey+Mite'),jdecode(''),'/90001/90422.html','true',[],'',''],
		['PAGE','90443',jdecode('Jr.+Pee+Wee'),jdecode(''),'/90001/90443.html','true',[],'',''],
		['PAGE','90464',jdecode('Pee+Wee'),jdecode(''),'/90001/90464.html','true',[],'',''],
		['PAGE','90485',jdecode('Jr.+Midget'),jdecode(''),'/90001/90485.html','true',[],'',''],
		['PAGE','90506',jdecode('Unlimited'),jdecode(''),'/90001/90506.html','true',[],'',''],
		['PAGE','142013',jdecode('2009+Eagles'),jdecode(''),'/90001/142013.html','true',[],'','']
	],'',''],
	['PAGE','90022',jdecode('Home+Field'),jdecode(''),'/90022.html','true',[],'',''],
	['PAGE','90201',jdecode('Field+Locations'),jdecode(''),'/90201.html','true',[],'',''],
	['PAGE','90043',jdecode('Directions+To+%26+From+Field'),jdecode(''),'/90043.html','true',[],'',''],
	['PAGE','107301',jdecode('2010+Photo+Album'),jdecode(''),'/107301.html','true',[],'',''],
	['PAGE','127701',jdecode('Tell+Us+What+U+Think'),jdecode(''),'/127701.html','true',[],'',''],
	['PAGE','2057',jdecode('Volunteer+Opportunities'),jdecode(''),'/2057.html','true',[],'',''],
	['PAGE','90222',jdecode('Guestbook'),jdecode(''),'/90222.html','true',[],'',''],
	['PAGE','2099',jdecode('Contact+Us'),jdecode(''),'/2099.html','true',[],'',''],
	['PAGE','1952',jdecode('Registration'),jdecode(''),'/1952.html','true',[],'',''],
	['PAGE','113001',jdecode('Spring+8%26%23x27%3Bs+Schedule'),jdecode(''),'/113001.html','true',[],'',''],
	['PAGE','114401',jdecode('Links'),jdecode(''),'/114401.html','true',[],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='3E6E72';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='354';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3E6E72';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'3E6E72',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'354',
				contentColor: 	'FFFFFF',
				contentBGColor: '3E6E72',
				a_color: 		'3E6E72',
				b_color: 		'101C1D',
				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:  '1901',
internalId:  '',
customField: '20100826-171656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20100716-034859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35201',
internalId:  '',
customField: '20100123-122932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20100816-145425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2036',
internalId:  '',
customField: '20100416-143901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2057',
internalId:  '',
customField: '20100611-154942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20100524-141315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2099',
internalId:  '',
customField: '20100216-235904'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['4001']=webappMappings['4001-16739441']={
webappId:    '4001',
documentId:  '35201',
internalId:  '16739441',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '90022',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '90043',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90001',
internalId:  '',
customField: '20090506-005222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90022',
internalId:  '',
customField: '20090409-131214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90043',
internalId:  '',
customField: '20090401-001925'
};
webappMappings['1002']=webappMappings['1002-90222aendu0in2st6']={
webappId:    '1002',
documentId:  '90222',
internalId:  '90222aendu0in2st6',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90222',
internalId:  '',
customField: '20100319-060108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90201',
internalId:  '',
customField: '20090331-142457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90464',
internalId:  '',
customField: '20100826-164643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90485',
internalId:  '',
customField: '20100719-164131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90506',
internalId:  '',
customField: '20100826-165111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90422',
internalId:  '',
customField: '20100826-164238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90443',
internalId:  '',
customField: '20100826-164124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106801',
internalId:  '',
customField: '20100719-165315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106822',
internalId:  '',
customField: '20100719-165425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107301',
internalId:  '',
customField: '20090903-014041'
};
webappMappings['1501']=webappMappings['1501-11591131']={
webappId:    '1501',
documentId:  '1901',
internalId:  '11591131',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111401',
internalId:  '',
customField: '20100123-123706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113001',
internalId:  '',
customField: '20100522-231116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114401',
internalId:  '',
customField: '20100413-012156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116001',
internalId:  '',
customField: '20100826-162136'
};
webappMappings['7008']=webappMappings['7008-18223']={
webappId:    '7008',
documentId:  '2099',
internalId:  '18223',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124301',
internalId:  '',
customField: '20100826-170855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124001',
internalId:  '',
customField: '20100826-162927'
};
webappMappings['1003']=webappMappings['1003-aendu0in2st61235cfc24cf']={
webappId:    '1003',
documentId:  '127701',
internalId:  'aendu0in2st61235cfc24cf',
customField: 'en:US'
};
webappMappings['7060']=webappMappings['7060-75d68fa0eb3af7863c2d8654fdda7956']={
webappId:    '7060',
documentId:  '107301',
internalId:  '75d68fa0eb3af7863c2d8654fdda7956',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127701',
internalId:  '',
customField: '20091012-175029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128201',
internalId:  '',
customField: '20100416-143828'
};
webappMappings['7060']=webappMappings['7060-887bbba99c4baa387f33d2ffbf8ce843']={
webappId:    '7060',
documentId:  '142013',
internalId:  '887bbba99c4baa387f33d2ffbf8ce843',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177195',
internalId:  '',
customField: '20100826-170332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142013',
internalId:  '',
customField: '20090929-000534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174295',
internalId:  '',
customField: '20100820-163502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161753',
internalId:  '',
customField: '20100611-165738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161774',
internalId:  '',
customField: '20100506-143449'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2ST6';
var companyName   = 'Welcome+to+the+Eagles+Nest';
var htmlTitle	  = 'South+Bay+Youth+Football+%26+Cheer+Association';
var metaKeywords  = 'South+Bay+Eagles+Youth+Football+San+Diego+Youth+Football+South+Bay+El+Toyon+Park+National+City+Eagles+Cheer+Youth+Football';
var metaContents  = 'South+Bay+Eagles+Youth+Football+San+Diego+Youth+Football+South+Bay+El+Toyon+Park+National+City+Eagles+Cheer+Youth+Football';
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();
};
