/* [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','74',jdecode('Home'),jdecode(''), jdecode('%2F74.html'), 'true',[],'',''],
	['PAGE','95',jdecode('About+us'),jdecode(''), jdecode('%2F95.html'), 'true',[],'',''],
	['PAGE','13301',jdecode('Bicycle+Registration'),jdecode(''), jdecode('%2F13301.html'), 'true',[],'',''],
	['PAGE','14201',jdecode('Commend+An+Officer'),jdecode(''), jdecode('%2F14201.html'), 'true',[],'',''],
	['PAGE','104',jdecode('Sex+Offender+Registry'),jdecode(''), jdecode('%2F104%2Findex.html'), 'true',[ 
		['PAGE','1841',jdecode('Sex+Offenders'),jdecode(''), jdecode('%2F104%2F1841.html'), 'true',[],'','']
	],'',''],
	['PAGE','1130',jdecode('Map'),jdecode(''), jdecode('%2F1130.html'), 'true',[],'',''],
	['PAGE','1143',jdecode('Directions'),jdecode(''), jdecode('%2F1143.html'), 'true',[],'',''],
	['PAGE','1259',jdecode('Links'),jdecode(''), jdecode('%2F1259.html'), 'true',[],'',''],
	['PAGE','2068',jdecode('Press+Releases'),jdecode(''), jdecode('%2F2068%2Findex.html'), 'true',[ 
		['PAGE','29901',jdecode('Nov+7%2C+2011'),jdecode(''), jdecode('%2F2068%2F29901.html'), 'true',[],'',''],
		['PAGE','29401',jdecode('Nov+4%2C+2011'),jdecode(''), jdecode('%2F2068%2F29401.html'), 'true',[],'',''],
		['PAGE','29001',jdecode('Nov+2%2C+2011'),jdecode(''), jdecode('%2F2068%2F29001.html'), 'true',[],'',''],
		['PAGE','28601',jdecode('Oct+7%2C+2011'),jdecode(''), jdecode('%2F2068%2F28601.html'), 'true',[],'',''],
		['PAGE','28001',jdecode('Sept+21%2C+2011'),jdecode(''), jdecode('%2F2068%2F28001.html'), 'true',[],'',''],
		['PAGE','26601',jdecode('Mar+28%2C+2011'),jdecode(''), jdecode('%2F2068%2F26601.html'), 'true',[],'',''],
		['PAGE','26101',jdecode('Jan+3%2C+2011'),jdecode(''), jdecode('%2F2068%2F26101.html'), 'true',[],'',''],
		['PAGE','25301',jdecode('Dec+4%2C+2010'),jdecode(''), jdecode('%2F2068%2F25301.html'), 'true',[],'',''],
		['PAGE','24201',jdecode('Nov+8%2C+2010'),jdecode(''), jdecode('%2F2068%2F24201.html'), 'true',[],'',''],
		['PAGE','20901',jdecode('Jun+26%2C+2010'),jdecode(''), jdecode('%2F2068%2F20901.html'), 'true',[],'',''],
		['PAGE','20001',jdecode('May+7%2C+2010'),jdecode(''), jdecode('%2F2068%2F20001.html'), 'true',[],'',''],
		['PAGE','19301',jdecode('May+04%2C+2010'),jdecode(''), jdecode('%2F2068%2F19301.html'), 'true',[],'',''],
		['PAGE','15601',jdecode('Feb+2%2C+2010'),jdecode(''), jdecode('%2F2068%2F15601.html'), 'true',[],'',''],
		['PAGE','12301',jdecode('Apr+6%2C+2009'),jdecode(''), jdecode('%2F2068%2F12301.html'), 'true',[],'',''],
		['PAGE','11201',jdecode('Sep+18%2C+2008'),jdecode(''), jdecode('%2F2068%2F11201.html'), 'true',[],'',''],
		['PAGE','10101',jdecode('Jul+31%2C+2008'),jdecode(''), jdecode('%2F2068%2F10101.html'), 'true',[],'',''],
		['PAGE','8901',jdecode('Jul+7%2C+2008'),jdecode(''), jdecode('%2F2068%2F8901.html'), 'true',[],'',''],
		['PAGE','7601',jdecode('Jun+12%2C+2008+-+3'),jdecode(''), jdecode('%2F2068%2F7601.html'), 'true',[],'',''],
		['PAGE','6801',jdecode('Jun+12%2C+2008+-+2'),jdecode(''), jdecode('%2F2068%2F6801.html'), 'true',[],'',''],
		['PAGE','6301',jdecode('Jun+12%2C+2008'),jdecode(''), jdecode('%2F2068%2F6301.html'), 'true',[],'',''],
		['PAGE','3631',jdecode('Apr+1%2C+2008'),jdecode(''), jdecode('%2F2068%2F3631.html'), 'true',[],'',''],
		['PAGE','3487',jdecode('Mar+11%2C+2008'),jdecode(''), jdecode('%2F2068%2F3487.html'), 'true',[],'',''],
		['PAGE','3344',jdecode('Jan+18%2C+2008'),jdecode(''), jdecode('%2F2068%2F3344.html'), 'true',[],'',''],
		['PAGE','3271',jdecode('Jan+14%2C+2008'),jdecode(''), jdecode('%2F2068%2F3271.html'), 'true',[],'',''],
		['PAGE','3196',jdecode('Jan+07%2C+2008'),jdecode(''), jdecode('%2F2068%2F3196.html'), 'true',[],'',''],
		['PAGE','3017',jdecode('Aug+01%2C+2007'),jdecode(''), jdecode('%2F2068%2F3017.html'), 'true',[],'',''],
		['PAGE','2939',jdecode('June+6%2C+2007'),jdecode(''), jdecode('%2F2068%2F2939.html'), 'true',[],'',''],
		['PAGE','2862',jdecode('May+23%2C+2007'),jdecode(''), jdecode('%2F2068%2F2862.html'), 'true',[],'',''],
		['PAGE','2787',jdecode('May+23%2C+2007'),jdecode(''), jdecode('%2F2068%2F2787.html'), 'true',[],'',''],
		['PAGE','2695',jdecode('April+30%2C+2007'),jdecode(''), jdecode('%2F2068%2F2695.html'), 'true',[],'',''],
		['PAGE','2600',jdecode('Jan+29%2C+2007'),jdecode(''), jdecode('%2F2068%2F2600.html'), 'true',[],'',''],
		['PAGE','2523',jdecode('Nov+28%2C+2006'),jdecode(''), jdecode('%2F2068%2F2523.html'), 'true',[],'',''],
		['PAGE','2441',jdecode('Nov+28%2C+2006'),jdecode(''), jdecode('%2F2068%2F2441.html'), 'true',[],'',''],
		['PAGE','2322',jdecode('Nov+17%2C+2006'),jdecode(''), jdecode('%2F2068%2F2322.html'), 'true',[],'',''],
		['PAGE','2156',jdecode('Nov+14%2C+2006'),jdecode(''), jdecode('%2F2068%2F2156.html'), 'true',[],'',''],
		['PAGE','2077',jdecode('Nov+13%2C+2006'),jdecode(''), jdecode('%2F2068%2F2077.html'), 'true',[],'','']
	],'',''],
	['PAGE','1151',jdecode('Recognition'),jdecode(''), jdecode('%2F1151.html'), 'true',[],'',''],
	['PAGE','27101',jdecode('2010+Annual+Report'),jdecode(''), jdecode('%2F27101.html'), 'true',[],'',''],
	['PAGE','3129',jdecode('Swift911'),jdecode(''), jdecode('%2F3129.html'), 'true',[],'',''],
	['PAGE','14501',jdecode('Burglary+Prevention+Flyer'),jdecode(''), jdecode('%2F14501.html'), 'true',[],'',''],
	['PAGE','15201',jdecode('Snow+Emergency+Routes'),jdecode(''), jdecode('%2F15201.html'), 'true',[],'',''],
	['PAGE','18801',jdecode('Neighborhood+Watch'),jdecode(''), jdecode('%2F18801.html'), 'true',[],'',''],
	['PAGE','21601',jdecode('Can+You+Identify...'),jdecode(''), jdecode('%2F21601.html'), 'true',[],'',''],
	['PAGE','22701',jdecode('Counterfeit+Money+Info'),jdecode(''), jdecode('%2F22701.html'), 'true',[],'','']];
var siteelementCount=54;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='1E3A6F';
theSitetree.keyvisualId='2026';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='339';
theSitetree.graphicsetId='396';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='1E3A6F';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'optimum',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Activate',
				paletteFamily: 	'1E3A6F',
				keyvisualId: 	'2026',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'339',
				graphicsetId: 	'396',
				contentColor: 	'FFFFFF',
				contentBGColor: '1E3A6F',
				a_color: 		'1E3A6F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '74',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1130',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '1143',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74',
internalId:  '',
customField: '20120124-154610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104',
internalId:  '',
customField: '20080418-175728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1841',
internalId:  '',
customField: '20101221-214810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95',
internalId:  '',
customField: '20061011-152950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1130',
internalId:  '',
customField: '20060921-192736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1143',
internalId:  '',
customField: '20060921-192833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1259',
internalId:  '',
customField: '20110929-124219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2068',
internalId:  '',
customField: '20061211-155305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20080918-113305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20080806-112120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20080708-082613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20080623-145033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20080623-135223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20080623-141858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3631',
internalId:  '',
customField: '20080407-175840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3487',
internalId:  '',
customField: '20080312-163421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3344',
internalId:  '',
customField: '20080118-171603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3271',
internalId:  '',
customField: '20080114-212348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3196',
internalId:  '',
customField: '20080107-154213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3017',
internalId:  '',
customField: '20070814-165618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2939',
internalId:  '',
customField: '20070611-144532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2862',
internalId:  '',
customField: '20070523-170430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2787',
internalId:  '',
customField: '20070523-152308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2695',
internalId:  '',
customField: '20070430-202823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2600',
internalId:  '',
customField: '20070129-175320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2523',
internalId:  '',
customField: '20061211-155458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2441',
internalId:  '',
customField: '20061211-154539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2322',
internalId:  '',
customField: '20061117-220607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20091201-150715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2156',
internalId:  '',
customField: '20061114-183431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2077',
internalId:  '',
customField: '20061113-223241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1151',
internalId:  '',
customField: '20060921-204953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3129',
internalId:  '',
customField: '20080114-221120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20090428-084324'
};
webappMappings['7008']=webappMappings['7008-5742']={
webappId:    '7008',
documentId:  '14201',
internalId:  '5742',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20091201-155825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20100708-153530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20091219-131524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20100202-162402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21601',
internalId:  '',
customField: '20100701-165537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20100628-090309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20100319-165351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20100504-144959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20100507-102920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20101221-214447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20101108-121253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20101221-145924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20110103-102230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20110328-134149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20110602-110249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20110921-150012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20111007-153146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20111102-143303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29401',
internalId:  '',
customField: '20111104-184642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29901',
internalId:  '',
customField: '20111107-145638'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXE5U';
var companyName   = 'Long+Beach+Police+Department%2C+NY';
var htmlTitle	  = 'Long+Beach+Police+Department+-+New+York';
var metaKeywords  = 'long+beach%2C+police+department%2C+11561%2C+City+By+The+Sea%2C+Civitas+Ad+Mare%2C+nassau+county%2C+long+island%2C+LBPD%2C+community+policing%2C+sex+offender+registry%2C+long+beach+police%2C+431-1800%2C+bicycle+registration';
var metaContents  = 'The+official+site+of+the+City+of+Long+Beach%2C+New+York+Police+Department+located+at+1+West+Chester+St%2C+Long+Beach%2C+NY+11561.++Thomas+R.+Sofield%2C+Police+Commissioner.';
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();
};

