/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','473',jdecode('Defibrillators+%28AEDs%29'),jdecode(''),'/473/index.html','true',[ 
		['PAGE','7001',jdecode('Specifications'),jdecode(''),'/473/7001.html','true',[],'']
	],''],
	['PAGE','494',jdecode('resQkit+Medical+Kits'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','16201',jdecode('Traveler+Kit+Contents'),jdecode(''),'/494/16201.html','true',[],''],
		['PAGE','70601',jdecode('OCEANIC+Kit+Contents'),jdecode(''),'/494/70601.html','true',[],'']
	],''],
	['PAGE','71201',jdecode('CLAM+Medications+Tray'),jdecode(''),'/71201.html','true',[],''],
	['PAGE','71601',jdecode('24%2F7+Global+Physicians'),jdecode(''),'/71601.html','true',[],''],
	['PAGE','452',jdecode('Rescue+Training'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','4701',jdecode('Registration+%26+Schedule'),jdecode(''),'/452/4701/index.html','true',[ 
			['PAGE','28201',jdecode('Registration+%26+Schedule+%28follow+up+page%29'),jdecode(''),'/452/4701/28201.html','false',[],'']
		],'']
	],''],
	['PAGE','8901',jdecode('Conferences+%26+Shows'),jdecode(''),'/8901.html','true',[],''],
	['PAGE','75701',jdecode('NEW%21+FRES+Book+Store'),jdecode(''),'/75701.html','true',[],''],
	['PAGE','515',jdecode('Learning+Center'),jdecode(''),'/515.html','true',[],''],
	['PAGE','7801',jdecode('Contact'),jdecode(''),'/7801/index.html','true',[ 
		['PAGE','29001',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/7801/29001.html','false',[],'']
	],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Care';
theSitetree.paletteFamily='666699';
theSitetree.keyvisualId='209';
theSitetree.keyvisualName='chirug.jpg';
theSitetree.fontsetId='22';
theSitetree.graphicsetId='20';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Care',
				paletteFamily: 	'666699',
				keyvisualId: 	'209',
				keyvisualName: 	'chirug.jpg',
				fontsetId: 		'22',
				graphicsetId: 	'20',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'666699',
				b_color: 		'E8E7F1',
				c_color: 		'000000',
				d_color: 		'6A8493',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahw050inx3ot11ae9132c9b']={
webappId:    '1001',
documentId:  '4701',
internalId:  'ahw050inx3ot11ae9132c9b',
customField: ''
};
webappMappings['7005']=webappMappings['7005-77']={
webappId:    '7005',
documentId:  '515',
internalId:  '77',
customField: 'language:en;country:US;'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3ot11ae9132c9b']={
webappId:    '1001',
documentId:  '28201',
internalId:  'ahw050inx3ot11ae9132c9b',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3ot11ae94d373c']={
webappId:    '1001',
documentId:  '7801',
internalId:  'ahw050inx3ot11ae94d373c',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3ot11ae94d373c']={
webappId:    '1001',
documentId:  '29001',
internalId:  'ahw050inx3ot11ae94d373c',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090927-131406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090927-143344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20080731-152214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20080731-131836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090927-131557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20090927-131641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20091009-080334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20090927-131809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75701',
internalId:  '',
customField: '20090927-132307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70601',
internalId:  '',
customField: '20090927-131848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20090927-132227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20090927-142549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71201',
internalId:  '',
customField: '20090927-132010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20090927-100437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20080708-094117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71601',
internalId:  '',
customField: '20090927-132035'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3OT';
var companyName   = 'First+Responder+Educational+Services';
var htmlTitle	  = 'ResQkit%2C+AEDs+and+CLAM+Drug+kits+at+the+Lowest+Prices.';
var metaKeywords  = 'AI300.+ACLS.+ACLS+kits%2C+Advanced+Life+Support+Kits%2C+AED%2C+AEDs%2CAlibrandi%2C+BLS%2C+BLS+Kit%2C+Basic+Life+Support+Kit%2C+Cardiac+Life+Support%2C+Life+Support+Kit%2C+CLAM%2C+CLAM+medications+tray%2C+Defibrillator%2C+dental+emergency+kit%2C+drug+kits%2C+Emergency+medications%2C+Epi-pen%2C+First+Responder%2C+FRES%2C+FRES+CPR%2C+global+physicians%2C+Heartsine%2C+Hinman+Dental%2C+Samaritan%2C+Samaritan+PAD%2C+Samaritan+AED%2C+TJ300%2C+Automated+External+Defibrillator%2C+Basic+Life+Support%2C+traveler%2C+traveler+kit%2C+Trauma%2C+trauma+paks%2C+twin-ject%2C+FRES%2C+Newport+International+Boat+Show%2C+Ft.+Lauderdale+International+Boat+Show%2C+life+saving+equipment%2C+medical+authorization%2C+medical+emergencies%2C+medical+kits%2C+medical+intercept%2C+oceanic%2C+oceanic+acls%2C+oceanic+kit%2C+PEPFAR%2C+Yankee+Dental%2C+Boston+Dental+Show%2C+New+York+Dental+Show.+SSCA%2C+Seven+Seas+Cruising+Association%2C+Archdiocese+of+Boston%2C+Sudden+Cardiac+Arrest%2C+best+AED%2C+water+resistant+AED%2C+portable+oxygen%2C+emergency+oxygen%2C+john+alibrandi%2C+stanley+malamed%2C+malamed+drug+kit%2C+on+call%2C+on+call+international%2C+global+rescue';
var metaContents  = 'When+a+medical+emergency+strikes%2C+our+advanced+medical+kits+are+always+within+reach';
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();
};
