/* [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 theSitetree=[ 
	['PAGE','701',jdecode('BASA'),jdecode(''),'/701.html','true',[],''],
	['PAGE','23401',jdecode('News'),jdecode(''),'/23401.html','true',[],''],
	['PAGE','5301',jdecode('About+us'),jdecode(''),'/5301/index.html','true',[ 
		['PAGE','5322',jdecode('Staff'),jdecode(''),'/5301/5322.html','true',[],'']
	],''],
	['PAGE','5364',jdecode('Academy'),jdecode(''),'/5364.html','true',[],''],
	['PAGE','5427',jdecode('Club+Schedule'),jdecode(''),'/5427.html','true',[],''],
	['PAGE','65101',jdecode('Club+Development'),jdecode(''),'/65101.html','true',[],''],
	['PAGE','119192',jdecode('Club+League+Program'),jdecode(''),'/119192.html','true',[],''],
	['PAGE','117945',jdecode('Club+Select+Player+Program'),jdecode(''),'/117945.html','true',[],''],
	['PAGE','116715',jdecode('Club+Adult+Cup+Program'),jdecode(''),'/116715.html','true',[],''],
	['PAGE','117956',jdecode('Affiliations'),jdecode(''),'/117956.html','true',[],''],
	['PAGE','5385',jdecode('Behavior+'),jdecode(''),'/5385.html','true',[],''],
	['PAGE','5406',jdecode('Sponsors'),jdecode(''),'/5406.html','true',[],''],
	['PAGE','129934',jdecode('Partners'),jdecode(''),'/129934.html','true',[],''],
	['PAGE','13001',jdecode('Advertising'),jdecode(''),'/13001.html','true',[],''],
	['PAGE','36901',jdecode('Merchendise'),jdecode(''),'/36901.html','true',[],''],
	['PAGE','115118',jdecode('Giving+Back'),jdecode(''),'/115118.html','true',[],''],
	['PAGE','13043',jdecode('Privacy'),jdecode(''),'/13043.html','true',[],''],
	['PAGE','12701',jdecode('Contact'),jdecode(''),'/12701.html','true',[],''],
	['PAGE','111371',jdecode('PPD+Night+Out'),jdecode(''),'/111371.html','false',[],''],
	['PAGE','110043',jdecode('at+NASCAR'),jdecode(''),'/110043.html','false',[],''],
	['PAGE','112371',jdecode('with+PUSD'),jdecode(''),'/112371.html','false',[],''],
	['PAGE','97901',jdecode('we+CARE'),jdecode(''),'/97901.html','false',[],''],
	['PAGE','110948',jdecode('at+NHRA'),jdecode(''),'/110948.html','false',[],''],
	['PAGE','111668',jdecode('at+INDI'),jdecode(''),'/111668.html','false',[],''],
	['PAGE','113304',jdecode('with+LIF'),jdecode(''),'/113304.html','false',[],''],
	['PAGE','112135',jdecode('FREE+Health+Services'),jdecode(''),'/112135.html','false',[],''],
	['PAGE','95101',jdecode('Conditions'),jdecode(''),'/95101.html','false',[],''],
	['PAGE','115804',jdecode('What+it+takes'),jdecode(''),'/115804.html','false',[],''],
	['PAGE','115547',jdecode('2009+BASA+Cup'),jdecode(''),'/115547.html','false',[],''],
	['PAGE','114079',jdecode('2008+SFSFL+Champions'),jdecode(''),'/114079.html','false',[],''],
	['PAGE','127620',jdecode('Videos'),jdecode(''),'/127620.html','true',[],''],
	['PAGE','153281',jdecode('Development'),jdecode(''),'/153281.html','false',[],''],
	['PAGE','156103',jdecode('College'),jdecode(''),'/156103.html','false',[],'']];
var siteelementCount=34;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahw050inxst3545e422904719c9']={
webappId:    '1001',
documentId:  '13001',
internalId:  'ahw050inxst3545e422904719c9',
customField: ''
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115547',
internalId:  '',
customField: '20090812-114318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65101',
internalId:  '',
customField: '20100217-004920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156103',
internalId:  '',
customField: '20100202-001755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115118',
internalId:  '',
customField: '20090517-111446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114079',
internalId:  '',
customField: '20090531-184558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100124-210050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20100304-151809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5406',
internalId:  '',
customField: '20100223-180349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119192',
internalId:  '',
customField: '20100101-183030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129934',
internalId:  '',
customField: '20100218-135215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117945',
internalId:  '',
customField: '20100202-001642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100308-230926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5364',
internalId:  '',
customField: '20100204-180832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5385',
internalId:  '',
customField: '20100120-220500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5427',
internalId:  '',
customField: '20100307-174747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20100307-173117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20090826-192355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20091223-021023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95101',
internalId:  '',
customField: '20090423-120034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111371',
internalId:  '',
customField: '20080807-114019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117956',
internalId:  '',
customField: '20100120-215315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116715',
internalId:  '',
customField: '20100217-011326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110043',
internalId:  '',
customField: '20081114-182309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112371',
internalId:  '',
customField: '20080902-214300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97901',
internalId:  '',
customField: '20081020-004328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110948',
internalId:  '',
customField: '20081114-182140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111668',
internalId:  '',
customField: '20080828-130309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113304',
internalId:  '',
customField: '20081031-205907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13043',
internalId:  '',
customField: '20090601-114339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115804',
internalId:  '',
customField: '20091107-003446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127620',
internalId:  '',
customField: '20100217-010126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20100202-132045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112135',
internalId:  '',
customField: '20080827-181045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153281',
internalId:  '',
customField: '20100123-222743'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXST3';
var companyName   = 'BAY+AREA+SOCCER+ACADEMY';
var htmlTitle	  = 'Bay+Area+Soccer+Academy';
var metaKeywords  = 'BASA%2C+basappsc%2C+soccer%2C+east+contra+costa+soccer+club%2C+pittsbur+pitbulls%2C+boys%2C+girls%2C+youth+soccer%2C+pittsburg+soccer%2C+soccer+excellence%2C+soccer+success';
var metaContents  = 'BASA+offer+the+best+instruction+for+young+players+who+are+serious+about+soccer.+International+staff+of+world+class+players+teach+basics+...';
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();
};
