/* [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','4701',jdecode('Home'),jdecode(''),'/4701.html','true',[],'',''],
	['PAGE','22501',jdecode('Contact'),jdecode(''),'/22501.html','true',[],'',''],
	['PAGE','16022',jdecode('Course+Schedule'),jdecode(''),'/16022.html','true',[],'',''],
	['PAGE','33101',jdecode('Private+Class'),jdecode(''),'/33101.html','true',[],'',''],
	['PAGE','19201',jdecode('Online+Registration+'),jdecode(''),'/19201/index.html','true',[ 
		['PAGE','25301',jdecode('Online+Registration++%28follow+up+page%29'),jdecode(''),'/19201/25301.html','false',[],'','']
	],'',''],
	['PAGE','57901',jdecode('Rates'),jdecode(''),'/57901.html','true',[],'',''],
	['PAGE','54801',jdecode('What+to+Bring'),jdecode(''),'/54801.html','true',[],'',''],
	['PAGE','22543',jdecode('Your+Instructor'),jdecode(''),'/22543.html','true',[],'',''],
	['PAGE','130733',jdecode('Testimonials'),jdecode(''),'/130733.html','true',[],'',''],
	['PAGE','170197',jdecode('Partners'),jdecode(''),'/170197.html','true',[],'',''],
	['PAGE','24801',jdecode('NJ+Safety+Manual'),jdecode(''),'/24801.html','true',[],'',''],
	['PAGE','23901',jdecode('Personal+Watercraft+'),jdecode(''),'/23901.html','true',[],'',''],
	['PAGE','25601',jdecode('Not+So+Safety+Films'),jdecode(''),'/25601.html','true',[],'',''],
	['PAGE','22522',jdecode('Boating%2FFishing+Links'),jdecode(''),'/22522.html','true',[],'',''],
	['PAGE','31801',jdecode('NJ+Nautical+Charts'),jdecode(''),'/31801.html','true',[],'',''],
	['PAGE','34401',jdecode('Q+%26+A'),jdecode(''),'/34401.html','true',[],'',''],
	['PAGE','34422',jdecode('Disclaimer'),jdecode(''),'/34422.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Draft';
theSitetree.paletteFamily='2D50A1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10399';
theSitetree.graphicsetId='10611';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='2D50A1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Draft',
				paletteFamily: 	'2D50A1',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10399',
				graphicsetId: 	'10611',
				contentColor: 	'FFFFFF',
				contentBGColor: '2D50A1',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D09868',
				e_color: 		'9E9E9F',
				f_color: 		'051E56',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20100721-075532'
};
webappMappings['7008']=webappMappings['7008-7811']={
webappId:    '7008',
documentId:  '19201',
internalId:  '7811',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22543',
internalId:  '',
customField: '20100621-084444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130733',
internalId:  '',
customField: '20100628-120101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16022',
internalId:  '',
customField: '20100721-080023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54801',
internalId:  '',
customField: '20100626-175959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33101',
internalId:  '',
customField: '20100628-120934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20100628-120211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20080320-020610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57901',
internalId:  '',
customField: '20100323-083553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20100628-120128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22522',
internalId:  '',
customField: '20100628-120609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20100308-213858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24801',
internalId:  '',
customField: '20100308-213559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20100308-214207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20100308-214802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20100308-215016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34422',
internalId:  '',
customField: '20100308-215407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170197',
internalId:  '',
customField: '20100308-215920'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSS7';
var companyName   = 'NJ+Boat+%26+PWC+Safety+Classes';
var htmlTitle	  = 'NJ+Boat+SafeLy+-+Teaching+the+New+Jersey+Boating+and+PWC+Safety+Course';
var metaKeywords  = 'atlantic+powersports%2C+Bcths%2C++beach+haven+boating%2CBeachhavenboating%2C+Boat%2C++boater+safety%2C+boaters+classes+somerset+county+nj%2C+boaters+course%2C++boaters+course+somerset+county+nj%2C+boaters+education+class+nj%2C++boaters+education+class+somerset+county+nj%2C+boaters+education+classes+somerset+county+nj%2C+Boaters+insurance%2C++boaters+insurance+nj%2C++boaters+nj%2C++boaters+safety+class+somerset+county+nj%2C++boaters+safety+course+nj%2C++boaters+safety+course+somerset+county+nj%2C++boaters+world+mays+landing+nj%2C++boaters+world+paramus+nj%2C++boaters+world+rio+grande+nj%2C++boaters+world+toms+river+nj%2C++boaterssafetycoursenj%2C++Boaterssafetynj%2C++Boatersworldmayslandingnj%2C++Boatersworldtomsrivernj%2C++boating+basics+nj%2C++boating+basics-state+boating+laws%2C++boating+insurance+nj%2C++boating+safety+class+bucks+county+pa%2C++boating+safety+class+hunterdon+county+nj%2C++boating+safety+class+mercer+county+nj%2C++boating+safety+class+mercer+county+nj%2C++boating+safety+class+middlesex+county+nj%2C++boating+safety+class+monmouth+county+nj%2C++boating+safety+class+morris+county+nj%2C++boating+safety+class+somerset+county%2C++boating+safety+class+union+county+nj%2C++boating+safety+class+warren+county+nj%2C++boating+safety+classes+bucks+county+pa%2C++boating+safety+classes+hunterdon+county+nj%2C++boating+safety+classes+mercer+county+nj%2C++boating+safety+classes+mercer+county+nj%2C++boating+safety+classes+middlesex+county+nj%2C++boating+safety+classes+monmouth+county+nj%2C++boating+safety+classes+morris+county+nj%2C++boating+safety+classes+somerset+county+nj%2C++boating+safety+classes+somerset+county%2C++boating+safety+classes+union+county+nj%2C++boating+safety+classes+warren+county+nj%2C++boating+safety+course+comerset+county+nj%2C++boating+safety+education+somerset+county+nj%2C++Boatingbasicsnj%2C++Boatus%2C++bogans+basin%2C++bogans+basin+nj%2C++bucks+county+technical+high+school+pa%2C++bucks+county+technical+school%2C++Fishing%2C++fishing+safety%2C++Fishingsafety%2C++Fishingsafetyclass%2C++fresh+water+fishing+nj%2C++Freshwaterfishingnj%2C++hillbilly+hall+nj%2C++hillbillyhall+nj%2C++jet+ski+safety%2C++jetskisafety%2C++langs+ski+n+scuba%2C++lightning+jacks+marina+nj%2C++maritime+laws%2C++middlesex+fire+academy+nj%2C++mj+boating+safe%2C++mj+boating%2C++mjboat%2C++mjboating%2C++mjboatingsafely%2C++mjboatsafe%2C++mjboatsafety%2C++motorboat+safety%2C++new+jersey+boat%2C++new+jersey+boating%2C++new+jersey+fishing%2C++new+jersey+state+police+-+marine+services+bureau+-+FAQs%2C++Newjerseyboat%2C++newjerseyboating%2C++newjerseyboatingsafe%2C++newjerseyboatingsafely%2C++newjerseyboatingsafety%2C++nj+boat%2C++nj+boat%2C++nj+boat+laws%2C++nj+boat+rentals%2C++nj+boat+safe%2C++nj+boat+somerset+county%2C+++nj+boat%2C++nj+boaters+insurance%2C++nj+boating%2C++nj+Boating+Basics+class%2C++nj+boating+basics%2C++nj+boating+certificate%2C++nj+boating+classes%2C++nj+boating+law%2C++nj+boating+laws++nj+boating+laws%2C++nj+boating+rules%2C++nj+boating+safely+somerset+county%2C++nj+boating+safely%2C++nj+boating+safety%2C++nj+boating+safety%2C++nj+boating+safety+class%2C++nj+boating+safety+class+somerset+county%2C++nj+boating+safety+classes%2C++nj+boating+safety+classes+bucks+county+pa%2C++nj+boating+safety+classes+hunterdon+county+nj%2C++nj+boating+safety+classes+mercer+county+nj%2C++nj+boating+safety+classes+mercer+county+nj%2C++nj+boating+safety+classes+middlesex+county+nj%2C%2C++nj+boating+safety+classes+monmouth+county+nj%2C++nj+boating+safety+classes+morris+county+nj%2C++nj+boating+safety+classes+somerset+county%2C++nj+boating+safety+classes+union+county+nj%2C++nj+boating+safety+classes+warren+county+nj++nj+boating+safety+course%2C++nj+boating+safety+course+somerset+county%2C++nj+boating+safety+education%2C++nj+boating+safety+education+somerset+county%2C++nj+boating+safety+somerset+county%2C++nj+boating+safety+somerset+county%2C++nj+boating+safety%2C++nj+boating+safety%2C++nj+fishing%2C++nj+fresh+water+fishing%2C++nj+safety+course%2C++nj+salt+water+fishing%2C++nj+saltwater+fishing%2C++NJ+state+police%2C++nj+state+police+boat%2C++nj+state+police+boater%2C++nj+state+police+boaters%2C++nj+state+police+boaters+safety%2C++nj+state+police+boaters+safety+class%2C++nj+state+police+boaters+safety+classes%2C++nj+state+police+boaters+safety+course%2C++nj+state+police+marine%2C++nj+striped+bass+fishing%2C++nj+striper%2C++nj+striper+fishing%2C++nj+trout+fishing%2C++nj+trout+season%2C++njbo%2C++Njboat%2C++njboatersafety%2C++Njboating%2C++Njboatingbasics%2C++Njboatingbasicsclass%2C++njboatingcertificate%2C+++njboatingclass%2C+++njboatingsafely%2C++njboatingsafetyeducation%2C++njboatingsafetyeducation%2C++Njboatrentals%2C++njboatsafe%2C++njboatsafely%2C++njboatsafety%2C++njsafetyclass%2C++njsafetyclasses%2C++njsafetycourse%2C++Njstriper%2C++++njstripers%2C++njtroutfishing%2C++NTSB%2C++outboard+safety%2C++paradise+cruises-nj+boating+safety+certificate%2C++power++motorsports+nj%2C++pwc+safety%2C++Reellifesportfishing%2C++Rowboat%2C++Rowboatsafety%2C++sailing+safety%2C++sailing+safety+course%2C++Sailingsafety%2C++Sailingsafetycourse%2C++sea+doo+safety%2C++seadoosafety%2C++striped+bass+nj%2C++striper+fishing+nj%2C++Stripercam%2C++surf++Turf+powersports+nj%2C++surf+fishing%2C++trout+nj%2C++water+safety%2C++watersafety%2C++watersafetyclass%2C++Waypoints%2C++xtreme+machines+nj%2C++Xtrememachinesnj%2C+nj+boat+license%2C+nj+boating+license%2C+boating+license+nj%2C+boat+license+nj%2C+nj+license%2C+boat+license%2C+dmv+boat+license%2C+nj+dmv%2CNJboat+safely%2C+NJ+Boat+Safely%2C+NJ+Boaters+Safety+Course%2C+Nj+boaters+safety+classes%2C+nj+boater+safety+education%2C+nj+boater+education%2C+nj+boater+education+serving+nj+and+pa%2C+New+jersey+boaters+safety+course%2C+new+jersey+boater+safety+classes%2C+nj+boater+education+classes%2C+private+safety+classes+nj%2C+private+boaters+safety+classes+nj%2C+boaters+safety+class+somerset+county+nj%2C+boaters+safety+course+somerset+county+nj%2C+nj+boater+safety%2C+nj+boater+safety+class+hunterdon+county+nj%2C+nj+boaters+safety+class+middlesex+county+nj%2C+nj+boaters+safety+class+Monmouth+county+nj%2C+nj+boaters+safety+class+union+county+nj%2C+nj+boaters+safety+class+warren+county+nj%2C+nj+boaters+safety+class+mercer+county+nj%2C+nj+boaters+safety+class+morris+county+nj%2C+nj+boaters+safety+class+essex+county+nj%2C+nj+boaters+safety+class+ocean+county+nj%2C++nj+boaters+safety+class+bucks+county+pa%2C+++++++';
var metaContents  = 'NJ+Boat+SafeLy+provides+boaters+with+their+mandatory+state+boating+safety+certificate+with+training+classes+throughout+New+Jersey.';
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();
};
