// styleName = new ItemStyle(length of items, spacing after items, 'popout indicator HTML',//  popout indicator position, padding of text within item, 'out background colour or image//  filename', 'hover background colour or filename', 'out text stylesheet class', 'hover text class',//  'out border stylesheet class', 'hover border class', out opacity percentage or null to make//  it fully opaque, hover opacity percentage or null, 'CSS mouse cursor for normal items',//  'CSS cursor for sm: and blank items');var rootBar = new ItemStyle(100, 0, '', 0, 0, '', '', 'lowText', 'highText', '', '', null, null);var hBar1 = new ItemStyle(56, 0, '', 0, 0, '#1A2B3B', '#1A2B3B', 'lowText', 'highText ', '', '', null, null);var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#817A4A', '#484429', 'lowText', 'highText', 'itemBorder', 'itemBorder', 90, 100);var pMenu = new PopupMenu('pMenu');with (pMenu){// startMenu('menu name', Vertical menu (true/false)?, left, top, width, default ItemStyle//  for items in this menu, optional parent frame/window or layer in which this menu resides);// use this startMenu to center menus//startMenu('root', false, 'page.winW()/2 - pMenu.menu.root[0].menuW/2', 88, 20, rootBar); // Centres.// added an offset of -11 to centeredstartMenu('root', false, 35, 102, 20, rootBar); // Centres.// use this startMenu to position menus absolutely// startMenu('root', false, 200, 98, 20, rootBar);// addItem('Text', 'URL or menuname', 'action type', optional ItemStyle, length, spacing,//  'popout indicator', popout indicator position, etc... in the same order as ItemStyles);addItem('<a href="townhall.html"><img src="http://www.durhamme.com/images/townhallbutton.gif" width="56" height="23" border="0" alt="Town Hall"></A>', 'mTownhall', 'sm:', hBar1);startMenu('mTownhall', true, 10, 20, 160, subM);addItem("Overview", "townhall/1-overview.htm", "");addItem("Town Officials & Duties", "townhall/2-town_officials.htm", "");addItem("Town Documents", "townhall/3-town_documents.htm", "");addItem("Animal Control", "townhall/4-animal_control.htm", "");addItem("Assessor's Office", "townhall/5-assessors_office.htm", "");addItem("Code Enforcement", "townhall/6-code_enforcement.htm", "");addItem("Fire Department", "townhall/7-fire_department.htm", "");addItem("Planning Board", "townhall/8-planning_board.htm", "");// addItem("Town Officials", "/privacy.html", "");//addItem("Planning Board", "about.html", "");//addItem("Code Enforcement", "about.html", "");//addItem("Assessor&apos;s Office", "about.html", "");//addItem("Fire Department", "about.html", "");//addItem("Animal Control", "about.html", "");}// *** (3) EVENTS ***if (!isNS4){ // Write menus now in non-NS4 browsers, by calling the "Fast" mode .update(true) method. pMenu.update(true); //anotherMenu.update(true);}else{ // For Netscape 4, back up the old onload function and make a new one to update our menus. // This is the regular "Dynamic" mode menu update, it works in IE and NS6 too if required. var popOldOL = window.onload; window.onload = function() {  if (popOldOL) popOldOL();  pMenu.update();  //anotherMenu.update(); }}// Other events must be assigned, these are less complicated, just add or remove menu objects.var nsWinW = window.innerWidth, nsWinH = window.innerHeight, popOldOR = window.onresize;window.onresize = function(){ if (popOldOR) popOldOR(); if (isNS4 && (nsWinW!=innerWidth || nsWinH!=innerHeight)) history.go(0); pMenu.position(); //anotherMenu.position();}window.onscroll = function(){ pMenu.position(); //anotherMenu.position();}// NS4 can't reliably capture clicks on layers, so here's a workaround.if (isNS4){ document.captureEvents(Event.CLICK); document.onclick = function(evt) {  with (pMenu) if (overI) click(overM, overI);  //with (anotherMenu) if (overI) click(overM, overI);  return document.routeEvent(evt); }}// Activate the window.onscroll() event in non-Microsoft browsers.if (!isIE || isOp){ var nsPX=pageXOffset, nsPY=pageYOffset; setInterval('if (nsPX!=pageXOffset || nsPY!=pageYOffset) ' + '{ nsPX=pageXOffset; nsPY=pageYOffset; window.onscroll() }', 50);}// *** (4) ANIMATION ***/*function menuClip(menuObj, menuName, dir){ var mD = menuObj.menu[menuName][0]; if (!mD.timer) mD.timer = 0; if (!mD.counter) mD.counter = 0; with (mD) {  clearTimeout(timer);  if (!lyr || !lyr.ref) return;  if (dir==1) lyr.vis('visible');  lyr.sty.zIndex = 1001 + dir;  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/20),0.75) );  counter += dir;  if (counter==11) { counter = 10; if (isDOM&&!isIE) lyr.sty.clip='' }  else if (counter<0) { counter = 0; lyr.vis('hidden') }  else timer = setTimeout(menuObj.myName+'.'+(dir==1?'show':'hide')+'Menu("'+menuName+'")', 40); }}if (!window.opera){ pMenu.showMenu = new Function('mN','menuClip(pMenu, mN, 1)'); pMenu.hideMenu = new Function('mN','menuClip(pMenu, mN, -1)');}*/pMenu.onclick = function(mN, iN) { with (this){ // Do actions depending on the item that the mouse was over at the time of the click. // You may with to use nested IFs or 'switch' statements etc. if you're familiar with JS. if (mN == 'mSubsea') {  if (iN == 1) location.href = 'adcpsystems.html'; }}}// Set the status message to the URL if the 'action type' is nothing, and clear on mouseout.pMenu.onmouseover = function(mN, iN) { with (this){ // By now, you either have my JS Object Browser script from my site or you need it... try // embedding in an IFrame and typing 'pMenu' into its Go To field to see the menu internals. with (menu[mN][iN]) if (!type) status = href;}}pMenu.onmouseout = function() { status = '' }// function navMouseOver(imgid,imgnew,text)// {// 	if (navigator.appVersion.substring(0,1) >= 3)// 	{// 		document.images[imgid].src=eval(imgnew + ".src");// 		window.status=text;// 	}// }// 	logina      = new Image (58,17);// 	logina.src  = "/NR/sampledata2/NavImages/login.gif";// 	loginb      = new Image (58,17);// 	loginb.src  = "/NR/sampledata2/NavImages/logins.gif";// 	logouta      = new Image (58,17);// 	logouta.src  = "/NR/sampledata2/NavImages/logout.gif";// 	logoutb      = new Image (58,17);// 	logoutb.src  = "/NR/sampledata2/NavImages/logouts.gif";