/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('Our+Facilities'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','132701',jdecode('Open+Gym'),jdecode(''),'/132701.html','true',[],'',''],
	['PAGE','678',jdecode('Programs'),jdecode(''),'/678/index.html','true',[ 
		['PAGE','41901',jdecode('Specialty+Classes'),jdecode(''),'/678/41901.html','true',[],'','']
	],'',''],
	['PAGE','762',jdecode('Recreational+Classes'),jdecode(''),'/762/index.html','true',[ 
		['PAGE','720',jdecode('Girls'),jdecode(''),'/762/720.html','true',[],'',''],
		['PAGE','741',jdecode('Boys'),jdecode(''),'/762/741.html','true',[],'','']
	],'',''],
	['PAGE','699',jdecode('Pre+School'),jdecode(''),'/699.html','true',[],'',''],
	['PAGE','783',jdecode('Cheer+Teams+-+NEW%21'),jdecode(''),'/783.html','true',[],'',''],
	['PAGE','139301',jdecode('Class+Schedule'),jdecode(''),'/139301.html','true',[],'',''],
	['PAGE','239641',jdecode('Online+Registration'),jdecode(''),'/239641.html','true',[],'',''],
	['PAGE','825',jdecode('Class+Tuition+%26+Fees'),jdecode(''),'/825.html','true',[],'',''],
	['PAGE','140501',jdecode('Forms%2C+waivers%2C+etc.'),jdecode(''),'/140501.html','true',[],'',''],
	['PAGE','142601',jdecode('Birthday+Parties'),jdecode(''),'/142601.html','true',[],'',''],
	['PAGE','804',jdecode('Competitive+Team'),jdecode(''),'/804/index.html','true',[ 
		['PAGE','17001',jdecode('Pre+Team'),jdecode(''),'/804/17001.html','true',[],'',''],
		['PAGE','17022',jdecode('Girls+Team'),jdecode(''),'/804/17022.html','true',[],'',''],
		['PAGE','255215',jdecode('Boys+Team'),jdecode(''),'/804/255215.html','true',[],'','']
	],'',''],
	['PAGE','246577',jdecode('TOPS'),jdecode(''),'/246577.html','true',[],'',''],
	['PAGE','615',jdecode('Coaching+Staff'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','57701',jdecode('Contact+us'),jdecode(''),'/57701.html','true',[],'',''],
	['PAGE','254371',jdecode('FSGBAA'),jdecode(''),'/254371.html','true',[],'',''],
	['PAGE','150201',jdecode('FSGAA'),jdecode(''),'/150201/index.html','true',[ 
		['PAGE','162201',jdecode('Meet+Info'),jdecode(''),'/150201/162201.html','true',[],'',''],
		['PAGE','254846',jdecode('Officers'),jdecode(''),'/150201/254846.html','true',[],'','']
	],'',''],
	['PAGE','151001',jdecode('FSGAA+Members'),jdecode(''),'/151001/index.html','true',[ 
		['PAGE','156901',jdecode('Minutes'),jdecode(''),'/151001/156901.html','true',[],'',''],
		['PAGE','154601',jdecode('Pictures'),jdecode(''),'/151001/154601.html','true',[],'',''],
		['PAGE','256384',jdecode('Beef+and+Beer+Pictures'),jdecode(''),'/151001/256384.html','true',[],'',''],
		['PAGE','253830',jdecode('Fundraisers'),jdecode(''),'/151001/253830.html','true',[],'','']
	],'',''],
	['PAGE','208601',jdecode('2010+FSG+Invitational'),jdecode(''),'/208601/index.html','true',[ 
		['PAGE','255308',jdecode('Pictures'),jdecode(''),'/208601/255308.html','true',[],'','']
	],'',''],
	['PAGE','255521',jdecode('Employment+'),jdecode(''),'/255521.html','true',[],'',''],
	['PAGE','269729',jdecode('PICTURE+GALLERIES-NEW%21'),jdecode(''),'/269729.html','true',[],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='52';
theSitetree.graphicsetId='57';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easy',
				paletteFamily: 	'003366',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'52',
				graphicsetId: 	'57',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-172802']={
webappId:    '1501',
documentId:  '501',
internalId:  '172802',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100721-231716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150201',
internalId:  '',
customField: '20100721-113322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '254371',
internalId:  '',
customField: '20091018-115901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20070829-103134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132701',
internalId:  '',
customField: '20100418-212358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20100519-084928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20070812-095944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20100302-094235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20091009-103551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20080901-131436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20090628-111330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20100721-121141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139301',
internalId:  '',
customField: '20100721-231453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239641',
internalId:  '',
customField: '20100302-094718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '825',
internalId:  '',
customField: '20100519-091057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140501',
internalId:  '',
customField: '20080718-220350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142601',
internalId:  '',
customField: '20091223-112226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '804',
internalId:  '',
customField: '20100519-092245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20100519-092704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17022',
internalId:  '',
customField: '20100519-092754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20100620-175423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20091009-093804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '253830',
internalId:  '',
customField: '20091212-065350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162201',
internalId:  '',
customField: '20100721-115210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151001',
internalId:  '',
customField: '20100721-113128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156901',
internalId:  '',
customField: '20100128-231913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154601',
internalId:  '',
customField: '20091018-211528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208601',
internalId:  '',
customField: '20100620-183003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '269729',
internalId:  '',
customField: '20100418-212947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246577',
internalId:  '',
customField: '20100721-225913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '255215',
internalId:  '',
customField: '20090929-085733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '254846',
internalId:  '',
customField: '20091014-222613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '255308',
internalId:  '',
customField: '20091210-121617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '255521',
internalId:  '',
customField: '20091009-143539'
};
webappMappings['7060']=webappMappings['7060-d2ff751deb4f0b39292c5c07b037aa90']={
webappId:    '7060',
documentId:  '256384',
internalId:  'd2ff751deb4f0b39292c5c07b037aa90',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '256384',
internalId:  '',
customField: '20091017-203626'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX31T';
var companyName   = '%22Where+Every+Child+is+a+Star%22';
var htmlTitle	  = 'www.firststategymnastics.com';
var metaKeywords  = 'Gymnastics%2C+first+state+gymnastics%2C+tumbling%2C+team%2C+cheer%2C+preschool%2C+team+gymnastics%2C+sports%2C+activities%2C+recreation%2C+birthday+parties%2C+summer+camp%2C+camp';
var metaContents  = 'First+State+Gymnastics';
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();
};
