/* [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','401',jdecode('HOME'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','620',jdecode('THE+TEAM'),jdecode(''),'/620/index.html','true',[ 
		['PAGE','133601',jdecode('F.E.+Boswell%2C+MSPT+'),jdecode(''),'/620/133601.html','true',[],'',''],
		['PAGE','6322',jdecode('Tom+Bunn%2C+L.Ac.'),jdecode(''),'/620/6322.html','true',[],'',''],
		['PAGE','662',jdecode('Emmey+Ripoll%2C+M.D.'),jdecode(''),'/620/662.html','true',[],'',''],
		['PAGE','95401',jdecode('Ripoll%26%23x27%3Bs+CV'),jdecode(''),'/620/95401.html','true',[],'','']
	],'',''],
	['PAGE','473',jdecode('PRACTICE+SPECTRUM'),jdecode(''),'/473/index.html','true',[ 
		['PAGE','515',jdecode('Oncological+Clinic'),jdecode(''),'/473/515.html','true',[],'',''],
		['PAGE','536',jdecode('Andropause+Clinic'),jdecode(''),'/473/536.html','true',[],'',''],
		['PAGE','76201',jdecode('Womens+Health+Clinic'),jdecode(''),'/473/76201.html','true',[],'',''],
		['PAGE','106601',jdecode('Chronic+Pelvic+Pain+Clinic'),jdecode(''),'/473/106601.html','true',[],'',''],
		['PAGE','96301',jdecode('Weight+Loss+Clinic'),jdecode(''),'/473/96301.html','true',[],'',''],
		['PAGE','102801',jdecode('Prolozone+Clinic'),jdecode(''),'/473/102801.html','true',[],'','']
	],'',''],
	['PAGE','96901',jdecode('PATIENT+INFORMATION'),jdecode(''),'/96901/index.html','true',[ 
		['PAGE','599',jdecode('Contact'),jdecode(''),'/96901/599.html','true',[],'',''],
		['PAGE','6343',jdecode('Forms'),jdecode(''),'/96901/6343.html','true',[],'',''],
		['PAGE','557',jdecode('Interesting+links'),jdecode(''),'/96901/557.html','true',[],'','']
	],'',''],
	['PAGE','105501',jdecode('HOW+TO+FIND+US'),jdecode(''),'/105501/index.html','true',[ 
		['PAGE','5601',jdecode('Driving+directions'),jdecode(''),'/105501/5601.html','true',[],'',''],
		['PAGE','22401',jdecode('Map'),jdecode(''),'/105501/22401.html','true',[],'','']
	],'',''],
	['PAGE','140901',jdecode('SEMINARS'),jdecode(''),'/140901.html','true',[],'',''],
	['PAGE','142701',jdecode('CALENDAR'),jdecode(''),'/142701.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Handout';
theSitetree.paletteFamily='A11616';
theSitetree.keyvisualId='11656';
theSitetree.keyvisualName='kv_11656.jpg';
theSitetree.fontsetId='32943';
theSitetree.graphicsetId='13991';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='A11616';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Handout',
				paletteFamily: 	'A11616',
				keyvisualId: 	'11656',
				keyvisualName: 	'kv_11656.jpg',
				fontsetId: 		'32943',
				graphicsetId: 	'13991',
				contentColor: 	'FFFFFF',
				contentBGColor: 'A11616',
				a_color: 		'FFFFFF',
				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['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5601',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '22401',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20080801-134822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20091208-165424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090326-145623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20091208-165757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96301',
internalId:  '',
customField: '20091208-171206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6322',
internalId:  '',
customField: '20080801-151645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140901',
internalId:  '',
customField: '20091216-070631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20080801-152447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95401',
internalId:  '',
customField: '20091216-070359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20091208-165730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76201',
internalId:  '',
customField: '20091208-165825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106601',
internalId:  '',
customField: '20091208-170839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102801',
internalId:  '',
customField: '20080801-150010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96901',
internalId:  '',
customField: '20090330-121534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20080723-072557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6343',
internalId:  '',
customField: '20080804-093608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20090326-145103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105501',
internalId:  '',
customField: '20080723-072704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20060313-222212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20090330-121629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133601',
internalId:  '',
customField: '20091208-165515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142701',
internalId:  '',
customField: '20091208-161415'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010IN2M2M';
var companyName   = 'Rocky+Mountain+Center+for+Advanced+Medicine';
var htmlTitle	  = 'RMCAM';
var metaKeywords  = 'Heavy+metal+detoxification%2C+andropause%2C+anti+aging%2C+iv+therapy+%2Cacupuncture%2C+intravenous+nutrition+%2C+DMSA+%2CDMPS+%2C+prolozone%2C++german+biological+medicine%2C+herbs%2C+functional+medicine%2Ctestosterone%2Cgrowth+hormone';
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();
};
