/* [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','14701',jdecode('Home'),jdecode(''),'/14701.html','true',[],''],
	['PAGE','16201',jdecode('About+Me'),jdecode(''),'/16201.html','true',[],''],
	['PAGE','50326',jdecode('Special+Events%21'),jdecode(''),'/50326.html','true',[],''],
	['PAGE','16001',jdecode('FAQs'),jdecode(''),'/16001.html','true',[],''],
	['PAGE','17912',jdecode('Treatment+For%3F'),jdecode(''),'/17912.html','true',[],''],
	['PAGE','21226',jdecode('WHO+Report'),jdecode(''),'/21226.html','true',[],''],
	['PAGE','18212',jdecode('Contact+Me'),jdecode(''),'/18212.html','true',[],''],
	['PAGE','43226',jdecode('Addiction%2FAbuse'),jdecode(''),'/43226/index.html','true',[ 
		['PAGE','43426',jdecode('Withdrawal+Phase'),jdecode(''),'/43226/43426.html','true',[],''],
		['PAGE','43526',jdecode('Reconstruction+Phase'),jdecode(''),'/43226/43526.html','true',[],''],
		['PAGE','43547',jdecode('Treatment'),jdecode(''),'/43226/43547.html','true',[],''],
		['PAGE','43568',jdecode('History'),jdecode(''),'/43226/43568.html','true',[],'']
	],''],
	['PAGE','24226',jdecode('Team+Against+Obesity'),jdecode(''),'/24226.html','true',[],''],
	['PAGE','24426',jdecode('Step+One'),jdecode(''),'/24426/index.html','true',[ 
		['PAGE','25526',jdecode('Water+Guidelines'),jdecode(''),'/24426/25526.html','true',[],''],
		['PAGE','25826',jdecode('Caffeinated+Drinks'),jdecode(''),'/24426/25826.html','true',[],''],
		['PAGE','26626',jdecode('Don%26%23x27%3Bt+Like+Water'),jdecode(''),'/24426/26626.html','true',[],''],
		['PAGE','26926',jdecode('No+Time+To+Drink'),jdecode(''),'/24426/26926.html','true',[],''],
		['PAGE','27126',jdecode('No+Time+For+Bathroom'),jdecode(''),'/24426/27126.html','true',[],''],
		['PAGE','31726',jdecode('Maximum+Benefit'),jdecode(''),'/24426/31726.html','true',[],''],
		['PAGE','32026',jdecode('Want+to+do+more%3F'),jdecode(''),'/24426/32026.html','true',[],'']
	],''],
	['PAGE','34226',jdecode('Step+Two'),jdecode(''),'/34226/index.html','true',[ 
		['PAGE','34526',jdecode('Fast+Food'),jdecode(''),'/34226/34526.html','true',[],''],
		['PAGE','39026',jdecode('More+fat+and+sugar'),jdecode(''),'/34226/39026.html','true',[],''],
		['PAGE','34726',jdecode('Too+Much+Chewing%3F'),jdecode(''),'/34226/34726.html','true',[],''],
		['PAGE','35326',jdecode('Food+Analysis%2C+Part+1'),jdecode(''),'/34226/35326.html','true',[],''],
		['PAGE','36326',jdecode('Food+Journal'),jdecode(''),'/34226/36326.html','true',[],'']
	],''],
	['PAGE','39826',jdecode('Step+Three'),jdecode(''),'/39826/index.html','true',[ 
		['PAGE','40226',jdecode('Why+Aerobic%3F'),jdecode(''),'/39826/40226.html','true',[],''],
		['PAGE','40426',jdecode('What+time+of+day%3F'),jdecode(''),'/39826/40426.html','true',[],''],
		['PAGE','40626',jdecode('How+To+Succeed%3F'),jdecode(''),'/39826/40626.html','true',[],''],
		['PAGE','40026',jdecode('What+Is+Aerobic%3F'),jdecode(''),'/39826/40026.html','true',[],'']
	],''],
	['PAGE','48526',jdecode('Step+Four'),jdecode(''),'/48526/index.html','true',[ 
		['PAGE','48726',jdecode('What+is+Refined%3F'),jdecode(''),'/48526/48726.html','true',[],''],
		['PAGE','49126',jdecode('Sugar+Rollercoaster'),jdecode(''),'/48526/49126.html','true',[],'']
	],''],
	['PAGE','47126',jdecode('Sustainability'),jdecode(''),'/47126/index.html','true',[ 
		['PAGE','28226',jdecode('Sustainability'),jdecode(''),'/47126/28226.html','true',[],''],
		['PAGE','35526',jdecode('Sustainability%2C+Part+2'),jdecode(''),'/47126/35526.html','true',[],''],
		['PAGE','47326',jdecode('Sustainability%2C+Part+3'),jdecode(''),'/47126/47326.html','true',[],'']
	],'']];
var siteelementCount=39;
theSitetree.topTemplateName='Round';
theSitetree.paletteFamily='CC3333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='439';
theSitetree.graphicsetId='495';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='e47272';
var theTemplate={
				name: 			'Round',
				paletteFamily: 	'CC3333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'439',
				graphicsetId: 	'495',
				contentColor: 	'FFFFFF',
				contentBGColor: 'e47272',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'e47272',
				b_color: 		'CC3333',
				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:  '14701',
internalId:  '',
customField: '20090310-175509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20090114-222814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20090107-172908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17912',
internalId:  '',
customField: '20090115-145553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18212',
internalId:  '',
customField: '20090106-171723'
};
webappMappings['7008']=webappMappings['7008-1213']={
webappId:    '7008',
documentId:  '18212',
internalId:  '1213',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21226',
internalId:  '',
customField: '20090107-173147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24226',
internalId:  '',
customField: '20090218-163714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24426',
internalId:  '',
customField: '20090218-125156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25526',
internalId:  '',
customField: '20090206-171020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25826',
internalId:  '',
customField: '20090114-223547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26626',
internalId:  '',
customField: '20090114-223643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26926',
internalId:  '',
customField: '20090114-224810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27126',
internalId:  '',
customField: '20090115-144119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28226',
internalId:  '',
customField: '20090218-171608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31726',
internalId:  '',
customField: '20090115-143207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32026',
internalId:  '',
customField: '20090115-143650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34226',
internalId:  '',
customField: '20090218-125506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34526',
internalId:  '',
customField: '20090123-170201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34726',
internalId:  '',
customField: '20090122-190249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35326',
internalId:  '',
customField: '20090122-185932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35526',
internalId:  '',
customField: '20090212-123259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36326',
internalId:  '',
customField: '20090122-182921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39026',
internalId:  '',
customField: '20090212-122115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39826',
internalId:  '',
customField: '20090221-164952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40026',
internalId:  '',
customField: '20090206-223338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40226',
internalId:  '',
customField: '20090205-001355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40426',
internalId:  '',
customField: '20090205-000731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40626',
internalId:  '',
customField: '20090205-001032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43226',
internalId:  '',
customField: '20090211-233411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43426',
internalId:  '',
customField: '20090212-000900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43526',
internalId:  '',
customField: '20090213-180940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43547',
internalId:  '',
customField: '20090213-182421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43568',
internalId:  '',
customField: '20090212-205332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47126',
internalId:  '',
customField: '20090221-165446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47326',
internalId:  '',
customField: '20090221-170435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48526',
internalId:  '',
customField: '20090426-003718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48726',
internalId:  '',
customField: '20090426-004142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49126',
internalId:  '',
customField: '20090426-004358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50326',
internalId:  '',
customField: '20090428-181011'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INVUBU';
var companyName   = 'Phoenix+Acupuncture+and+Chinese+Medicine';
var htmlTitle	  = 'Phoenix+Acupuncture+Forest+Grove%2C+Oregon';
var metaKeywords  = 'Acupuncture%2C+obesity';
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();
};

