<!-- this normally goes in the page source under the ul menu -->
/*** list of menus currently active as of 2008-11-11 ***
* listMenuA / listMenuRootA = popular categories
* listMenu / listMenuRoot = wedding favors all categories
* listMenuB / listMenuRootB = other events
* listMenuC / listMenuRootC = resources (wedding planning tips etc)
*
*/

// To create more menus, duplicate this section and make sure you rename your
// menu object to something different; also, activate another <ul> list with a
// different ID, of course :). You can hae as many menus as you want on a page.

// Here's a menu object to control the above list of menu data:
var listMenuA = new FSMenu('listMenuA', true, 'display', 'block', 'none');
listMenuA.animations[listMenuA.animations.length] = FSMenu.animFade;
listMenuA.animations[listMenuA.animations.length] = FSMenu.animClipDown;
listMenuA.animSpeed = 20;
var arrow = null;
if (document.createElement && document.documentElement)
{
 arrow = document.createElement('span');
 arrow.appendChild(document.createTextNode('>>'));
 arrow.className = 'subind';
}
FSaddEvent(window, 'load', new Function('listMenuA.activateMenu("listMenuRootA", arrow)'));




// To create more menus, duplicate this section and make sure you rename your
// menu object to something different; also, activate another <ul> list with a
// different ID, of course :). You can hae as many menus as you want on a page.

// Here's a menu object to control the above list of menu data:
var listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');
listMenu.animations[listMenu.animations.length] = FSMenu.animFade;
listMenu.animations[listMenu.animations.length] = FSMenu.animClipDown;
listMenu.animSpeed = 20;
var arrow = null;
if (document.createElement && document.documentElement)
{
 arrow = document.createElement('span');
 arrow.appendChild(document.createTextNode('>>'));
 arrow.className = 'subind';
}
FSaddEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", arrow)'));


// To create more menus, duplicate this section and make sure you rename your
// menu object to something different; also, activate another <ul> list with a
// different ID, of course :). You can hae as many menus as you want on a page.

// Here's a menu object to control the above list of menu data:
var listMenuB = new FSMenu('listMenuB', true, 'display', 'block', 'none');
listMenuB.animations[listMenuB.animations.length] = FSMenu.animFade;
listMenuB.animations[listMenuB.animations.length] = FSMenu.animClipDown;
listMenuB.animSpeed = 20;
var arrow = null;
if (document.createElement && document.documentElement)
{
 arrow = document.createElement('span');
 arrow.appendChild(document.createTextNode('>>'));
 arrow.className = 'subind';
}
FSaddEvent(window, 'load', new Function('listMenuB.activateMenu("listMenuRootB", arrow)'));


// To create more menus, duplicate this section and make sure you rename your
// menu object to something different; also, activate another <ul> list with a
// different ID, of course :). You can hae as many menus as you want on a page.

// Here's a menu object to control the above list of menu data:
var listMenuC = new FSMenu('listMenuC', true, 'display', 'block', 'none');
listMenuC.animations[listMenuC.animations.length] = FSMenu.animFade;
listMenuC.animations[listMenuC.animations.length] = FSMenu.animClipDown;
listMenuC.animSpeed = 20;
var arrow = null;
if (document.createElement && document.documentElement)
{
 arrow = document.createElement('span');
 arrow.appendChild(document.createTextNode('>>'));
 arrow.className = 'subind';
}
FSaddEvent(window, 'load', new Function('listMenuC.activateMenu("listMenuRootC", arrow)'));



// below code is from fsmenu_extras.js and is for 
// repositioning all menus if they appear outside viewable browser area
// make sure there is an entry for each menu

// 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 mp = page.elmPos(menu.ref);
 var pp = page.elmPos(this.menus[mN].par.ref);
 
 // Compare position to viewport, reposition accordingly.
 var mgL = 0, mgT = 0;
 if (mp.x + menuW > vpR) mgL = pp.x - mp.x - menuW;
 if (mp.x + mgL < vpL) mgL = vpL - mp.x;
 if (mp.y + menuH > vpB) mgT = vpB - mp.y - menuH;
 if (mp.y + mgT < vpT) mgT = vpT - mp.y;

 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.
FSaddEvent(listMenuA, 'show', repositionMenus, true);
FSaddEvent(listMenu, 'show', repositionMenus, true);
FSaddEvent(listMenuB, 'show', repositionMenus, true);
FSaddEvent(listMenuC, 'show', repositionMenus, true);




