/* [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','2201',jdecode('Xtreme+Gym+Home'),jdecode(''),'/2201.html','true',[],'',''],
	['PAGE','2252',jdecode('Pre-School+Gymnastics'),jdecode(''),'/2252.html','true',[],'',''],
	['PAGE','2273',jdecode('School+Age+Gymnastics'),jdecode(''),'/2273.html','true',[],'',''],
	['PAGE','2294',jdecode('Tumbling+Classes'),jdecode(''),'/2294.html','true',[],'',''],
	['PAGE','2315',jdecode('Dance+Classes'),jdecode(''),'/2315.html','true',[],'',''],
	['PAGE','2336',jdecode('Xtreme+Girls+Team'),jdecode(''),'/2336.html','true',[],'',''],
	['PAGE','2357',jdecode('Xtreme+Boys+Team'),jdecode(''),'/2357.html','true',[],'',''],
	['PAGE','2378',jdecode('All+Star+Cheerleading'),jdecode(''),'/2378.html','true',[],'',''],
	['PAGE','2399',jdecode('Birthday+Parties'),jdecode(''),'/2399.html','true',[],'',''],
	['PAGE','2441',jdecode('Special+Events'),jdecode(''),'/2441.html','true',[],'',''],
	['PAGE','23811',jdecode('Zumba'),jdecode(''),'/23811.html','true',[],'',''],
	['PAGE','16211',jdecode('Your+Xtreme+Staff'),jdecode(''),'/16211.html','true',[],'',''],
	['PAGE','23511',jdecode('Jobs+Available'),jdecode(''),'/23511.html','true',[],'',''],
	['PAGE','26311',jdecode('Contact+Us'),jdecode(''),'/26311.html','true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Party';
theSitetree.paletteFamily='458966';
theSitetree.keyvisualId='3519';
theSitetree.keyvisualName='kv_3519.jpg';
theSitetree.fontsetId='10723';
theSitetree.graphicsetId='10805';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='458966';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Party',
				paletteFamily: 	'458966',
				keyvisualId: 	'3519',
				keyvisualName: 	'kv_3519.jpg',
				fontsetId: 		'10723',
				graphicsetId: 	'10805',
				contentColor: 	'FFFFFF',
				contentBGColor: '458966',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'E6FFAB',
				e_color: 		'E6FFAB',
				f_color: 		'E6FFAB',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20100901-201535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20100825-193055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2273',
internalId:  '',
customField: '20100826-184119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2294',
internalId:  '',
customField: '20090814-014911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2315',
internalId:  '',
customField: '20100607-001654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2399',
internalId:  '',
customField: '20100826-184339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2336',
internalId:  '',
customField: '20100826-184128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2357',
internalId:  '',
customField: '20100607-001037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2378',
internalId:  '',
customField: '20100901-202335'
};
webappMappings['7008']=webappMappings['7008-19477']={
webappId:    '7008',
documentId:  '26311',
internalId:  '19477',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2441',
internalId:  '',
customField: '20100901-202003'
};
webappMappings['1501']=webappMappings['1501-13553476']={
webappId:    '1501',
documentId:  '2201',
internalId:  '13553476',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16211',
internalId:  '',
customField: '20100812-023755'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23511',
internalId:  '',
customField: '20100824-010027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23811',
internalId:  '',
customField: '20100820-005132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26311',
internalId:  '',
customField: '20100901-202910'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHDRV';
var companyName   = 'Xtreme+Gymnastics';
var htmlTitle	  = 'gymnastics+Poplar+Bluff%2C+MO';
var metaKeywords  = 'Xtreme+Gymnastics+Cheer+%26+Dance+Poplar+Bluff+MO';
var metaContents  = 'Xtreme+Gymnastics+Cheer+%26+Dance+Poplar+Bluff+MO';
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();
};
