/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','457',jdecode('Our+Offices'),jdecode(''),'/457.html','true',[],'',''],
	['PAGE','478',jdecode('Docs+%26+Staff'),jdecode(''),'/478.html','true',[],'',''],
	['PAGE','499',jdecode('Clinic+hours'),jdecode(''),'/499.html','true',[],'',''],
	['PAGE','415',jdecode('New+Patient+Info'),jdecode(''),'/415.html','true',[],'',''],
	['PAGE','39301',jdecode('Chemotherapy+%26+You'),jdecode(''),'/39301.html','true',[],'',''],
	['PAGE','41801',jdecode('Links+and+Resources'),jdecode(''),'/41801/index.html','true',[ 
		['PAGE','42401',jdecode('Alternative+Medicine'),jdecode(''),'/41801/42401.html','true',[],'',''],
		['PAGE','42422',jdecode('Cancer+by+Diagnosis'),jdecode(''),'/41801/42422.html','true',[],'',''],
		['PAGE','42443',jdecode('End+of+Life+Issues'),jdecode(''),'/41801/42443.html','true',[],'',''],
		['PAGE','42464',jdecode('General'),jdecode(''),'/41801/42464.html','true',[],'',''],
		['PAGE','42485',jdecode('General+Cancer'),jdecode(''),'/41801/42485.html','true',[],'',''],
		['PAGE','42506',jdecode('Hematology'),jdecode(''),'/41801/42506.html','true',[],'',''],
		['PAGE','50201',jdecode('Patient+Support'),jdecode(''),'/41801/50201.html','true',[],'',''],
		['PAGE','42527',jdecode('Support+Groups'),jdecode(''),'/41801/42527.html','true',[],'','']
	],'',''],
	['PAGE','35001',jdecode('CHOMG+Photo+Album'),jdecode(''),'/35001.html','true',[],'',''],
	['PAGE','6743',jdecode('Disclaimer'),jdecode(''),'/6743.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Finance';
theSitetree.paletteFamily='EBF2FF';
theSitetree.keyvisualId='2724';
theSitetree.keyvisualName='arzt.jpg';
theSitetree.fontsetId='10412';
theSitetree.graphicsetId='10675';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Finance',
				paletteFamily: 	'EBF2FF',
				keyvisualId: 	'2724',
				keyvisualName: 	'arzt.jpg',
				fontsetId: 		'10412',
				graphicsetId: 	'10675',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1472']={
webappId:    '7008',
documentId:  '415',
internalId:  '1472',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-11026973']={
webappId:    '1501',
documentId:  '301',
internalId:  '11026973',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-725842b4b44cd0c907607664b8d4717d']={
webappId:    '7060',
documentId:  '35001',
internalId:  '725842b4b44cd0c907607664b8d4717d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20090811-163408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '457',
internalId:  '',
customField: '20080610-162956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '478',
internalId:  '',
customField: '20100203-151532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '499',
internalId:  '',
customField: '20081216-135453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20091015-112305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39301',
internalId:  '',
customField: '20100128-132715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41801',
internalId:  '',
customField: '20080429-120748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42401',
internalId:  '',
customField: '20081216-115921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42422',
internalId:  '',
customField: '20091217-140304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42443',
internalId:  '',
customField: '20090811-172534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42464',
internalId:  '',
customField: '20090811-172956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42485',
internalId:  '',
customField: '20091217-140535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42506',
internalId:  '',
customField: '20081111-142006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50201',
internalId:  '',
customField: '20091217-140342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42527',
internalId:  '',
customField: '20090811-173631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20080424-113600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6743',
internalId:  '',
customField: '20080429-075555'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INF1KI';
var companyName   = 'CHOMG';
var htmlTitle	  = '';
var metaKeywords  = '';
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();
};
