/* [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','304448',jdecode('SUMMER+SCHEDULE+2011'),jdecode(''), jdecode('%2F304448.html'), 'false',[],'',''],
	['PAGE','293848',jdecode('SUMMER+CAMP+2012+NEW%21'),jdecode(''), jdecode('%2F293848.html'), 'true',[],'',''],
	['PAGE','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','552',jdecode('Our+Facilities'),jdecode(''), jdecode('%2F552.html'), 'true',[],'',''],
	['PAGE','132701',jdecode('Open+Gym'),jdecode(''), jdecode('%2F132701.html'), 'false',[],'',''],
	['PAGE','142601',jdecode('Birthday+Parties'),jdecode(''), jdecode('%2F142601.html'), 'true',[],'',''],
	['PAGE','339448',jdecode('Parent%26%23x27%3Bs+Night+Out+-+NEW'),jdecode(''), jdecode('%2F339448.html'), 'true',[],'',''],
	['PAGE','678',jdecode('Programs'),jdecode(''), jdecode('%2F678%2Findex.html'), 'true',[ 
		['PAGE','41901',jdecode('Specialty+Classes'),jdecode(''), jdecode('%2F678%2F41901.html'), 'true',[],'','']
	],'',''],
	['PAGE','762',jdecode('Recreational+Classes'),jdecode(''), jdecode('%2F762%2Findex.html'), 'true',[ 
		['PAGE','720',jdecode('Girls'),jdecode(''), jdecode('%2F762%2F720.html'), 'true',[],'',''],
		['PAGE','741',jdecode('Boys'),jdecode(''), jdecode('%2F762%2F741.html'), 'true',[],'',''],
		['PAGE','783',jdecode('Cheer+'),jdecode(''), jdecode('%2F762%2F783.html'), 'false',[],'','']
	],'',''],
	['PAGE','699',jdecode('Pre+School'),jdecode(''), jdecode('%2F699.html'), 'true',[],'',''],
	['PAGE','139301',jdecode('Class+Schedule'),jdecode(''), jdecode('%2F139301.html'), 'false',[],'',''],
	['PAGE','239641',jdecode('Online+Registration'),jdecode(''), jdecode('%2F239641.html'), 'true',[],'',''],
	['PAGE','825',jdecode('Class+Tuition+%26+Fees'),jdecode(''), jdecode('%2F825.html'), 'true',[],'',''],
	['PAGE','140501',jdecode('Forms%2C+waivers%2C+etc.'),jdecode(''), jdecode('%2F140501.html'), 'true',[],'',''],
	['PAGE','804',jdecode('Competitive+Team'),jdecode(''), jdecode('%2F804%2Findex.html'), 'true',[ 
		['PAGE','17001',jdecode('Pre+Team'),jdecode(''), jdecode('%2F804%2F17001.html'), 'true',[],'',''],
		['PAGE','17022',jdecode('Girls+Team'),jdecode(''), jdecode('%2F804%2F17022.html'), 'true',[],'',''],
		['PAGE','255215',jdecode('Boys+Team'),jdecode(''), jdecode('%2F804%2F255215.html'), 'true',[],'',''],
		['PAGE','246577',jdecode('TOPS'),jdecode(''), jdecode('%2F804%2F246577.html'), 'true',[],'','']
	],'',''],
	['PAGE','615',jdecode('Our+Great+Coaching+Staff'),jdecode(''), jdecode('%2F615.html'), 'true',[],'',''],
	['PAGE','57701',jdecode('Contact+us'),jdecode(''), jdecode('%2F57701.html'), 'true',[],'',''],
	['PAGE','254371',jdecode('FSGBAA'),jdecode(''), jdecode('%2F254371.html'), 'true',[],'',''],
	['PAGE','150201',jdecode('FSGAA'),jdecode(''), jdecode('%2F150201%2Findex.html'), 'true',[ 
		['PAGE','162201',jdecode('Meet+Info'),jdecode(''), jdecode('%2F150201%2F162201.html'), 'false',[],'','']
	],'',''],
	['PAGE','208601',jdecode('2011+FSG+Invitational+'),jdecode(''), jdecode('%2F208601.html'), 'true',[],'',''],
	['PAGE','306148',jdecode('STATE+MEET+2011'),jdecode(''), jdecode('%2F306148.html'), 'false',[],'',''],
	['PAGE','255521',jdecode('Employment+'),jdecode(''), jdecode('%2F255521.html'), 'true',[],'',''],
	['PAGE','297448',jdecode('COLLEGE+BOUND+ATHLETES'),jdecode(''), jdecode('%2F297448.html'), 'true',[],'',''],
	['PAGE','299048',jdecode('FSG+Collegiate+Athletes'),jdecode(''), jdecode('%2F299048.html'), 'true',[],'','']];
var siteelementCount=33;
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 prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
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: '20120102-124036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150201',
internalId:  '',
customField: '20111201-091510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '254371',
internalId:  '',
customField: '20110322-092757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20110713-111253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132701',
internalId:  '',
customField: '20110916-104503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20111110-104356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20101123-105825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20100824-124604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20110711-111015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20120112-103042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20120112-104250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20100928-110638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139301',
internalId:  '',
customField: '20110322-085245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239641',
internalId:  '',
customField: '20120112-104910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '825',
internalId:  '',
customField: '20120112-105507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140501',
internalId:  '',
customField: '20110529-114428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142601',
internalId:  '',
customField: '20111007-215128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '804',
internalId:  '',
customField: '20120112-113309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20120112-113955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17022',
internalId:  '',
customField: '20101112-084348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20120112-115007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20101112-085317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '299048',
internalId:  '',
customField: '20110213-210947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162201',
internalId:  '',
customField: '20111124-092359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297448',
internalId:  '',
customField: '20111110-101509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '306148',
internalId:  '',
customField: '20110324-214617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '339448',
internalId:  '',
customField: '20120112-102822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208601',
internalId:  '',
customField: '20111128-103926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '304448',
internalId:  '',
customField: '20110523-120406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246577',
internalId:  '',
customField: '20120112-114911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '255215',
internalId:  '',
customField: '20120112-114813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '293848',
internalId:  '',
customField: '20120102-121451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '255521',
internalId:  '',
customField: '20091009-143539'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
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();
};

