/* [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','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],''],
	['PAGE','1473',jdecode('AED+Defibrillator+Sales'),jdecode(''),'/1473.html','true',[],''],
	['PAGE','7801',jdecode('Assisted+Living+ALF'),jdecode(''),'/7801.html','true',[],''],
	['PAGE','5101',jdecode('Boats+Captains+%26+Ships+Crew'),jdecode(''),'/5101.html','true',[],''],
	['PAGE','1452',jdecode('Country+Clubs+%26+Golf+Courses'),jdecode(''),'/1452.html','true',[],''],
	['PAGE','5122',jdecode('Medical+%26+Dental'),jdecode(''),'/5122.html','true',[],''],
	['PAGE','6201',jdecode('Schools+%26+Child+Care'),jdecode(''),'/6201.html','true',[],''],
	['PAGE','1494',jdecode('Contact+Us'),jdecode(''),'/1494.html','true',[],'']];
var siteelementCount=8;
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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20100916-101518'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1452',
internalId:  '',
customField: '20100108-151943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1473',
internalId:  '',
customField: '20100916-102314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1494',
internalId:  '',
customField: '20100108-152844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20100916-110220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20100916-095712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20100210-130909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20100916-111828'
};
var canonHostname = 'cm4all01.carrierzone.com';
var accountId     = 'APL330INZJEX';
var companyName   = 'The+CPR+School+-+Florida%27s+%231+CPR+Safety+Company';
var htmlTitle	  = 'American+Heart+Association+CPR+BLS+AED+First+Aid+Certification+Classes+%7C+Palm+Beach%3B+South+Florida+CPR+Training+Classes';
var metaKeywords  = 'CPR%2C+Florida%2C+SCA%2C+Red+Cross%2C+American+Heart+Association%2C+Cardiac+Arrest%2C+Class%2C+Training%2C+American+Heart%2C+Florida%2C+CPR%2C+AED%2C+FIRST+AID%2C+TRAINING%2C+CLASS%2C+cpr%2C+c.p.r.+chocking%2C+heart%2C+training+center%2C+certification%2C+recertify%2C+recertification%2C+re-certify%2C+re-certification%2C+american%2C+red%2C+cross%2C+medical%2C+cpr+mask%2C+palm+beach%2C+martin%2C+St.+lucie%2C+broward%2C+miami%2C+dade%2C+west+palm%2C+lauderdale%2C+teach%2C+teacher%2C+med%2C+EMT%2C+instruction%2C+heart%2C+attack%2C+bleed%2C+trauma%2C+ambulance%2C+hospital%2C+hurricanes%2C+FL%2C+South%2C+Jupiter%2C+Tequesta%2C+OSHA%2C+Rick%2C+Safety%2C+Risk+Manager%2C+hurricane%2C+cpr+training%2C+cpr%2C+school%2C+aed%2C+first+aid%2C+medic%2C+emt%2C+train%2C+instructor%2C+florida%2C+red+cross%2C+american+heart%2C+heart%2C+heart+attack%2C+cpr%2C+school%2C+college%2C+nursing%2C+med%2C+emt%2C+certification%2C+train%2C+construction%2C+osha%2C+class%2C+jupiter%2C+florida+palm+beach%2C+osha%2C+risk%2C+manager%2C+management%2C+training%2C+trainer%2C+class%2C+classes%2C+osha%2C+risk%2C+injury%2C+safety%2C+medtronics%2C+phillips%2C+defibtech%2C+zoll%2C+stroke%2C+choke%2C+medical%2C+course%2C+trainer%2C+cardiac%2C+cardiac+science%2C+physio%2C+First+Aid%2C+Instruction%2C+AED+Training%2C+AED+Sales%2C+FL%2C+including+Miami%2C+Fort+Lauderdale%2C+Coral+Springs%2C+Boca+Raton%2C+Wellington%2C+West+Palm+Beach%2C+Jupiter%2C+Stuart%2C+Fort+Pierce%2C+Hollywood+and+Delray+Beach.';
var metaContents  = 'Florida+CPR+Certification+Training+Classes+-+American+Heart+Association+CPR+First+Aid+Certification+recertification.++CPR%2C+First+Aid+and+AED+Training.++Call+to+schedule+your+CPR%2C+First+Aid+and+AED+Training+class+covering+the+use+of+Automated+External+Defibrillators.++South+Florida+based+CPR+training+center+serving+including+Miami%2C+Fort+Lauderdale%2C+Coral+Springs%2C+Boca+Raton%2C+Wellington%2C+West+Palm+Beach%2C+Jupiter%2C+Stuart%2C+Fort+Pierce%2C+Hollywood+and+Delray+Beach.';
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();
};

