
var rootBar = new ItemStyle(100, 0, '', 0, 0, '', '', 'PrimaryNavText', 'PrimaryNavText', '', '', null, null);

var hBar1 = new ItemStyle(31, 0, '', 0, 0, '#333366', '#333366', 'PrimaryNavText', 'PrimaryNavText', '', '', null, null);

var hBar2 = new ItemStyle(30, 0, '', 0, 0, '#333366', '#333366', 'PrimaryNavText', 'PrimaryNavText', '', '', null, null);



var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#333366', '#666699', 'PrimaryNavText', 'PrimaryNavHover', 'PrimaryNavBorder', 'PrimaryNavBorder', 100, 100);

var pMenu = new PopupMenu('pMenu');



with (pMenu)

{

startMenu('root', true, 0, 213, 0, rootBar);



addItem('<a href=vtours.html onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage("Image","","images/layout/maine_graphic_clobby.jpg","1")><IMG SRC="images/layout/nav_round_pix.gif" WIDTH=180 HEIGHT=31 BORDER=0 ALT="summer"></A>', 'mSummer', 'sm:', hBar1);

addItem('<a href=digphoto.html onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage("Image","","images/layout/maine_graphic_pempt.jpg","1")><IMG SRC="images/layout/nav_dig_photo.gif" WIDTH=180 HEIGHT=30 BORDER=0 ALT=""></A>', 'mVisit', 'sm:', hBar2);



startMenu('mSummer', true, 180, 5, 160, subM);

addItem('Hotels, Inns & B&Bs', 'hotels.html', '');

addItem('Resorts', 'resorts.html', '');

addItem('Conference Facilities', 'conference.html', '');

addItem('Yachts', 'yachts.html', '');

addItem('Ski Resorts', 'ski_resorts.html', '');

addItem('Maine Scenes', 'scenes.html', '');

addItem('Company Promotions', 'promos.html', '');

addItem('Residential Real Estate', 'rrealestate.html', '');

addItem('Fun Stuff', 'funstuff.html', '');



startMenu('mVisit', true, 180, 5, 160, subM);

addItem('Web & Print Media', 'wpmedia.html', '');

addItem('360&deg; Product Shots', '360.html', '');

addItem('Corporate Branding', 'branding.html', '');

addItem('CD-ROM Presentations', 'cdr.html', '');

addItem('Scenic Maine Products', 'scenicmp.html', '');

}





// *** (3) EVENTS ***



if (!isNS4)

{

 pMenu.update(true);

 page_onload();

}

else

{

 var popOldOL = window.onload;

 window.onload = function()

 {

  if (popOldOL) popOldOL();

  pMenu.update();

  page_onload();

 }

}



window.onresize = function()

{

 ns4BugCheck();

 pMenu.position();

}



window.onscroll = function()

{

 pMenu.position();

}



if (isNS4) document.captureEvents(Event.CLICK);

document.onclick = function(evt)

{

 pMenu.click();

 if (isNS4) return document.routeEvent(evt);

}



var nsWinW = window.innerWidth, nsWinH = window.innerHeight;

function ns4BugCheck()

{

 if (isNS4 && (nsWinW!=innerWidth || nsWinH!=innerHeight)) location.reload()

}



// Activate the useful 'onscroll' event for non-Microsoft browsers.

if (!isIE || window.opera)

{

 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)');

}
