//Extensive help Notes can be found on bod_data.js
var hBar = new ItemStyle(40, 10, '', 0, 0, '', '', 'highText', 'highText', '', '', null, null, 'hand', 'default');

var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#FFEBC2', '#FFCC66', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

startMenu('root', false, 310, 60, 17, hBar, '', false);
addItem('<img src="images/menu_home.gif" vspace=1 border=0>', 'home', 'href', null, 70, '','','','','','').onclick='window.location.href="index.htm"';;
addItem('<img src="images/menu_board.gif" vspace=1 border=0>', 'about', 'href', null, 180,'','','','','','').onclick='window.location.href="bod.htm"';
addItem('<img src="images/menu_programs.gif" vspace=1 border=0>', 'programs', 'sm:', null, 95,'','','','','','','','','','','','','','hand').onclick='window.location.href="pro.html"';
addItem('<img src="images/menu_grant.gif" vspace=1 border=0>', 'grant', 'href', null, 100,'','','','','','').onclick='window.location.href="gra.htm"';

startMenu('programs', true, 0, 22, 100, subM, '', false);
addItem('&nbsp; &nbsp; Overview', 'pro.html', '');
addItem('&nbsp; &nbsp; Education', 'education.htm', '');
addItem('&nbsp; &nbsp; Quality of Life', 'quality.htm', '');
addItem('&nbsp; &nbsp; Community', 'community.htm', '');
}

// ******************** MENU EFFECTS ********************
addDropShadow(pMenu, window.subM, [40,"#666666",6,6,-4,-4]);

if ((navigator.userAgent.indexOf('rv:0.')==-1) &&
    !(isOp&&!document.documentElement) && !(isIE4&&!window.external))
{
 pMenu.showMenu = new Function('mN','menuAnim(this, mN, 10)');
 pMenu.hideMenu = new Function('mN','menuAnim(this, mN, -15)');
}

// ******************** FUNCTIONS CALLED BY THE EFFECTS SECTION ********************

function menuAnim(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 (!visNow && dir>0) dir = 0-dir;
  if (dir>0) lyr.vis('visible');
  lyr.sty.zIndex = dir>0 ? mD.zIndex + 1 : 1001;

  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) );
  
  counter += dir;
  if (counter>100) { counter = 100; lyr.sty.zIndex = mD.zIndex }
  else if (counter<0) { counter = 0; lyr.vis('hidden') }
  else timer = setTimeout('menuAnim('+menuObj.myName+',"'+menuName+'",'+dir+')', 40);
 }
};

function addDropShadow(mObj, iS)
{
 
 for (var mN in mObj.menu)
 {
  var a=arguments, mD=mObj.menu[mN][0], addW=addH=0;
  if (mD.itemSty != iS) continue;
  for (var shad=2; shad<a.length; shad++)
  {
   var s = a[shad];
   // Safari 1.2 bug: it inherits alpha values SIDEWAYS!?!? What were they thinking?
   var alpha = (s[0]!=null && navigator.userAgent.indexOf('AppleWebKit') == -1);
   if (isNS4) mD.extraHTML += '<layer bgcolor="'+s[1]+'" left="'+s[2]+'" top="'+s[3]+'" width="'+
    (mD.menuW+s[4])+'" height="'+(mD.menuH+s[5])+'" z-index="'+(arguments.length-shad)+'"></layer>';
   else mD.extraHTML += '<div style="position:absolute; background:'+s[1]+'; left:'+s[2]+
    'px; top:'+s[3]+'px; width:'+(mD.menuW+s[4])+'px; height:'+(mD.menuH+s[5])+'px; -z-index:'+
    (a.length-shad)+'; '+
    (alpha?'filter:alpha(opacity='+s[0]+'); -moz-opacity:'+s[0]+'%; opacity:'+(s[0]/100):'')+
    '"></div>';
   addW=Math.max(addW, s[2]+s[4]);
   addH=Math.max(addH, s[3]+s[5]);
  }
  mD.menuW+=addW; mD.menuH+=addH;
 }
};