//<![CDATA[

//listMenu.showDelay = 0;
//listMenu.switchDelay = 125;
//listMenu.hideDelay = 500;
//listMenu.cssLitClass = 'highlighted';
//listMenu.showOnClick = 0;
//listMenu.hideOnClick = true;
//listMenu.animInSpeed = 0.2;
//listMenu.animOutSpeed = 0.2;
FSMenu.animSwipeRight = function(ref, counter, show)
{
 // Backup original top/margin-top, then 'swipe' movement + clipping.
 if (show && (counter == 0))
 {
  ref._fsm_styT = ref.style.left;
  ref._fsm_styMT = ref.style.marginLeft;
  ref._fsm_offT = ref.offsetLeft || 0;
 }
 var cP = Math.pow(Math.sin(Math.PI * counter / 2), 0.75);
 var clipX = ref.offsetWidth * (1 - cP);
 ref.style.clip = (counter == 1 ?
  ((window.opera || navigator.userAgent.indexOf('KHTML') > -1) ? '' :
   'rect(auto, auto, auto, auto)') :
   'rect(0, ' + ref.offsetWidth + 'px, ' + ref.offsetHeight + 'px, ' + clipX + 'px)');
 if (counter == 1 || (counter < 0.01 && !show))
 {
  ref.style.left = ref._fsm_styT;
  ref.style.marginLeft = ref._fsm_styMT;
 }
 else
 {
  ref.style.left = ((0 - clipX) + (ref._fsm_offT)) + 'px';
  ref.style.marginLeft = '0';
 }
};
listMenu.animations[listMenu.animations.length] = FSMenu.animSwipeRight;

var arrow = null;
if (document.createElement && document.documentElement)
{
 arrow = document.createElement('img');
 arrow.src = '/js/continua.gif';
 arrow.style.borderWidth = '0';
 arrow.className = 'subind';
 arrow.width=6;
 arrow.height=6;
 arrow.align='absmiddle';
}
addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", arrow)'));

// MENU REPOSITIONING: This will stop menus showing outside visible screen boundaries.
// To activate:
//  1) Paste this after you create your "new FSMenu" object.
//  2) Make sure the last line contains the correct menu object name, and
//     duplicate for each of the menu objects to which you want this to apply.

page.winW=function()
 { with (this) return Math.max(minW, MS?win.document[db].clientWidth:win.innerWidth) };
page.winH=function()
 { with (this) return Math.max(minH, MS?win.document[db].clientHeight:win.innerHeight) };
page.scrollX=function()
 { with (this) return MS?win.document[db].scrollLeft:win.pageXOffset };
page.scrollY=function()
 { with (this) return MS?win.document[db].scrollTop:win.pageYOffset };

function repositionMenus(mN) { with (this)
{
 var menu = this.menus[mN].lyr;

 // Showing before measuring corrects MSIE bug.
 menu.sty.display = 'block';
 // Reset to and/or store original margins.
 if (!menu._fsm_origML) menu._fsm_origML = menu.ref.currentStyle ?
  menu.ref.currentStyle.marginLeft : (menu.sty.marginLeft || 'auto');
 if (!menu._fsm_origMT) menu._fsm_origMT = menu.ref.currentStyle ?
  menu.ref.currentStyle.marginTop : (menu.sty.marginTop || 'auto');
 menu.sty.marginLeft = menu._fsm_origML;
 menu.sty.marginTop = menu._fsm_origMT;

 // Calculate absolute position within document.
 var menuX = 0, menuY = 0,
  menuW = menu.ref.offsetWidth, menuH = menu.ref.offsetHeight,
  vpL = page.scrollX(), vpR = vpL + page.winW() - 16,
  vpT = page.scrollY(), vpB = vpT + page.winH() - 16;
 var tmp = menu.ref;
 while (tmp)
 {
  menuX += tmp.offsetLeft;
  menuY += tmp.offsetTop;
  tmp = tmp.offsetParent;
 }

 // Compare position to viewport, reposition accordingly.
 var mgL = 0, mgT = 0;
 if (menuX + menuW > vpR) mgL = vpR - menuX - menuW;
 if (menuX + mgL < vpL) mgL = vpL - menuX;
 if (menuY + menuH > vpB) mgT = vpB - menuY - menuH;
 if (menuY + mgT < vpT) mgT = vpT - menuY;

 if (mgL) menu.sty.marginLeft = mgL + 'px';
 if (mgT) menu.sty.marginTop = mgT + 'px';
}};

// Set this to process menu show events for a given object.
addEvent(listMenu, 'show', repositionMenus, true);

// SELECT BOX / IFRAME HIDING: This will help mixing menus and forms/frames/Flash/etc.
// Pick one (not both) of the below two methods. To use either, copy and paste beneath
// your menu data and duplicate the last addEvent lines to apply to each of your menus.
// Here's a second method. This only works in IE 5.5+ on Windows, but it doesn't make
// select boxes appear and disappear (menus cleanly cover them).

FSMenu.prototype.ieSelBoxFixShow = function(mN) { with (this)
{
 var m = menus[mN];
 if (!isIE || !window.createPopup) return;
 if (navigator.userAgent.match(/MSIE ([\d\.]+)/) && parseFloat(RegExp.$1) > 6.5)
  return;
 // Create a new transparent IFRAME if needed, and insert under the menu.
 if (!m.ifr)
 {
  m.ifr = document.createElement('iframe');
  m.ifr.src = 'about:blank';
  with (m.ifr.style)
  {
   position = 'absolute';
   border = 'none';
   filter = 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
  }
  m.lyr.ref.parentNode.insertBefore(m.ifr, m.lyr.ref);
 }
 // Position and show it on each call.
 with (m.ifr.style)
 {
  left = m.lyr.ref.offsetLeft + 'px';
  top = m.lyr.ref.offsetTop + 'px';
  width = m.lyr.ref.offsetWidth + 'px';
  height = m.lyr.ref.offsetHeight + 'px';
  visibility = 'visible';
 }
}};
FSMenu.prototype.ieSelBoxFixHide = function(mN) { with (this)
{
 if (!isIE || !window.createPopup) return;
 var m = menus[mN];
 if (m.ifr) m.ifr.style.visibility = 'hidden';
}};

addEvent(listMenu, 'show', function(mN) { this.ieSelBoxFixShow(mN) }, 1);
addEvent(listMenu, 'hide', function(mN) { this.ieSelBoxFixHide(mN) }, 1);
//]]>