/* [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','1701',jdecode('Home'),jdecode(''),'/1701.html','true',[],''],
	['PAGE','2801',jdecode('Why+The+CPR+School%3F'),jdecode(''),'/2801.html','true',[],''],
	['PAGE','1773',jdecode('AED+Defibrillator+Sales'),jdecode(''),'/1773.html','true',[],''],
	['PAGE','1752',jdecode('CPR+First+Aid+Training'),jdecode(''),'/1752.html','true',[],''],
	['PAGE','2822',jdecode('Hospitality+Industry'),jdecode(''),'/2822.html','true',[],''],
	['PAGE','1794',jdecode('Contact'),jdecode(''),'/1794.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Diamond';
theSitetree.paletteFamily='C5E8B1';
theSitetree.keyvisualId='6210';
theSitetree.keyvisualName='kv_6210.jpg';
theSitetree.fontsetId='11090';
theSitetree.graphicsetId='11864';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C5E8B1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Diamond',
				paletteFamily: 	'C5E8B1',
				keyvisualId: 	'6210',
				keyvisualName: 	'kv_6210.jpg',
				fontsetId: 		'11090',
				graphicsetId: 	'11864',
				contentColor: 	'000000',
				contentBGColor: 'C5E8B1',
				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:  '1701',
internalId:  '',
customField: '20100119-124804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1773',
internalId:  '',
customField: '20100118-114647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1794',
internalId:  '',
customField: '20100118-114753'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1752',
internalId:  '',
customField: '20100118-114242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20100119-124619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2822',
internalId:  '',
customField: '20100119-125507'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'APL330INZJP2';
var companyName   = 'First+Aid+CPR+AED+Training+Classes+at+Your+Business';
var htmlTitle	  = 'Fort+Myers+CPR+First+Aid+Training+Classes+-+Lee+County+AED+Defibrillator+Sales+%26+Service';
var metaKeywords  = 'Safety%2C+Medtronics%2C+AED%2C+Cardiac+Science%2C+Phillips%2C+Philips%2C+CPR%2C+Training%2C+AED%2C+First+Aid%2C+1st+aid%2C+Heart%2C+Health%2C+Safety%2C+OSHA%2C+Fort+Myers%2C+Train%2C+Instructor%2C+Instruction%2C+Defibrillator%2C+Teach%2C+School%2C+Certified%2C+AED%2C+EMT%2C+Paramedic%2C+Class%2C+Florida%2C+Jupiter%2C+Health%2C+Medical%2C+Heart+Attack%2C+Stroke%2C+Automated+External+Defibrillator%2C+Red+Cross%2C+American+Heart%2C+cardio%2C+palm+beach%2C+martin%2C+Florida%2C+Automated+External+Defibrillators%2C+cpr%2C+cpr+class%2C+cpr+training%2C+cpr+certification%2C+first+aid+training%2C+infant+cpr%2C+cpr+mask%2C+cpr+course%2C+cpr+instructions%2C+first+aid%2C+first+aid+cpr%2C++CPR+training+classes%2C+cpr%2C+first+aid+training+classes%2C+1st+aid%2C+bloodborne+pathogens%2C+blood+borne+pathogens%2C+bbp%2C+ergonomics%2C+ergonomic+training+class%2C+disaster+preparedness+training+classes%2C+earthquake+preparedness+training+classes%2C+certification%2C+osha+compliance%2C+safety+training%2C+safety+consulting%2C+safety+products%2C+safety+management%2C+safety+services%2C+CPR+training+classes%2C+cpr%2C+c.p.r.%2C+first+aid+training+classes%2C+Learn+cpr%2C+sudden+death%2C+choking%2C+stroke%2C+heart+attack%2C++aed%2C+a.e.d.%2C+business%2C+teaching%2C+health%2C+instruction%2C+giving+cpr%2C+learning+cpr%2C+rescue+breathing%2C+American+Heart%2C+National+Safety+Council%2C+Day+Care%2C+automated+external+defibrillator%2C+automated+external+defibrillation%2C+automatic+external+defibrillator%2C+safety%2C+training%2C+safety+training%2C+aed%2C+first+aid%2C+kits%2C+First+Aid%2C+industrial%2C+fundraising%2C+outdoor%2C+preparedness%2C+First+Aid+Kits%2C+First+Aid+Stations%2C+Bandages%2C+Bloodborne+Pathogen%2C+Burn+Care%2C+OSHA';
var metaContents  = 'Fort+Myers+Florida+CPR+AED+First+Aid+Safety+Training.++OSHA+approved+CPR+AED+Automated+External+Defibrillators+First+Aid+Safety+Training+class.++Florida+CPR+Safety+classes+for+Lee+County%2C+Bonita+Springs%2C+Cape+Coral%2C+Fort+Myers%2C+Sanibel+and+all+of+Florida.';
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();
};

