/* [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','801',jdecode('Home'),jdecode(''),'/801.html','true',[],'',''],
	['PAGE','10901',jdecode('Factory+News+%26+Updates%21'),jdecode(''),'/10901.html','true',[],'',''],
	['PAGE','852',jdecode('About+us'),jdecode(''),'/852/index.html','true',[ 
		['PAGE','873',jdecode('Our+Mission'),jdecode(''),'/852/873.html','true',[],'',''],
		['PAGE','894',jdecode('Our+Team'),jdecode(''),'/852/894.html','true',[],'',''],
		['PAGE','915',jdecode('Our+Facilities'),jdecode(''),'/852/915.html','true',[],'','']
	],'',''],
	['PAGE','48380',jdecode('Testimonials'),jdecode(''),'/48380.html','true',[],'',''],
	['PAGE','936',jdecode('Our+Services'),jdecode(''),'/936/index.html','true',[ 
		['PAGE','957',jdecode('Personal+Training'),jdecode(''),'/936/957.html','true',[],'',''],
		['PAGE','978',jdecode('C.H.A.O.S'),jdecode(''),'/936/978.html','true',[],'',''],
		['PAGE','78980',jdecode('Kids+Exercise+Class'),jdecode(''),'/936/78980.html','true',[],'',''],
		['PAGE','999',jdecode('Sports+Performance'),jdecode(''),'/936/999.html','true',[],'','']
	],'',''],
	['PAGE','1020',jdecode('Our+Products'),jdecode(''),'/1020/index.html','true',[ 
		['PAGE','1041',jdecode('Protein+Shakes+and+smoothies'),jdecode(''),'/1020/1041.html','true',[],'',''],
		['PAGE','1062',jdecode('Fitness+Waters'),jdecode(''),'/1020/1062.html','true',[],'',''],
		['PAGE','1083',jdecode('Protein+Bars'),jdecode(''),'/1020/1083.html','true',[],'','']
	],'',''],
	['PAGE','53580',jdecode('Blogs'),jdecode(''),'/53580.html','true',[],'',''],
	['PAGE','28648',jdecode('Photo+Album'),jdecode(''),'/28648.html','true',[],'',''],
	['PAGE','5706',jdecode('Guestbook'),jdecode(''),'/5706/index.html','true',[ 
		['PAGE','5701',jdecode('Read+Guestbook'),jdecode(''),'/5706/5701.html','false',[],'','']
	],'',''],
	['PAGE','1167',jdecode('Interesting+links'),jdecode(''),'/1167.html','true',[],'',''],
	['PAGE','22701',jdecode('Map'),jdecode(''),'/22701.html','true',[],'',''],
	['PAGE','52780',jdecode('Hours+of+Operation'),jdecode(''),'/52780.html','true',[],'',''],
	['PAGE','72880',jdecode('Contact'),jdecode(''),'/72880.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1747';
theSitetree.keyvisualName='fitness.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1747',
				keyvisualName: 	'fitness.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20100827-172753'
};
webappMappings['1002']=webappMappings['1002-5706AHW050INXSYT']={
webappId:    '1002',
documentId:  '5706',
internalId:  '5706AHW050INXSYT',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20100827-165944'
};
webappMappings['1501']=webappMappings['1501-17905']={
webappId:    '1501',
documentId:  '801',
internalId:  '17905',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '22701',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20090908-104141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20090519-183024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20100108-121102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20090503-133315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48380',
internalId:  '',
customField: '20100116-140627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '936',
internalId:  '',
customField: '20100116-140848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '957',
internalId:  '',
customField: '20090504-055823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '978',
internalId:  '',
customField: '20100827-174008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '999',
internalId:  '',
customField: '20090911-141622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1020',
internalId:  '',
customField: '20090522-062725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1041',
internalId:  '',
customField: '20090216-135811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1062',
internalId:  '',
customField: '20090908-091356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1083',
internalId:  '',
customField: '20080613-150436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1167',
internalId:  '',
customField: '20091002-111508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5706',
internalId:  '',
customField: '20090524-124104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20080613-152721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20090502-134657'
};
webappMappings['7060']=webappMappings['7060-799ba48e5e22ef4a546a97cbfe0ae5f1']={
webappId:    '7060',
documentId:  '28648',
internalId:  '799ba48e5e22ef4a546a97cbfe0ae5f1',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28648',
internalId:  '',
customField: '20090215-221730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52780',
internalId:  '',
customField: '20090625-212054'
};
webappMappings['1003']=webappMappings['1003-ahw050inxsyt12158d73912']={
webappId:    '1003',
documentId:  '53580',
internalId:  'ahw050inxsyt12158d73912',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53580',
internalId:  '',
customField: '20090519-183509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72880',
internalId:  '',
customField: '20090906-103633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78980',
internalId:  '',
customField: '20100116-141529'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSYT';
var companyName   = 'WELCOME+TO+THE+FACTORY%21';
var htmlTitle	  = 'THE+FACTORY+FITNESS+AND+PERFORMANCE+CENTER';
var metaKeywords  = 'sport-specific+training%2F+functional+training%2Fkettlebells%2Folympic+lifting%2Fplyometrics%2F+fitness%2F+personal+training%2F+circuit+training%2F+core+training%2Frehabilitation%2Fspeed%2Fagility%2Fquickness%2Fteam+sports+training%2FSANDBAGS%2FRKC%2FHAMMER+STRENGTH%2FBOOTCAMP%2FTIRE+FLIP%2FSLEDGEHAMMER%2CNSCA-CSCS%2FUSA+WEIGHTLIFTING%2FCLEAN%2FSNATCH%2FSPEED%2FAGILITY%2FPOWER%2FTRX%2FAGILITY+LADDERS%2FHURDLES%2C+JACOBS+LADDERS%2F+INDOOR+AGILITY%2FROPE+PULLS%2C+weight+loss%2C+nutrition%2C+diet%2C';
var metaContents  = 'Health+club%2Ffitness+center%2F+Stuart+%2Ftreasure+coast%2FPalm+City%2F+kettlebells%2C+Trx+suspension+trainer%2C+Functional+movement+screen%2C+sports+performance%2C+lockers%2C+palm+city%2C+jensen+beach%2C+hobe+sound%2Csandbags%2C+plyometrics%2C+bumper+plates%2Colympic+lifts%2C+sleds%2C+agility%2Cspeed%2Cpower%2C+strength%2C+personal+training%2C+boot+camp%2CBALANCE+TRAINING%2CTREADMILLS%2C+JACOBS+LADDERS%2CROPE+PULLS%2Fweight+loss%2C+nutrition%2C+diet%2Cfunctional+movement+screen%2Cseniors%2Cresistance+training%2Ccardiovascular+endurance%2C+muscular+endurance%2Ccorrective+exercises%2Ccore+strengthening%2Cflexibility%2C+non-traditional+circuit+classes%2C+quality+of+life%2C+range+of+motion%2C+';
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();
};
