/* [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','701',jdecode('Home'),jdecode(''),'/701/index.html','true',[ 
		['PAGE','24101',jdecode('Fitness+Camps+%28p.1%29'),jdecode(''),'/701/24101.html','true',[],''],
		['PAGE','20701',jdecode('Fitness+Camps+%28p.2%29'),jdecode(''),'/701/20701.html','true',[],'']
	],''],
	['PAGE','752',jdecode('About+Fitness+Camps+.net'),jdecode(''),'/752.html','true',[],''],
	['PAGE','9006',jdecode('Weight+loss+Camp+Guestbook'),jdecode(''),'/9006.html','true',[],''],
	['PAGE','9001',jdecode('Read+Weight+loss+Camp+Guestbook'),jdecode(''),'/9001.html','false',[],''],
	['PAGE','11301',jdecode('Fitness+Camp+%26+Weight+Loss+Blog%21'),jdecode(''),'/11301.html','true',[],''],
	['PAGE','15701',jdecode('Good+in+Home+Workout'),jdecode(''),'/15701.html','true',[],''],
	['PAGE','16101',jdecode('Good+Exercise+Guidelines+'),jdecode(''),'/16101.html','true',[],''],
	['PAGE','16501',jdecode('Blood+Sugar+and+Blood+Pressure'),jdecode(''),'/16501.html','true',[],''],
	['PAGE','17101',jdecode('Eating+Earlier+in+the+Day'),jdecode(''),'/17101.html','true',[],''],
	['PAGE','17401',jdecode('Night+Eating+Syndrome+%28NES%29'),jdecode(''),'/17401.html','true',[],''],
	['PAGE','27701',jdecode('Importance+of+Fitness+Camps'),jdecode(''),'/27701.html','true',[],''],
	['PAGE','28101',jdecode('Reaching+your+Fitness+Goals'),jdecode(''),'/28101.html','true',[],''],
	['PAGE','32301',jdecode('Eating+and+Watching+TV'),jdecode(''),'/32301.html','true',[],''],
	['PAGE','29101',jdecode('Fitness+Camps+are+Great'),jdecode(''),'/29101.html','true',[],''],
	['PAGE','878',jdecode('Contact+Fitness+Camps+.net'),jdecode(''),'/878.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='FFD375';
theSitetree.keyvisualId='1984';
theSitetree.keyvisualName='mtb.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='385';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Stylus',
				paletteFamily: 	'FFD375',
				keyvisualId: 	'1984',
				keyvisualName: 	'mtb.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'385',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFD375',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20090105-181251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20080623-014330'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-9006aaplu0inly4k']={
webappId:    '1002',
documentId:  '9006',
internalId:  '9006aaplu0inly4k',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-799']={
webappId:    '7008',
documentId:  '878',
internalId:  '799',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-374']={
webappId:    '7050',
documentId:  '11301',
internalId:  '374',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20701',
internalId:  '',
customField: '20080623-014441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20080623-012118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9006',
internalId:  '',
customField: '20080613-004557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20080613-004657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20100402-214127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20080728-234453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20080729-000851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20080729-000924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20080729-024936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20080729-031703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27701',
internalId:  '',
customField: '20080729-125036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20080729-125903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20090127-211345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20080728-231640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20080623-011318'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'AAPLU0INLY4K';
var companyName   = 'www.FitnessCamps.net+Fit+Body.+Fit+Mind.';
var htmlTitle	  = 'FITNESS+CAMPS%2C+WEIGHT+LOSS+CAMPS%2C+BOOTCAMPS%2C+BOOT+CAMPS%2C+FAT+FARMS';
var metaKeywords  = 'fitness+camps%2Cfitness+camp%2Cweight+loss+camps%2Cweight+loss%2C+camp%2Ccamps%2Cweight+loss+centers%2Cboot+camp%2Cbootcamp%2Cbootcamps%2Cboot%2Cfat+farm%2Cfitness%2Ctraining%2Cfitness+program%2Cfitness+center%2Coutdoor+fitness%2Cfitness+training+camp%2Ctraining%2CMountain+Trek%2CDavis+Mountains%2CStart+Fitness%2CCamp+California%2CHilton+Head%2CAdventure+Boot+Camp%2CCamp+La+Jolla%2CJay%E2%80%99s+Boot+Camp%2Cnutrition+camp%2Cnutrition+program%2Chealthy+lifestyle';
var metaContents  = 'Come+to+www.fitnesscamps.net+to+see+the+best+of+Fitness+camps%2C+Weight+Loss+camps%2C+bootcamps%2C+boot+camps%2C+fat+farms+and+the+like+to+ensure+the+implementation+of+a+solid+weight+loss+program.';
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();
};

