/* [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','1701',jdecode('LXA+Home'),jdecode(''),'/1701.html','true',[],''],
	['PAGE','56501',jdecode('About+Us'),jdecode(''),'/56501.html','true',[],''],
	['PAGE','91901',jdecode('Contact'),jdecode(''),'/91901.html','true',[],''],
	['PAGE','91922',jdecode('Staff'),jdecode(''),'/91922.html','true',[],''],
	['PAGE','56522',jdecode('Prices'),jdecode(''),'/56522.html','true',[],''],
	['PAGE','58301',jdecode('All-Star+Teams'),jdecode(''),'/58301.html','true',[],''],
	['PAGE','91943',jdecode('Classes'),jdecode(''),'/91943.html','true',[],''],
	['PAGE','91964',jdecode('School+squads'),jdecode(''),'/91964.html','true',[],''],
	['PAGE','91985',jdecode('News'),jdecode(''),'/91985.html','true',[],''],
	['PAGE','56543',jdecode('Calendar'),jdecode(''),'/56543.html','true',[],''],
	['PAGE','92006',jdecode('Awards'),jdecode(''),'/92006.html','true',[],''],
	['PAGE','92027',jdecode('Sponsors'),jdecode(''),'/92027.html','true',[],''],
	['PAGE','56564',jdecode('Forms'),jdecode(''),'/56564.html','true',[],''],
	['PAGE','26901',jdecode('LXA+Store%26Payments'),jdecode(''),'/26901.html','true',[],''],
	['PAGE','58322',jdecode('Photo+Gallery'),jdecode(''),'/58322.html','true',[],''],
	['PAGE','7522',jdecode('LXA+Post+Office'),jdecode(''),'/7522.html','true',[],''],
	['PAGE','92048',jdecode('Spirit+%22Jamboree%22+Competition'),jdecode(''),'/92048.html','true',[],''],
	['PAGE','92069',jdecode('Guestbook'),jdecode(''),'/92069.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Natural';
theSitetree.paletteFamily='136F83';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='156';
theSitetree.graphicsetId='170';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FCFCF4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Natural',
				paletteFamily: 	'136F83',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'156',
				graphicsetId: 	'170',
				contentColor: 	'000000',
				contentBGColor: 'FCFCF4',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'136F83',
				b_color: 		'66CCFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20090825-232358'
};
webappMappings['7060']=webappMappings['7060-e040b9c52ed58b015cdc57959e450165']={
webappId:    '7060',
documentId:  '58322',
internalId:  'e040b9c52ed58b015cdc57959e450165',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58322',
internalId:  '',
customField: '20090315-212429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56501',
internalId:  '',
customField: '20090803-101916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56522',
internalId:  '',
customField: '20090803-002442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56543',
internalId:  '',
customField: '20090803-003833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56564',
internalId:  '',
customField: '20090326-091649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58301',
internalId:  '',
customField: '20090825-233653'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20090315-210941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20090803-102540'
};
webappMappings['7008']=webappMappings['7008-2428']={
webappId:    '7008',
documentId:  '7522',
internalId:  '2428',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-7448010']={
webappId:    '1501',
documentId:  '1701',
internalId:  '7448010',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-92069aendu0in2o7d']={
webappId:    '1002',
documentId:  '92069',
internalId:  '92069aendu0in2o7d',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91922',
internalId:  '',
customField: '20090803-025003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91901',
internalId:  '',
customField: '20090803-002104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91943',
internalId:  '',
customField: '20090802-233140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91964',
internalId:  '',
customField: '20090803-002523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91985',
internalId:  '',
customField: '20090803-003243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92006',
internalId:  '',
customField: '20090803-102747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92027',
internalId:  '',
customField: '20090803-102427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92048',
internalId:  '',
customField: '20090803-102932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92069',
internalId:  '',
customField: '20090803-102659'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2O7D';
var companyName   = 'Lawton+Xtreme+Athletics';
var htmlTitle	  = 'Lawton+Xtreme+Athletics+Cheerleading++More';
var metaKeywords  = 'Cheerleading%2C+Lawton%2C+OK%2C+Oklahoma%2C+gym%2C+lawton+cheerleading%2C+lawton+xtreme+athletics%2C+cheerleading%2C+tumbling%2C+dance%2C+stunting%2C+jumps';
var metaContents  = 'Cheerleading+gym+in+Lawton%2C+OK%2C+USA+with+All+Star+competetive+teams%2C+Hip+Hop+teams+and+tumbling+classes.';
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();
};
