/* [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','2301',jdecode('About+Us'),jdecode(''), jdecode('%2F2301.html'), 'true',[],'',''],
	['PAGE','48101',jdecode('NEWS'),jdecode(''), jdecode('%2F48101.html'), 'true',[],'',''],
	['PAGE','2801',jdecode('Staff+Background'),jdecode(''), jdecode('%2F2801%2Findex.html'), 'true',[ 
		['PAGE','16801',jdecode('Benjamin+Reel'),jdecode(''), jdecode('%2F2801%2F16801.html'), 'true',[],'',''],
		['PAGE','16885',jdecode('Andrew+Stanley'),jdecode(''), jdecode('%2F2801%2F16885.html'), 'true',[],'',''],
		['PAGE','16864',jdecode('Joe+Nattermann'),jdecode(''), jdecode('%2F2801%2F16864.html'), 'true',[],'','']
	],'',''],
	['PAGE','7701',jdecode('Services'),jdecode(''), jdecode('%2F7701%2Findex.html'), 'true',[ 
		['PAGE','16906',jdecode('Camps'),jdecode(''), jdecode('%2F7701%2F16906.html'), 'true',[],'',''],
		['PAGE','16927',jdecode('Showcases'),jdecode(''), jdecode('%2F7701%2F16927.html'), 'true',[],'',''],
		['PAGE','16948',jdecode('College+Consultation'),jdecode(''), jdecode('%2F7701%2F16948.html'), 'true',[],'',''],
		['PAGE','16969',jdecode('Individual+Lessons'),jdecode(''), jdecode('%2F7701%2F16969.html'), 'true',[],'',''],
		['PAGE','16990',jdecode('Team+Lessons'),jdecode(''), jdecode('%2F7701%2F16990.html'), 'true',[],'',''],
		['PAGE','39801',jdecode('Speed+Training'),jdecode(''), jdecode('%2F7701%2F39801.html'), 'true',[],'','']
	],'',''],
	['PAGE','34201',jdecode('Camp+and+Showcase+Brochure'),jdecode(''), jdecode('%2F34201.html'), 'true',[],'',''],
	['PAGE','40801',jdecode('14U+Fall+Ball'),jdecode(''), jdecode('%2F40801%2Findex.html'), 'true',[ 
		['PAGE','41101',jdecode('Joining+the+League'),jdecode(''), jdecode('%2F40801%2F41101.html'), 'true',[],'',''],
		['PAGE','41122',jdecode('Policies+and+Procedures'),jdecode(''), jdecode('%2F40801%2F41122.html'), 'true',[],'',''],
		['PAGE','41143',jdecode('Game+Rules'),jdecode(''), jdecode('%2F40801%2F41143.html'), 'true',[],'','']
	],'',''],
	['PAGE','34801',jdecode('Tournaments'),jdecode(''), jdecode('%2F34801%2Findex.html'), 'true',[ 
		['PAGE','35001',jdecode('13U-18U+Tournament+Schedule'),jdecode(''), jdecode('%2F34801%2F35001.html'), 'true',[],'',''],
		['PAGE','48122',jdecode('10U+%26+12U+Tournament+Schedule'),jdecode(''), jdecode('%2F34801%2F48122.html'), 'true',[],'',''],
		['PAGE','35201',jdecode('Rules+and+Procedures'),jdecode(''), jdecode('%2F34801%2F35201.html'), 'true',[],'',''],
		['PAGE','35501',jdecode('Game+Rules'),jdecode(''), jdecode('%2F34801%2F35501.html'), 'true',[],'',''],
		['PAGE','38301',jdecode('Tourney+Pics'),jdecode(''), jdecode('%2F34801%2F38301.html'), 'true',[],'',''],
		['PAGE','39101',jdecode('CHAMPIONS%21%21'),jdecode(''), jdecode('%2F34801%2F39101.html'), 'true',[],'','']
	],'',''],
	['PAGE','27101',jdecode('General+Information'),jdecode(''), jdecode('%2F27101.html'), 'true',[],'',''],
	['PAGE','32801',jdecode('Facilities'),jdecode(''), jdecode('%2F32801.html'), 'true',[],'',''],
	['PAGE','2822',jdecode('Contact+Us+'),jdecode(''), jdecode('%2F2822.html'), 'true',[],'',''],
	['PAGE','2864',jdecode('Directions'),jdecode(''), jdecode('%2F2864.html'), 'true',[],'',''],
	['PAGE','17032',jdecode('SIGN+UP%21'),jdecode(''), jdecode('%2F17032.html'), 'true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='7C7B7B';
theSitetree.keyvisualId='4234';
theSitetree.keyvisualName='kv_4234.jpg';
theSitetree.fontsetId='10683';
theSitetree.graphicsetId='11190';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='959494';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'fatcow',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Americanlife',
				paletteFamily: 	'7C7B7B',
				keyvisualId: 	'4234',
				keyvisualName: 	'kv_4234.jpg',
				fontsetId: 		'10683',
				graphicsetId: 	'11190',
				contentColor: 	'FFFFFF',
				contentBGColor: '959494',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20110620-132347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20100614-212616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2822',
internalId:  '',
customField: '20090716-045814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2864',
internalId:  '',
customField: '20090716-050705'
};
webappMappings['7008']=webappMappings['7008-18713']={
webappId:    '7008',
documentId:  '17032',
internalId:  '18713',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20100811-154500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20100213-164233'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '2864',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16906',
internalId:  '',
customField: '20100308-181903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16927',
internalId:  '',
customField: '20110620-132550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16948',
internalId:  '',
customField: '20090629-021503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17032',
internalId:  '',
customField: '20090716-044516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16885',
internalId:  '',
customField: '20100213-163303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48101',
internalId:  '',
customField: '20111129-122600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48122',
internalId:  '',
customField: '20111129-122601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16864',
internalId:  '',
customField: '20100213-160951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16969',
internalId:  '',
customField: '20100811-154544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16990',
internalId:  '',
customField: '20090629-022909'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20100811-155631'
};
webappMappings['1501']=webappMappings['1501-27519193']={
webappId:    '1501',
documentId:  '2301',
internalId:  '27519193',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20101210-133400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20110620-131952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34801',
internalId:  '',
customField: '20100811-154720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20101215-173501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35201',
internalId:  '',
customField: '20101210-132853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35501',
internalId:  '',
customField: '20100531-121925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38301',
internalId:  '',
customField: '20101210-133032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39101',
internalId:  '',
customField: '20110620-141735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39801',
internalId:  '',
customField: '20100817-004728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20101210-130550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41143',
internalId:  '',
customField: '20100811-140732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41122',
internalId:  '',
customField: '20101210-124018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20110620-132207'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN3BPI';
var companyName   = 'THE+REEL+BASEBALL+EXPERIENCE%2C+LLC';
var htmlTitle	  = 'The+Reel+Baseball+Experience';
var metaKeywords  = 'Tournaments%2C+showcases%2C+college+consultations%2C+camps%2C+lessons%2C+speed+and+agility+training%2C+college+tournaments%2C+college+coaches%2C+recruiting%2C+recruiting+process%2C+youth+baseball%2C+scouts%2C+fun%2C+great+facility%2C+college+ball+park%2C+college+facilty%2C+eteamz%2C+IU+Southeast+Baseball%2C+Grenadier+Staff%2C+Ben+Reel%2C+Benjamin+Reel%2C+Steve+Stemle%2C+Andrew+Stanley%2C+Joe+Nattermann%2C+Great+experience';
var metaContents  = 'We+offer+youth+tournaments%2C+college+showcases%2C+college+consultations%2C+camps%2C+lessons%2C+and+speed+and+agility+training.++All+services+offered+on+a+college+baseball+facility+by+college+baseball+coaches+with+experience+at+all+levels.++Come+be+a+part+of+THE+REEL+BASEBALL+EXPERIENCE%21';
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();
};

