/* [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(''), jdecode('%2F401%2Findex.html'), 'true',[ 
		['PAGE','105501',jdecode('HOW+TO+FIND+US'),jdecode(''), jdecode('%2F401%2F105501.html'), 'true',[],'',''],
		['PAGE','178045',jdecode('Map'),jdecode(''), jdecode('%2F401%2F178045.html'), 'true',[],'',''],
		['PAGE','178066',jdecode('Directions'),jdecode(''), jdecode('%2F401%2F178066.html'), 'true',[],'','']
	],'',''],
	['PAGE','620',jdecode('THE+TEAM'),jdecode(''), jdecode('%2F620%2Findex.html'), 'true',[ 
		['PAGE','133601',jdecode('F.E.+Boswell%2C+MSPT+'),jdecode(''), jdecode('%2F620%2F133601.html'), 'true',[],'',''],
		['PAGE','6322',jdecode('Tom+Bunn%2C+L.Ac.'),jdecode(''), jdecode('%2F620%2F6322.html'), 'true',[],'',''],
		['PAGE','192145',jdecode('Lynn+Leech%2C+PT'),jdecode(''), jdecode('%2F620%2F192145.html'), 'true',[],'',''],
		['PAGE','286501',jdecode('Donna+Nikander%2C+N.P.'),jdecode(''), jdecode('%2F620%2F286501.html'), 'true',[],'',''],
		['PAGE','662',jdecode('Emilia+Ripoll%2C+M.D.'),jdecode(''), jdecode('%2F620%2F662.html'), 'true',[],'','']
	],'',''],
	['PAGE','473',jdecode('SPECIALTIES'),jdecode(''), jdecode('%2F473%2Findex.html'), 'true',[ 
		['PAGE','536',jdecode('Andropause'),jdecode(''), jdecode('%2F473%2F536.html'), 'true',[],'',''],
		['PAGE','106601',jdecode('Chronic+Pelvic+Pain'),jdecode(''), jdecode('%2F473%2F106601.html'), 'true',[],'',''],
		['PAGE','515',jdecode('Urologic+Oncology'),jdecode(''), jdecode('%2F473%2F515.html'), 'true',[],'',''],
		['PAGE','102801',jdecode('Prolozone'),jdecode(''), jdecode('%2F473%2F102801.html'), 'true',[],'',''],
		['PAGE','96301',jdecode('Weight+Loss'),jdecode(''), jdecode('%2F473%2F96301.html'), 'true',[],'',''],
		['PAGE','192045',jdecode('Wilsons+Syndrome'),jdecode(''), jdecode('%2F473%2F192045.html'), 'true',[],'',''],
		['PAGE','76201',jdecode('Womens+Health'),jdecode(''), jdecode('%2F473%2F76201.html'), 'true',[],'','']
	],'',''],
	['PAGE','96901',jdecode('PATIENT+INFO'),jdecode(''), jdecode('%2F96901%2Findex.html'), 'true',[ 
		['PAGE','599',jdecode('Contact'),jdecode(''), jdecode('%2F96901%2F599.html'), 'true',[],'',''],
		['PAGE','6343',jdecode('Forms'),jdecode(''), jdecode('%2F96901%2F6343.html'), 'true',[],'',''],
		['PAGE','557',jdecode('Interesting+links'),jdecode(''), jdecode('%2F96901%2F557.html'), 'true',[],'',''],
		['PAGE','140901',jdecode('Seminars'),jdecode(''), jdecode('%2F96901%2F140901.html'), 'true',[],'',''],
		['PAGE','142701',jdecode('Calendar'),jdecode(''), jdecode('%2F96901%2F142701.html'), 'true',[],'','']
	],'',''],
	['PAGE','246065',jdecode('INFO.+ARTICLES'),jdecode(''), jdecode('%2F246065%2Findex.html'), 'true',[ 
		['PAGE','246165',jdecode('Hormones'),jdecode(''), jdecode('%2F246065%2F246165.html'), 'true',[],'',''],
		['PAGE','246186',jdecode('Prostate'),jdecode(''), jdecode('%2F246065%2F246186.html'), 'true',[],'',''],
		['PAGE','246207',jdecode('Pelvic+pain+%2F+IC'),jdecode(''), jdecode('%2F246065%2F246207.html'), 'true',[],'',''],
		['PAGE','246228',jdecode('Cancer'),jdecode(''), jdecode('%2F246065%2F246228.html'), 'true',[],'','']
	],'',''],
	['PAGE','313512',jdecode('BLOG'),jdecode(''), jdecode('%2F313512.html'), 'true',[],'',''],
	['PAGE','316612',jdecode('WHAT+IS+NEW+%21%21%21'),jdecode(''), jdecode('%2F316612%2Findex.html'), 'true',[ 
		['PAGE','316633',jdecode('Thermography'),jdecode(''), jdecode('%2F316612%2F316633.html'), 'true',[],'',''],
		['PAGE','316654',jdecode('Dexa+scan'),jdecode(''), jdecode('%2F316612%2F316654.html'), 'true',[],'',''],
		['PAGE','316675',jdecode('Zerona'),jdecode(''), jdecode('%2F316612%2F316675.html'), 'true',[],'','']
	],'',''],
	['PAGE','335512',jdecode('WEEKLY+UPDATES'),jdecode(''), jdecode('%2F335512.html'), 'true',[],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Triangle';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='12008';
theSitetree.keyvisualName='kv_12008.jpg';
theSitetree.fontsetId='33261';
theSitetree.graphicsetId='14139';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'enom',
  product: 'WSCENOSSSLYTC210'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Triangle',
				paletteFamily: 	'000000',
				keyvisualId: 	'12008',
				keyvisualName: 	'kv_12008.jpg',
				fontsetId: 		'33261',
				graphicsetId: 	'14139',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '178045',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20111213-234727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20111213-234752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20111213-235247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20111218-163206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96301',
internalId:  '',
customField: '20111213-233928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6322',
internalId:  '',
customField: '20110911-001421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140901',
internalId:  '',
customField: '20111214-002046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20111218-123644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '316633',
internalId:  '',
customField: '20120115-154820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20111213-235752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76201',
internalId:  '',
customField: '20111214-001309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106601',
internalId:  '',
customField: '20111213-232345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102801',
internalId:  '',
customField: '20111213-235845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96901',
internalId:  '',
customField: '20111214-001521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20111214-001651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6343',
internalId:  '',
customField: '20111214-001950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20111214-002014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105501',
internalId:  '',
customField: '20110218-090544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178045',
internalId:  '',
customField: '20101223-085706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178066',
internalId:  '',
customField: '20101223-085742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133601',
internalId:  '',
customField: '20110911-001303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142701',
internalId:  '',
customField: '20111214-002132'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '178066',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192145',
internalId:  '',
customField: '20110911-001737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192045',
internalId:  '',
customField: '20111214-001021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246065',
internalId:  '',
customField: '20111214-002241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246165',
internalId:  '',
customField: '20110424-132811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246186',
internalId:  '',
customField: '20110424-135500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246207',
internalId:  '',
customField: '20110424-134327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246228',
internalId:  '',
customField: '20110427-163214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '316612',
internalId:  '',
customField: '20120115-215753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '313512',
internalId:  '',
customField: '20111219-121336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '286501',
internalId:  '',
customField: '20111218-123824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '316654',
internalId:  '',
customField: '20120115-150838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '316675',
internalId:  '',
customField: '20120115-153733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '335512',
internalId:  '',
customField: '20120130-142631'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010IN2M2M';
var companyName   = 'Rocky+Mountain+Ctr.+for+Advanced+Medicine';
var htmlTitle	  = 'RMCAM';
var metaKeywords  = 'Heavy+metal+detoxification%2C+andropause%2C+anti+aging%2C+iv+therapy+%2Cacupuncture%2C+intravenous+nutrition%2C++prolozone%2C++german+biological+medicine%2C+herbs%2C+functional+medicine%2Ctestosterone%2Cgrowth+hormone%2C+menopause%2Cbioidentical+hormone+replacement%2Cweight+loss%2C+HCG%2C+progsterone%2C+estrogen%2Cantiaging%2C+';
var metaContents  = 'RMCAM+is+dedicated+to+giving+people+alternative+and+complementary+treatment+choices+for+medical+conditions.+We+provide+therapeutic+choices+which+expand+eastern+and+western+medicine%2C+as+well+as%2C+new+therapies+proven+to+be+technologically+sound.%0A%0AWe+acknowledge+the+individuality+of+every+patient+and+cater+to+each+disease+process.+We+personalize+a+treatment+plan+to+meet+each+patient%27s+unique+medical+needs.+We+believe+this+is+the+best+way+to+make+the+patient+a+part+of+the+solution.';
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();
};

