/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],''],
	['PAGE','1952',jdecode('23%22+Chamber'),jdecode(''),'/1952.html','true',[],''],
	['PAGE','1973',jdecode('28%22+Chamber'),jdecode(''),'/1973.html','true',[],''],
	['PAGE','1994',jdecode('40%22+Chamber'),jdecode(''),'/1994.html','true',[],''],
	['PAGE','24601',jdecode('40%22+Vertical+Chamber'),jdecode(''),'/24601.html','true',[],''],
	['PAGE','2015',jdecode('60%22+Vertical+Chamber'),jdecode(''),'/2015.html','true',[],''],
	['PAGE','2036',jdecode('Chamber+Features'),jdecode(''),'/2036.html','true',[],''],
	['PAGE','2057',jdecode('Chamber+Accessories'),jdecode(''),'/2057.html','true',[],''],
	['PAGE','2078',jdecode('Financing+%26+Leasing'),jdecode(''),'/2078.html','true',[],''],
	['PAGE','2099',jdecode('Medical+Professionals'),jdecode(''),'/2099.html','true',[],''],
	['PAGE','2120',jdecode('Professional+Athletes'),jdecode(''),'/2120.html','true',[],''],
	['PAGE','2141',jdecode('HBOT+Research'),jdecode(''),'/2141.html','true',[],''],
	['PAGE','2162',jdecode('HBOT+Glossary'),jdecode(''),'/2162.html','true',[],''],
	['PAGE','2183',jdecode('Photo+Gallery'),jdecode(''),'/2183.html','true',[],''],
	['PAGE','2401',jdecode('FAQ'),jdecode(''),'/2401.html','true',[],''],
	['PAGE','2422',jdecode('Links'),jdecode(''),'/2422.html','true',[],''],
	['PAGE','2443',jdecode('About+Us'),jdecode(''),'/2443.html','true',[],''],
	['PAGE','2464',jdecode('Contact+Us'),jdecode(''),'/2464.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Tide';
theSitetree.paletteFamily='314EB6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='13623';
theSitetree.graphicsetId='12065';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Tide',
				paletteFamily: 	'314EB6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'13623',
				graphicsetId: 	'12065',
				contentColor: 	'FFFFFF',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-9660']={
webappId:    '7050',
documentId:  '2183',
internalId:  '9660',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100721-054119'
};
webappMappings['7008']=webappMappings['7008-16767']={
webappId:    '7008',
documentId:  '1952',
internalId:  '16767',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-16768']={
webappId:    '7008',
documentId:  '1973',
internalId:  '16768',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-16769']={
webappId:    '7008',
documentId:  '1994',
internalId:  '16769',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-16770']={
webappId:    '7008',
documentId:  '2015',
internalId:  '16770',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-16771']={
webappId:    '7008',
documentId:  '2078',
internalId:  '16771',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-16772']={
webappId:    '7008',
documentId:  '2464',
internalId:  '16772',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20100716-045530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1973',
internalId:  '',
customField: '20100716-045718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1994',
internalId:  '',
customField: '20100721-035010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2015',
internalId:  '',
customField: '20100722-043531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2036',
internalId:  '',
customField: '20100721-054230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2057',
internalId:  '',
customField: '20100721-070051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2078',
internalId:  '',
customField: '20091019-015013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2099',
internalId:  '',
customField: '20100721-051716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2120',
internalId:  '',
customField: '20100518-233201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2141',
internalId:  '',
customField: '20100326-060018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2162',
internalId:  '',
customField: '20100518-052739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2183',
internalId:  '',
customField: '20100518-233406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20100701-054820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2422',
internalId:  '',
customField: '20100518-233532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2443',
internalId:  '',
customField: '20100518-233702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2464',
internalId:  '',
customField: '20100518-234008'
};
webappMappings['7008']=webappMappings['7008-16773']={
webappId:    '7008',
documentId:  '1901',
internalId:  '16773',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-26904']={
webappId:    '7008',
documentId:  '2141',
internalId:  '26904',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-29935']={
webappId:    '7008',
documentId:  '24601',
internalId:  '29935',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20100722-042523'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN38SW';
var companyName   = 'Healing+Dives+Portable+Hyperbaric+Chambers';
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();
};
