/* [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','601',jdecode('Medical+Support'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','652',jdecode('About+us'),jdecode(''), jdecode('%2F652.html'), 'true',[],'',''],
	['PAGE','694',jdecode('Services+we+provide'),jdecode(''), jdecode('%2F694%2Findex.html'), 'true',[ 
		['PAGE','715',jdecode('Cath%2FAngio'),jdecode(''), jdecode('%2F694%2F715.html'), 'true',[],'',''],
		['PAGE','736',jdecode('Angio'),jdecode(''), jdecode('%2F694%2F736.html'), 'true',[],'',''],
		['PAGE','18601',jdecode('Consulting'),jdecode(''), jdecode('%2F694%2F18601.html'), 'true',[],'','']
	],'',''],
	['PAGE','757',jdecode('Contact'),jdecode(''), jdecode('%2F757.html'), 'true',[],'',''],
	['PAGE','20501',jdecode('More+Pictures+Cath%2FAngio+Labs+'),jdecode(''), jdecode('%2F20501.html'), 'true',[],'',''],
	['PAGE','19322',jdecode('Personal+'),jdecode(''), jdecode('%2F19322.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Wave';
theSitetree.paletteFamily='E13F3F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16368';
theSitetree.graphicsetId='12121';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='E13F3F';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp19-dulles',
  product: 'WSCSYSSSSLYTCPII'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Wave',
				paletteFamily: 	'E13F3F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16368',
				graphicsetId: 	'12121',
				contentColor: 	'FFFFFF',
				contentBGColor: 'E13F3F',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'8B1C1C',
				e_color: 		'8B1C1C',
				f_color: 		'8B1C1C',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20110211-135127'
};
webappMappings['7060']=webappMappings['7060-129f28ee094c9048af493160db690baf']={
webappId:    '7060',
documentId:  '20501',
internalId:  '129f28ee094c9048af493160db690baf',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-8904605']={
webappId:    '1501',
documentId:  '601',
internalId:  '8904605',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-12995']={
webappId:    '7008',
documentId:  '601',
internalId:  '12995',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20110211-135306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20080305-170204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20080215-210807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20080305-170110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20080215-114610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20080224-143808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20080524-182055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19322',
internalId:  '',
customField: '20080524-115429'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVTVL';
var companyName   = 'Mobile+Cardiac+Cath+%2F+Angiography+Labs';
var htmlTitle	  = 'JAF+LLC+renting+mobile+angiography+and+Cardiac+Cath+Labs+for+Radiology+and+Cardiology+also+doing+business+as+MMI+Medical';
var metaKeywords  = 'Cardiac+Cath+Angiography+Trailers+Rental+Radiology+Cardiology+Hospitals+Rent+Cognitive+Alzheimers+dementia';
var metaContents  = 'Offering+Computer+testing+for+cognitive+impairment+as+well+as+hospital+rental+of+mobile+trailers+for+Radiology+and+Cardiology+doing+angiography+and+cardiac+catheterizations.++Testing+is+performed+by+the+patient+in+the+physicians+office.++Rentals+are+usually+used+during+a+replacement+construction+project+inside+the+hospital%2C+overflow+for+busy+times%2C+and+disasters.';
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();
};

