/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','9612',jdecode('News'),jdecode(''),'/9612.html','true',[],'',''],
	['PAGE','29626',jdecode('Archive+-Cover+Stories+'),jdecode(''),'/29626.html','true',[],'',''],
	['PAGE','14726',jdecode('Bayonne+Restaurant+reviews'),jdecode(''),'/14726.html','true',[],'',''],
	['PAGE','30926',jdecode('Education+Events+%26+Happenings'),jdecode(''),'/30926.html','true',[],'',''],
	['PAGE','11712',jdecode('Links'),jdecode(''),'/11712.html','true',[],'',''],
	['PAGE','25526',jdecode('Now+Playing+-+Movies+'),jdecode(''),'/25526.html','true',[],'',''],
	['PAGE','35326',jdecode('SPORTS+'),jdecode(''),'/35326.html','true',[],'',''],
	['PAGE','45526',jdecode('Ringwise+-Scott+Yaniga+Boxing'),jdecode(''),'/45526.html','true',[],'',''],
	['PAGE','43726',jdecode('Hudson+Health+Briefs'),jdecode(''),'/43726.html','true',[],'',''],
	['PAGE','45226',jdecode('Decor+'),jdecode(''),'/45226.html','true',[],'',''],
	['PAGE','46126',jdecode('Bayonne%26%23x27%3Bs+Interesting+People'),jdecode(''),'/46126.html','true',[],'',''],
	['PAGE','33026',jdecode('Recipes+-+Dining+In'),jdecode(''),'/33026.html','true',[],'',''],
	['PAGE','32726',jdecode('Stargazine+-+Horoscope+'),jdecode(''),'/32726.html','true',[],'',''],
	['PAGE','46426',jdecode('Recreation%2F+Tourism+Bayonne'),jdecode(''),'/46426.html','true',[],'',''],
	['PAGE','26226',jdecode('Bayonne+Transportation'),jdecode(''),'/26226.html','true',[],'',''],
	['PAGE','27626',jdecode('Real+Estate'),jdecode(''),'/27626.html','true',[],'',''],
	['PAGE','9901',jdecode('Place+an+ad'),jdecode(''),'/9901.html','true',[],'',''],
	['PAGE','28826',jdecode('Subscripitons'),jdecode(''),'/28826.html','true',[],'',''],
	['PAGE','22926',jdecode('About+us+'),jdecode(''),'/22926.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Business';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='2492';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='418';
theSitetree.graphicsetId='463';
theSitetree.contentColor='020E66';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Business',
				paletteFamily: 	'003366',
				keyvisualId: 	'2492',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'418',
				graphicsetId: 	'463',
				contentColor: 	'020E66',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100512-102509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29626',
internalId:  '',
customField: '20090406-232554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30926',
internalId:  '',
customField: '20090621-090458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27626',
internalId:  '',
customField: '20090624-173543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22926',
internalId:  '',
customField: '20090404-161116'
};
webappMappings['1002']=webappMappings['1002-25526ahw050in2976']={
webappId:    '1002',
documentId:  '25526',
internalId:  '25526ahw050in2976',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25526',
internalId:  '',
customField: '20090622-062328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26226',
internalId:  '',
customField: '20090404-194735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9612',
internalId:  '',
customField: '20090721-220002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20090513-230550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11712',
internalId:  '',
customField: '20090409-070411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14726',
internalId:  '',
customField: '20090711-235343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28826',
internalId:  '',
customField: '20090406-214015'
};
webappMappings['7008']=webappMappings['7008-2789']={
webappId:    '7008',
documentId:  '28826',
internalId:  '2789',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32726',
internalId:  '',
customField: '20090411-212231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33026',
internalId:  '',
customField: '20090421-220712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35326',
internalId:  '',
customField: '20090721-213641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43726',
internalId:  '',
customField: '20090721-220358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45226',
internalId:  '',
customField: '20090513-233050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45526',
internalId:  '',
customField: '20090517-095015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46126',
internalId:  '',
customField: '20090601-071618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46426',
internalId:  '',
customField: '20090506-233339'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2976';
var companyName   = 'BAYONNE+OBSERVER';
var htmlTitle	  = 'insidebayonne.com';
var metaKeywords  = 'Bayonne%2C+news%2C+local+ln+inside+Bayonne%2C+Hudson+County%2C+Mayor+Mark+Smith%2CBayonne+High+School%2C+Marist%2C+Holy+Family+Academy%2C+Couvilman+Vincent+LoRe%2C+Bayonne+Local+Redevelopment+Agency%2C+BLRA%2C+Bayonne+Police+Department%2C+Tammy+Blanchard%2C+Sandra+Dee%2C+Arts+Factory%2CBayonne+Town+Center%2CPeninsula%2C+Bayonne+Bridge%2CChandelier+Diner%2C+Ten+East+Restaurant%2CNewark+Bay%2C+Assemblyman+Anthony+Chiappone%2C+Joe+Doria%2C+Military+Ocean+terminal%2CPorts+of+America%2CTerrence+Molloy%2C+Broadway%2C+Exit+Bayonne%2C+Chris+Piechocki%2C+River+View+Obserer%2C+Bayonne+Community+News%2C+Jersey+Journal%2C+Ron+Lier%2C+Ninos+Restaurant%2C+Bayonne+Library%2C+Chris+Patella%2C+Light+Rail%2C+Petris+Hot+Dogs%2C+Bayonne+Real+Estate%2C+Newspapers%2C+Bayonne+Observer%2C+Publisher+Joe+Calamito%2C+Ad+Vantage+Publishing+Inc.+Bayonne+Park%2C+Richard+Rutkowski%2CCongretional+Medal+of+Honor+Winner+in+Bayonne%2CBayonne+Plumbing%2C+Big+Apple%2C+Bayonne+Karate+for+Kids%2C+Martial+Arts%2C+Artist+Steve+Zelinski%2C+Waterfront%2C+Boatworks%2C+Ave+A%2C+Creative+Edge%2C+Bayonne+Fire+Department%2C+Bayonne+New+Jersey+Newspaper';
var metaContents  = 'The+Bayonne+Observer+publishes+insidebayonne.com+the+on+line+version+of+the+Bayonne+Observer+which+is+the+sister+paper+to+the+River+View+Observer+published+by+Ad+Vantage+Publishing+Inc.+insidebayonne.com++is+updated+daily+and+covers+the+Bayonne+community%2C+Sports%2C+Clubs+and+Organizations+To+submit+a+community+item+of+interest+email+jcalobserver%40aol.com';
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();
};
