/* [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','5794',jdecode('Home'),jdecode(''),'/5794.html','true',[],''],
	['PAGE','35901',jdecode('The+Pain+Facts'),jdecode(''),'/35901.html','true',[],''],
	['PAGE','20001',jdecode('Old+vs.+New+Science'),jdecode(''),'/20001.html','true',[],''],
	['PAGE','56029',jdecode('Free+On+Line+Classes'),jdecode(''),'/56029/index.html','true',[ 
		['PAGE','35943',jdecode('%231+-+Amazing+You'),jdecode(''),'/56029/35943.html','true',[],''],
		['PAGE','35964',jdecode('%232+-+Basic+Neurology'),jdecode(''),'/56029/35964.html','true',[],''],
		['PAGE','64929',jdecode('%233+-+Your+Neural+Network'),jdecode(''),'/56029/64929.html','true',[],''],
		['PAGE','35922',jdecode('%234+-+The+Science+Of+Pain'),jdecode(''),'/56029/35922.html','true',[],''],
		['PAGE','35985',jdecode('%235+-+A+Closer+Look+At+Pain'),jdecode(''),'/56029/35985.html','true',[],''],
		['PAGE','50829',jdecode('%236+-+Pain+Diagnosis'),jdecode(''),'/56029/50829.html','true',[],''],
		['PAGE','50850',jdecode('%237+-+Pain+IN+Review'),jdecode(''),'/56029/50850.html','true',[],''],
		['PAGE','50934',jdecode('%238+-+New+Science+Of+Relief'),jdecode(''),'/56029/50934.html','true',[],''],
		['PAGE','65929',jdecode('%239+-+Points+to+Ponder'),jdecode(''),'/56029/65929.html','true',[],''],
		['PAGE','68129',jdecode('%2310+-+Word+to+the+Wise'),jdecode(''),'/56029/68129.html','true',[],''],
		['PAGE','69429',jdecode('%2311+-+The+Science+Of+Health'),jdecode(''),'/56029/69429.html','true',[],''],
		['PAGE','20022',jdecode('Links'),jdecode(''),'/56029/20022.html','true',[],'']
	],''],
	['PAGE','54129',jdecode('Neuroplastic+Pain'),jdecode(''),'/54129/index.html','true',[ 
		['PAGE','56729',jdecode('New+Science+of+Relief+Blog'),jdecode(''),'/54129/56729.html','true',[],'']
	],''],
	['PAGE','42401',jdecode('Products'),jdecode(''),'/42401/index.html','true',[ 
		['PAGE','72240',jdecode('10+Weeks+to+Cervical+Pain+Relief'),jdecode(''),'/42401/72240.html','true',[],''],
		['PAGE','72261',jdecode('10+Weeks+to++Lumbar+Pain+Relief'),jdecode(''),'/42401/72261.html','true',[],''],
		['PAGE','72282',jdecode('10+Weeks+to+Headache+Relief'),jdecode(''),'/42401/72282.html','true',[],''],
		['PAGE','72440',jdecode('10+Weeks+to+Shoulder+Pain+Relief'),jdecode(''),'/42401/72440.html','true',[],''],
		['PAGE','72461',jdecode('10+Weeks+to+Hip+Pain+Relief'),jdecode(''),'/42401/72461.html','true',[],''],
		['PAGE','72482',jdecode('10+Weeks+to+Knee+Pain+Relief'),jdecode(''),'/42401/72482.html','true',[],''],
		['PAGE','72503',jdecode('10+Weeks+to+Wrist+Pain+Relief'),jdecode(''),'/42401/72503.html','true',[],''],
		['PAGE','73940',jdecode('10+Weeks+to+Osteoarthritis+Relief'),jdecode(''),'/42401/73940.html','true',[],''],
		['PAGE','73961',jdecode('10+Weeks+to+Rheumatoid+Arthritis+Relief'),jdecode(''),'/42401/73961.html','true',[],''],
		['PAGE','75340',jdecode('10+Weeks+to+Disc+Pain+Relief'),jdecode(''),'/42401/75340.html','true',[],''],
		['PAGE','72303',jdecode('What+is+causing+my+PAIN%3F+Worksheet'),jdecode(''),'/42401/72303.html','true',[],''],
		['PAGE','71640',jdecode('10+Weeks+to+Fibromyalgia+Pain+Relief'),jdecode(''),'/42401/71640.html','true',[],''],
		['PAGE','72840',jdecode('Doctors+Tool+Box'),jdecode(''),'/42401/72840.html','true',[],'']
	],'']];
var siteelementCount=32;
theSitetree.topTemplateName='Multimedia';
theSitetree.paletteFamily='3D464F';
theSitetree.keyvisualId='11366';
theSitetree.keyvisualName='kv_11366.jpg';
theSitetree.fontsetId='32003';
theSitetree.graphicsetId='13835';
theSitetree.contentColor='000F1F';
theSitetree.contentBGColor='3D464F';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Multimedia',
				paletteFamily: 	'3D464F',
				keyvisualId: 	'11366',
				keyvisualName: 	'kv_11366.jpg',
				fontsetId: 		'32003',
				graphicsetId: 	'13835',
				contentColor: 	'000F1F',
				contentBGColor: '3D464F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5794',
internalId:  '',
customField: '20090728-154828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42401',
internalId:  '',
customField: '20090508-161140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20090508-164254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20022',
internalId:  '',
customField: '20090522-171433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20090508-163911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35922',
internalId:  '',
customField: '20090221-110623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35943',
internalId:  '',
customField: '20090221-102645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35964',
internalId:  '',
customField: '20090218-125100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35985',
internalId:  '',
customField: '20090220-183409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50850',
internalId:  '',
customField: '20090530-092459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71640',
internalId:  '',
customField: '20090507-155039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50829',
internalId:  '',
customField: '20090218-142846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65929',
internalId:  '',
customField: '20090227-225921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68129',
internalId:  '',
customField: '20090228-213419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64929',
internalId:  '',
customField: '20090220-181923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50934',
internalId:  '',
customField: '20090223-190207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54129',
internalId:  '',
customField: '20090530-092627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56029',
internalId:  '',
customField: '20090530-092235'
};
webappMappings['7050']=webappMappings['7050-7555']={
webappId:    '7050',
documentId:  '56729',
internalId:  '7555',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56729',
internalId:  '',
customField: '20090130-172528'
};
webappMappings['7008']=webappMappings['7008-13035']={
webappId:    '7008',
documentId:  '5794',
internalId:  '13035',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69429',
internalId:  '',
customField: '20090228-085801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72240',
internalId:  '',
customField: '20090507-155516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72261',
internalId:  '',
customField: '20090507-155516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72282',
internalId:  '',
customField: '20090507-155516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72440',
internalId:  '',
customField: '20090507-155752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72461',
internalId:  '',
customField: '20090507-155752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72482',
internalId:  '',
customField: '20090507-155752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72503',
internalId:  '',
customField: '20090507-155752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72303',
internalId:  '',
customField: '20090507-155516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72840',
internalId:  '',
customField: '20090507-162412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73940',
internalId:  '',
customField: '20090508-114110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73961',
internalId:  '',
customField: '20090508-114110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75340',
internalId:  '',
customField: '20090508-154945'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INE2O4';
var companyName   = 'The+New+Science+Of+Pain+Relief';
var htmlTitle	  = '';
var metaKeywords  = 'Chronic+pain%2C+Atlanta%2C+pain+relief%2C+self+help%2C+find+Atlanta+doctor%2C+Chiropractic%2C+pain+management%2C+physical+therapy%2C+doctor%2C+chiropractor%2C+chronic+pain+relief%2C+pain+science%2C+neuroplastic+pain%2C+pain+physiology%2C+the+physiology+of+pain.+';
var metaContents  = 'Atlanta+Chronic+Pain+Relief+Programs%2C+based+in+Stone+Mountain+Georgia+just+out+side+Atlanta.+Chiropractic%2C+pain+management%2C+physical+therapy%2C+doctor.+';
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();
};

