/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','3001',jdecode('AED+Defibrillator+Sales'),jdecode(''),'/3001.html','true',[],''],
	['PAGE','4701',jdecode('Dental+%26+Medical'),jdecode(''),'/4701.html','true',[],''],
	['PAGE','4722',jdecode('Boat+%26+Marine'),jdecode(''),'/4722.html','true',[],''],
	['PAGE','4743',jdecode('Aviation'),jdecode(''),'/4743.html','true',[],''],
	['PAGE','4101',jdecode('Why+Us%3F'),jdecode(''),'/4101.html','true',[],''],
	['PAGE','2173',jdecode('Contact+Us%3F'),jdecode(''),'/2173.html','true',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Diamond';
theSitetree.paletteFamily='BFD4ED';
theSitetree.keyvisualId='6210';
theSitetree.keyvisualName='kv_6210.jpg';
theSitetree.fontsetId='11090';
theSitetree.graphicsetId='11865';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='BFD4ED';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Diamond',
				paletteFamily: 	'BFD4ED',
				keyvisualId: 	'6210',
				keyvisualName: 	'kv_6210.jpg',
				fontsetId: 		'11090',
				graphicsetId: 	'11865',
				contentColor: 	'000000',
				contentBGColor: 'BFD4ED',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20091229-130320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20100211-042538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20100111-144501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20100123-142921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20100123-143413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20100211-042538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4743',
internalId:  '',
customField: '20100211-042538'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'APL330INZJE8';
var companyName   = 'CPR+AED+First+Aid+Training+Classes+in+Florida';
var htmlTitle	  = 'West+Palm+Beach+Florida+CPR+AED+First+Aid+Safety+Training+Classes+%7CAmericna+Heart+Association+CPR+First+Aid';
var metaKeywords  = 'american+heart%2C+florida%2C+cpr%2C+aed%2C+bls%2C+FL%2C+class%2C+train%2C+training%2C+classes%2C+certification%2C+american%2C+red+cross%2C+ashi%2C+courses%2C+defibrillators%2C+aeds%2C+defibrillator%2C+class%2C+philips+aeds+onsite%2C+Cardiac%2C+Cardiac+Science%2C+CPR%2C+Cardio%2C+medtronic%2C+zoll%2C+phillips%2C+american+heart%2C+aha%2C+jupiter%2C+tequesta%2C+fort+lauderdale%2C+Ft.+Lauderdale%2C+miami%2C+delray%2C+boynton%2C+port+saint+lucie%2C+stuart%2C+broward%2C+weston%2C+wellington%2C+royal+palm+beach%2C+lake+worth%2C+lantana%2C+orlando%2C+tampa%2C+wellington%2C+west+palm+beach%2C+central%2C+fl%2C+coral+gables%2C+pemproke+pines%2C+tampa%2C+jacksonville%2C+boca+raton%2C+emergency%2C+medical%2C+direction%2C+hotels%2C+golf%2C+club%2C+church%2C+fitness%2C+personal+trainers%2C+athletic%2C+center%2C+clinic%2C+condo%2C+hospital%2C+yacht%2C+captain%2C+infant%2C+child%2C+baby%2C+parent%2C+babies%2C+Atlantis%2C+Belle+Glade%2C+Boca+Raton%2C++Boynton+Beach%2C+Briny+Breezes%2C++Bryant%2C+Canal+Point%2C+Cloud+Lake%2C+Delray+Beach%2C+Glen+Ridge%2C++Greenacres%2C+Gulf+Stream%2C+Haverhill%2C++Highland+Beach%2C+Hypoluxo%2C+Juno+Beach%2C+Jupiter%2C+Jupiter+Inlet+Colony%2C+Lake+Clarke+Shores%2C+Lake+Harbor%2C+Lake+Park%2C+Lake+Worth%2C+Lantana%2C++Loxahatchee%2C+Manalapan%2C+North+Palm+Beach%2C+Ocean+Ridge%2C+Pahokee%2C++Palm+Beach%2C+Palm+Beach+Gardens%2C+Palm+Beach+Shores%2C+Palm+Springs%2C+Riviera+Beach%2C+Royal+Palm+Beach%2C+Royal+Palm+Beach%2C+Singer+Island%2C+South+Bay%2C+South+Palm+Beach%2C+Tequesta%2C+Village+of+Golf%2C+Wellington%2C+West+Delray+Beach%2C+West+Palm+Beach%2C+Treasure+Coast';
var metaContents  = 'West+Palm+Beach+-+South+Florida+-+American+Heart+Association+CPR+Training+and+Certification+-+CPR+First+Aid+and+AED+Training+Classes+%7C+AED+Sales%2C+Service+and+Supplies.++CPR+First+Aid+Classes+at+your+Florida+Business+or+learn+CPR+at+our+Jupiter+FL+classroom.++Call+561-762-0500';
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();
};
