/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],'',''],
	['PAGE','2501',jdecode('AED+Advice'),jdecode(''),'/2501.html','true',[],'',''],
	['PAGE','2522',jdecode('AED+Program+Management+'),jdecode(''),'/2522.html','true',[],'',''],
	['PAGE','11401',jdecode('Medtronic+Physio+Control'),jdecode(''),'/11401.html','true',[],'',''],
	['PAGE','11801',jdecode('OSHA+Safety'),jdecode(''),'/11801.html','true',[],'',''],
	['PAGE','2152',jdecode('Contact'),jdecode(''),'/2152.html','true',[],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Diamond';
theSitetree.paletteFamily='E9E9BC';
theSitetree.keyvisualId='6210';
theSitetree.keyvisualName='kv_6210.jpg';
theSitetree.fontsetId='11090';
theSitetree.graphicsetId='11863';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E9E9BC';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'aplus',
  product: 'WSCSYSSSSLYTCPZ2'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Diamond',
				paletteFamily: 	'E9E9BC',
				keyvisualId: 	'6210',
				keyvisualName: 	'kv_6210.jpg',
				fontsetId: 		'11090',
				graphicsetId: 	'11863',
				contentColor: 	'000000',
				contentBGColor: 'E9E9BC',
				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: '20100420-061731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20091224-070512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20100108-163048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2522',
internalId:  '',
customField: '20100420-062243'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20111011-164211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20111011-170416'
};
var webAppHostname = 'cm4all.aplus.net:80';
var canonHostname = 'cm4all01.carrierzone.com';
var accountId     = 'APL330INZJ24';
var companyName   = 'Shocking+News+-+Florida+AED+Defibrillator+Information';
var htmlTitle	  = 'Florida+AED+-+Automated+External+Defibrillator+Information+%7C+FL+AED+Sales+and+AED+Program+Management';
var metaKeywords  = 'aed%2C+Florida%2C+ordinance%2C+home+aed%2C+buy+aed%2C+first+aid%2C+cpr%2C+aed+sale%2CLife+Line%2C+Defibtech%2C+Medtronic%2C+CR+Plus%2C++aed+training%2C+aed+sales%2C+zoll+aed%2C+aed+trainer%2C+school+aed%2C+aed+central%2C+cpr+and+aed%2C+aed+in+school%2C+aed+equipment%2C+aed+defibrillators%2C+aed+company%2C+aed+certification%2C+aed+sale%2C+aed+machine%2C+aed+phillips%2C+aed+program%2C+aed+system%2C+philips+aed%2C+powerheart+aed%2C+aed+cabinet%2C+aed+manufacturer%2C+zoll+aed+plus%2C+aed+comparison%2C+aed+purchase%2C+aed+superstore%2C+aed+use%2C+aed+medtronic%2C+aed+class%2C+aed+protocol%2C+heartstart+aed%2C+aed+course%2C+aed+supply%2C+aed+instructor%2Cwholesale%2C+retain%2C+aed+tool%2C+buy+aed%2C+aed+electronic%2C+aed+lifepak%2C+aed+heartstream%2C+aed+safety%2C+cardiac+science+aed%2C+aed+defibrillator%2C+aed+sales+training%2C+aed+pediatric%2C+aed+performance%2C+aed+used%2C+aed+price%2C+aed+device%2C+aed+lifepak+500%2C+aed+distributor%2C+aed+heartsaver%2C+portable+aed%2C+aed+unit%2C+police+aed%2C+aed+product%2C+aed+safety+source%2C+aed+american+association+heart%2C+aed+employment%2C+aed+instruction%2C+aed+pad%2C+office+aed%2C+aed+group%2C+aed+g3+powerheart%2C+aed+supplier%2C+aed+aid+cpr+first%2C+a.e.d%2C+defibrillator%2C+automated+external+defibrillator%2C+automatic+external+defibrillator%2C+portable+defibrillator%2C+heart+defibrillator%2C+automatic+defibrillator%2C+home+defibrillator%2C+phillips+defibrillator%2C+cardiac+defibrillator%2C+zoll+defibrillator%2C+biphasic+defibrillator%2C+automatic+electronic+defibrillator%2C+external+defibrillator%2C+defibrillator+grant%2C+defibrillator+information%2C+defibrillator+sale%2C+best+defibrillator+selling%2C+automated+defibrillator%2C+defibrillator+manufacturer%2C+defibrillator+training%2C+public+access+defibrillator%2C+cardio+defibrillator%2C+defibrillation+defibrillator+heart%2C+defibrillator+heartstart%2C+medtronic+defibrillator%2C+aed+automated+defibrillator+external%2C+biventricular+defibrillator%2C+defibrillator+heartstream%2C+defibrillator+price';
var metaContents  = 'Florida+-+Automated+External+Defibrillator+AED+Information.++Florida+AED+Ordinances+-+AED+Sales%2C+AED+Service%2C+AED+Pricing%2C+Program+Management%2C+Florida+AED+Consulting%2C+AED+Inspections%2C+AED+Supplies%2C+AED+Batteries+and+More.++Your+one+stop+shop+for+AEDs+and+First+Aid%2C+CPR+and+AED+Training+Classes+in+Florida.++Florida+AED+Wholesale+and+AED+Retail+Pricing+.';
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();
};

