/* [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/index.html','true',[ 
		['PAGE','48065',jdecode('Doctors+Prescribe'),jdecode(''),'/501/48065.html','true',[],'',''],
		['PAGE','48074',jdecode('Intense+Circuit+Training'),jdecode(''),'/501/48074.html','true',[],'',''],
		['PAGE','48083',jdecode('Beyond+Aerobics'),jdecode(''),'/501/48083.html','true',[],'',''],
		['PAGE','48092',jdecode('Beyone+Time+Savings'),jdecode(''),'/501/48092.html','true',[],'',''],
		['PAGE','48101',jdecode('Your+Body+Your+Home'),jdecode(''),'/501/48101.html','true',[],'','']
	],'',''],
	['PAGE','27422',jdecode('How+Quick+Gym+Helps+You'),jdecode(''),'/27422/index.html','true',[ 
		['PAGE','35801',jdecode('Who+can+benefit%3F'),jdecode(''),'/27422/35801.html','true',[],'',''],
		['PAGE','35822',jdecode('Elderly+'),jdecode(''),'/27422/35822.html','true',[],'',''],
		['PAGE','35843',jdecode('Middle+age+'),jdecode(''),'/27422/35843.html','true',[],'',''],
		['PAGE','35864',jdecode('Lose+excess+body+fat'),jdecode(''),'/27422/35864.html','true',[],'',''],
		['PAGE','35885',jdecode('Improve+Athletic+performance'),jdecode(''),'/27422/35885.html','true',[],'',''],
		['PAGE','41101',jdecode('Health+Recovery'),jdecode(''),'/27422/41101.html','true',[],'','']
	],'',''],
	['PAGE','2090',jdecode('How+Quick+Gym%2FROM+Works%3F'),jdecode(''),'/2090/index.html','true',[ 
		['PAGE','47377',jdecode('Proper+exercise+and+Health'),jdecode(''),'/2090/47377.html','true',[],'',''],
		['PAGE','47752',jdecode('The+Aerobic+Craze-a+Monumental+Mistake'),jdecode(''),'/2090/47752.html','true',[],'','']
	],'',''],
	['PAGE','14901',jdecode('Membership+Information'),jdecode(''),'/14901.html','true',[],'',''],
	['PAGE','3243',jdecode('Locations'),jdecode(''),'/3243.html','true',[],'',''],
	['PAGE','48110',jdecode('%3F+and+Various+Information'),jdecode(''),'/48110/index.html','true',[ 
		['PAGE','47743',jdecode('Articles'),jdecode(''),'/48110/47743.html','true',[],'',''],
		['PAGE','27401',jdecode('Studies+Agree'),jdecode(''),'/48110/27401.html','true',[],'',''],
		['PAGE','3201',jdecode('Quick+Gym+Q%26A'),jdecode(''),'/48110/3201.html','true',[],'',''],
		['PAGE','25901',jdecode('Testimonials'),jdecode(''),'/48110/25901.html','true',[],'',''],
		['PAGE','31201',jdecode('Exercise+Tips'),jdecode(''),'/48110/31201.html','true',[],'',''],
		['PAGE','2027',jdecode('Have+a+Question%3F'),jdecode(''),'/48110/2027.html','true',[],'',''],
		['PAGE','10101',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/48110/10101.html','false',[],'',''],
		['PAGE','14964',jdecode('Wellness'),jdecode(''),'/48110/14964.html','true',[],'',''],
		['PAGE','12601',jdecode('Direct+from+the+Doctor'),jdecode(''),'/48110/12601.html','true',[],'',''],
		['PAGE','19501',jdecode('Nutrition+Advisors'),jdecode(''),'/48110/19501.html','true',[],'',''],
		['PAGE','19522',jdecode('Doctors+Answers'),jdecode(''),'/48110/19522.html','true',[],'',''],
		['PAGE','19801',jdecode('Fast+Facts+for+Health%21+'),jdecode(''),'/48110/19801.html','true',[],'',''],
		['PAGE','21201',jdecode('Overweight+and+Obesity'),jdecode(''),'/48110/21201.html','true',[],'',''],
		['PAGE','21222',jdecode('Heart+Health'),jdecode(''),'/48110/21222.html','true',[],'',''],
		['PAGE','21243',jdecode('Antioxidants'),jdecode(''),'/48110/21243.html','true',[],'','']
	],'',''],
	['PAGE','49859',jdecode('Weight+Loss+Challenge'),jdecode(''),'/49859.html','true',[],'',''],
	['PAGE','47680',jdecode('Blog'),jdecode(''),'/47680.html','true',[],'',''],
	['PAGE','3222',jdecode('Nutrition+Products'),jdecode(''),'/3222.html','true',[],'',''],
	['PAGE','46625',jdecode('Privacy+Policy'),jdecode(''),'/46625.html','true',[],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Boston';
theSitetree.paletteFamily='4C5C9E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11066';
theSitetree.graphicsetId='11842';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='6476B8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Boston',
				paletteFamily: 	'4C5C9E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11066',
				graphicsetId: 	'11842',
				contentColor: 	'FFFFFF',
				contentBGColor: '6476B8',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48074',
internalId:  '',
customField: '20100722-163847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48065',
internalId:  '',
customField: '20100722-163624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100824-133854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20100504-123731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35885',
internalId:  '',
customField: '20081126-131536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35822',
internalId:  '',
customField: '20080320-141657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35843',
internalId:  '',
customField: '20080320-142701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35864',
internalId:  '',
customField: '20080320-142630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20080320-151120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2090',
internalId:  '',
customField: '20100722-170229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27401',
internalId:  '',
customField: '20100413-164250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27422',
internalId:  '',
customField: '20100824-134009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20080401-124632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20100715-124040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14901',
internalId:  '',
customField: '20100824-133944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3243',
internalId:  '',
customField: '20100824-140731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31201',
internalId:  '',
customField: '20080220-212456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3222',
internalId:  '',
customField: '20100607-122954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49859',
internalId:  '',
customField: '20100621-163406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2027',
internalId:  '',
customField: '20081212-154605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20070607-181236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14964',
internalId:  '',
customField: '20080220-223908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20071003-131836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20071003-131943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19522',
internalId:  '',
customField: '20071003-135315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20071003-142750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20071003-142923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21222',
internalId:  '',
customField: '20071003-143011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21243',
internalId:  '',
customField: '20071003-143046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46625',
internalId:  '',
customField: '20081212-155449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47377',
internalId:  '',
customField: '20091208-181747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47680',
internalId:  '',
customField: '20100121-181415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47743',
internalId:  '',
customField: '20100413-164528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47752',
internalId:  '',
customField: '20100309-123428'
};
webappMappings['7008']=webappMappings['7008-7809']={
webappId:    '7008',
documentId:  '2027',
internalId:  '7809',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48083',
internalId:  '',
customField: '20100722-164127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48092',
internalId:  '',
customField: '20100722-164314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48101',
internalId:  '',
customField: '20100722-164442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48110',
internalId:  '',
customField: '20100504-125203'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX388';
var companyName   = 'Quick+Gym+Utah+High+Intensity+4-Minute+Workout';
var htmlTitle	  = 'Welcome+to+Quick+Gym+Utah';
var metaKeywords  = '';
var metaContents  = '';
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();
};
