/* [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','1752',jdecode('AED+Supplies'),jdecode(''),'/1752.html','true',[],''],
	['PAGE','1773',jdecode('AED+Inspections'),jdecode(''),'/1773.html','true',[],''],
	['PAGE','3901',jdecode('Setting+up+New+Office'),jdecode(''),'/3901.html','true',[],''],
	['PAGE','1794',jdecode('Contact'),jdecode(''),'/1794.html','true',[],'']];
var siteelementCount=5;
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:  '1701',
internalId:  '',
customField: '20100623-141913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1794',
internalId:  '',
customField: '20091229-133027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1773',
internalId:  '',
customField: '20100623-141202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1752',
internalId:  '',
customField: '20100623-141758'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20100623-140527'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'APL330INZJEI';
var companyName   = 'Florida+Dental+CPR+AED+Training+Certification+Classes';
var htmlTitle	  = 'Florida+Dentist%2C+Dental+Hygienists+and+Dental+Office+Staff+-+CPR+Classes+%7C+AED+Sales++Service+%7C+Palm+Beach%2C+Martin+County%2C+South+Florida+CPR';
var metaKeywords  = 'Florida%2C+dental%2C+aed%2C+dentist%2C+aed%2C+defibrillator%2C+automatic+external+defibrillator+equipment+dental%2C+dentist%2C+Dental+Hygienists%2C+dental+cpr%2C+dental+bls+for+dentists%2C+cpr+for+dentists%2C+dentistry%2C+bls+for+dental+hygienists%2C+cpr+for+dental+hygienists%2C+bls+for+dental+assistants%2C+cpr+for+dental+assistants%2C+Dental+Assistant%2C+Hygienists%2C+DMD%2C+dds%2C+heart%2C+florida%2C+automated+external+defibrillator%2Caed%2Cdefibrillation%2Cdefibrillators%2C+CPR%2Cdefibrillators%2C+ADA%2C+cardiac+arrrest%2C+physio+control%2Cmedtronic%2C+defibrillators%2Ccardiac+science%2C+powerheart%2C+philips%2Cphillips%2C+Zoll%2Caedplus%2CAED%2B%2Clifepak%2Cdifib%2CDefibtech%2C+Lifeline%2C+ZOLL+AED+Plus%2C+Powerheart+G3%2C+Florida%2C+West+Palm+Beach%2C+Florida';
var metaContents  = 'Florida+Dentists+-+BLS+CPR+AED+training+certification+classes+for+dentists%2C+dental+hygienists%2C+and+dental+assistants.+CPR+training+classes+at+your+Florida+dental+office.++Automated+External+Defibrillator+AED+Sales++Service.++Palm+Beach++Martin+County%2C+South+Florida.++Belle+Glade%2C+South+Bay%2C+Tequesta%2C+Jupiter+Inlet+Colony%2C+Jupiter%2C+Jupiter+Island%2C+Juno+Beach%2C+Palm+Beach+Gardens%2C+North+Palm+Beach%2C+Lake+Park%2C+Riviera+Beach%2C+Palm+Beach+Shores%2C+Mangonia+Park%2C+Palm+Beach%2C+West+Palm+Beach%2C+Palm+Springs%2C+Royal+Palm+Beach%2C+Wellington%2C+Greenacres%2C+Atlantis%2C+Lake+Worth%2C+South+Palm+Beach%2C+Lantana+Manalapan%2C+Hypoluxo+Boynton+Beach++Delray+Beach%2C+Highland+Beach%2C+Boca+Raton%2C+Loxahatchee+';
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();
};

