var hBar = new ItemStyle(40, 40, '', 0, 0, '15', '10#542401', 'highText', 'highText', '', '',
 null, null, 'hand', 'default');

var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#FFFFFF', '#5E502D', 'lowText', 'highTextsub',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');

var button = new ItemStyle(22, 1, '&gt;', -15, 2, '10#006633', '10#CC6600', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');

var pMenu = new PopupMenu('pMenu');
with (pMenu) {
startMenu('root', false, 'page.winW()/2 - pMenu.menu.root[0].menuW/2', 114, 17, hBar); // Centres.


addItem('&nbsp; ACCUEIL', 'mAccueil', 'sm:', null, 60);
addItem('&nbsp; NEOPHYTES', 'mNeophytes', 'sm:', null, 80);
addItem('&nbsp; CAVALIERS', 'mCavaliers', 'sm:', null, 75);
addItem('&nbsp; ORGANISATEURS', 'mOrganisateurs', 'sm:', null, 105);
addItem('&nbsp; JUGES', 'mJuges', 'sm:', null, 70);
addItem('&nbsp; ELEVEURS', 'mEleveurs', 'sm:', null, 70);
addItem('&nbsp; CONTACTS', 'mContact', 'sm:', null, 74);


startMenu('mAccueil', true, 0, 22, 140, subM, '', false);
addItem('Retour &agrave; l\'accueil', 'index.cfm', '');
addItem('Actualit&eacute;s / News', 'news.cfm', '');
addItem('Les petites annonces', 'annonces.cfm', '');
// addItem('Les reportages photo', 'photos.htm', '');
// addItem('La newsletter', 'newsletter.cfm', '');
addItem('Livres / DVD...', 'livres.cfm', '');
addItem('Phototh&egrave;que', 'presse.cfm?rub=phototheque', '');
addItem('Fonds d\'&eacute;cran', 'wallpaper.cfm', '');


startMenu('mNeophytes', true, 0, 22, 145, subM, '', false);
addItem('La discipline', 'mDiscipline', 'sm:');
addItem('Livres / DVD...', 'livres.cfm', '');
addItem('Questions / R&eacute;ponses', 'mFaq', 'sm:');
addItem('Le mat&eacute;riel', 'endurance.cfm?rub=materiel', '');
addItem('Licences', 'mLicences', 'sm:');

startMenu('mLicences', true, 150, 0, 155, subM, '', false);
addItem('Acheter sa licence 2012', 'licences.cfm?rub=achat', '');
// addItem('Modifier sa licence 2010', 'licences.cfm?rub=modif', '');

startMenu('mDiscipline', true, 150, 0, 155, subM, '', false);
addItem('L\'endurance &eacute;questre', 'endurance.cfm?rub=presentation', '');
addItem('La progression', 'endurance.cfm?rub=progres', '');
addItem('La protection du cheval', 'endurance.cfm?rub=protection', '');
addItem('L\'assistance aux cavaliers', 'endurance.cfm?rub=assistance', '');
addItem('Les origines', 'endurance.cfm?rub=origines', '');
//addItem('Les comp&eacute;titions', 'endurance.cfm?rub=compet', '');
addItem('Le Palmar&egrave;s Fran&ccedil;ais', 'endurance.cfm?rub=palmares', '');

startMenu('mFaq', true, 150, 0, 150, subM, '', false);
addItem('G&eacute;n&eacute;ralit&eacute;s', 'faq.cfm?rub=generalites', '');
//addItem('Le r&egrave;glement', 'faq.cfm?rub=reglement', '');
addItem('Posez votre question', 'faq.cfm?rub=question', '');

startMenu('mCavaliers', true, 0, 22, 170, subM, '', false);
addItem('Licences', 'mLicences2', 'sm:');
//addItem('Le calendrier des &eacute;preuves', 'mCalandrier', 'sm:');
addItem('Le calendrier des &eacute;preuves', 'calendrier.cfm', '');
addItem('Les r&eacute;sultats des &eacute;preuves', 'mResultats', 'sm:');
addItem('Le challenge PACA', '#', '').onclick="window.open('challenge-paca-2011.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Les fiches conseils', 'conseils.cfm?rub=sommaire', '');
addItem('Les r&egrave;glements', 'mReglement', 'sm:');
// addItem('Les formations', 'formations.cfm', '');
// addItem('La newsletter', 'newsletter.cfm', '');
addItem('Livres / DVD...', 'livres.cfm', '');

startMenu('mLicences2', true, 175, 0, 155, subM, '', false);
addItem('Acheter sa licence 2012', 'licences.cfm?rub=achat', '');
// addItem('Modifier sa licence 2010', 'licences.cfm?rub=modif', '');

startMenu('mCalandrier', true, 175, 0, 155, subM, '', false);
addItem('Calendrier PACA', 'calendrier.cfm', '');
//addItem('Calendrier PACA', '#', '').onclick="window.open('calendrier-2008-paca.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Calendrier Languedoc', '#', '').onclick="window.open('calendrier-2008-lr.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
//addItem('Calendrier Languedoc', 'calendrier.cfm?reg=languedoc', '');
//addItem('Calendrier Rhone-Alpes', 'calendrier.cfm?reg=rhonealpes', '');

startMenu('mReglement', true, 175, 0, 160, subM, '', false);
addItem('Epreuves FFE', '#', '').onclick="window.open('http://www.ffe.com/ffe/Disciplines-Equestres/General/Endurance/Reglement','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Epreuves SHF', '#', '').onclick="window.open('http://www.shf.eu/general-reglement-organisation-7.html','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnats de France', '#', '').onclick="window.open('http://www.ffe.com/ffe/Disciplines-Equestres/General/Endurance/Championnats-de-France','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Le challenge PACA', '#', '').onclick="window.open('challenge-paca-2011.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Anti dopage', 'mReglementDopage', 'sm:');

startMenu('mReglementDopage', true, 125, 0, 150, subM, '', false);
addItem('Liste des interdictions', '#', '').onclick="window.open('reglement_dopage.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('R&egrave;glement disciplinaire', '#', '').onclick="window.open('img/2007_List_Fr.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";

startMenu('mReglementEpreuves', true, 125, 0, 150, subM, '', false);
addItem('Dispositions g&eacute;n&eacute;rales', '#', '').onclick="window.open('http://www.ffe.com/ffe/Disciplines-Equestres/General/Endurance/Presentation-de-l-endurance','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Rectificatif 01/02/09', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Rectif_GENERAL_fev_090201.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Dispositions Sp&eacute;cifiques', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Reglement_Endurance_2009_bd.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Tourn&eacute;e des AS', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/TDA_ENDURANCE_2009__090123_.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnat des AS', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Championnat_As_Endurance_200812191.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Le challenge PACA', '#', '').onclick="window.open('challenge-paca-2011.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Dispositions g&eacute;n&eacute;rales', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Reglement_Dispositions_generales_2009.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";

startMenu('mReglementSHF', true, 125, 0, 150, subM, '', false);
addItem('Ep. Jeunes chevaux 4 ans', 'reglement.cfm?type=shf4', '');
addItem('Ep. Jeunes chevaux 5 ans', 'reglement.cfm?type=shf5', '');
addItem('Ep. Jeunes chevaux 6 ans', 'reglement.cfm?type=shf6', '');
addItem('Championnat Uz&egrave;s 2007', 'reglement.cfm?type=uzes', '');

startMenu('mReglementAutres', true, 125, 0, 150, subM, '', false);
addItem('Master Pro', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Master_Pro_Endurance_20090206.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnat Amateur', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Championnat_Amateur_Endurance_20090206.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnat Major', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Championnat_Major_Endurance_20090206.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Meeting des propri&eacute;taires', '#', '').onclick="window.open('http://meeting.ffecompet.com/','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";

startMenu('mResultats', true, 175, 0, 120, subM, '', false);
addItem('Saison 2011', 'resultats.cfm', '');
addItem('Saison 2010', 'resultats.cfm?saison=2010', '');
addItem('Saison 2009', 'resultats.cfm?saison=2009', '');
addItem('Saison 2008', 'resultats.cfm?saison=2008', '');
addItem('Saison 2007', 'resultats.cfm?saison=2007', '');
addItem('Saison 2006', 'resultats.cfm?saison=2006', '');
addItem('Saison 2005', 'resultats.cfm?saison=2005', '');
addItem('Saison 2004', 'resultats.cfm?saison=2004', '');

startMenu('mOrganisateurs', true, 0, 22, 140, subM, '', false);
addItem('Les r&egrave;glements', 'mReglement2', 'sm:');
// addItem('Les formations', 'formations.cfm', '');
addItem('Le Guide Organisateur', 'basedoc.cfm?rub=intro', '');
addItem('La base documentaire', 'basedoc.cfm?rub=sommaire', '');
// addItem('Votre reportage photo', 'temp.cfm?rub=votrereportage', '');
// addItem('La newsletter', 'newsletter.cfm', '');
addItem('Livres / DVD...', 'livres.cfm', '');

startMenu('mReglement2', true, 145, 0, 160, subM, '', false);
addItem('Epreuves FFE', '#', '').onclick="window.open('http://www.ffe.com/ffe/Disciplines-Equestres/General/Endurance/Reglement','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Epreuves SHF', '#', '').onclick="window.open('http://www.shf.eu/general-reglement-organisation-7.html','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnats de France', '#', '').onclick="window.open('http://www.ffe.com/ffe/Disciplines-Equestres/General/Endurance/Championnats-de-France','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Anti dopage', 'mReglementDopage2', 'sm:');

startMenu('mReglementDopage2', true, 125, 0, 150, subM, '', false);
addItem('Liste des interdictions', '#', '').onclick="window.open('reglement_dopage.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('R&egrave;glement disciplinaire', '#', '').onclick="window.open('img/2007_List_Fr.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";


startMenu('mReglementEpreuves2', true, 125, 0, 150, subM, '', false);
addItem('Dispositions g&eacute;n&eacute;rales', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Reglement_Dispositions_generales_2009.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Rectificatif 01/02/09', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Rectif_GENERAL_fev_090201.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Dispositions Sp&eacute;cifiques', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Reglement_Endurance_2009_bd.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Tourn&eacute;e des AS', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/TDA_ENDURANCE_2009__090123_.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnat des AS', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Championnat_As_Endurance_200812191.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Le challenge PACA', '#', '').onclick="window.open('challenge-paca-2011.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Dispositions g&eacute;n&eacute;rales', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Reglement_Dispositions_generales_2009.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";

startMenu('mReglementSHF2', true, 125, 0, 150, subM, '', false);
addItem('Ep. Jeunes chevaux 4 ans', 'reglement.cfm?type=shf4', '');
addItem('Ep. Jeunes chevaux 5 ans', 'reglement.cfm?type=shf5', '');
addItem('Ep. Jeunes chevaux 6 ans', 'reglement.cfm?type=shf6', '');
addItem('Championnat Uz&egrave;s 2007', 'reglement.cfm?type=uzes', '');

startMenu('mReglementAutres2', true, 125, 0, 150, subM, '', false);
addItem('Master Pro', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Master_Pro_Endurance_20090206.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnat Amateur', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Championnat_Amateur_Endurance_20090206.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Championnat Major', '#', '').onclick="window.open('http://www.ffe.com/2/7/16/File//2009/Championnat_Major_Endurance_20090206.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
addItem('Meeting des propri&eacute;taires', '#', '').onclick="window.open('http://meeting.ffecompet.com/','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";

startMenu('mJuges', true, 0, 22, 125, subM, '', false);
addItem('Devenir juge', '#', '').onclick="window.open('http://www.ffe.com/ffe/content/download/1413/10626/version/3/file/devenez+juge+d%27endurance+20100302.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=880, height=500')";
// addItem('Devenir juge', 'basedoc.cfm?rub=juge', '');
addItem('Check-list', 'basedoc.cfm?rub=juge-checklist', '');
addItem('Doc. utiles', 'basedoc.cfm?rub=juge', '').onclick="window.open('tableau_temps-vitesse.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Juges PACA', 'juges.cfm', '');
// addItem('Les formations', 'formations.cfm', '');
// addItem('La newsletter', 'newsletter.cfm', '');
addItem('Livres / DVD...', 'livres.cfm', '');

startMenu('mEleveurs', true, 0, 22, 120, subM, '', false);
addItem('Comment s\'installer ?', 'eleveurs.cfm?rub=installer', '');
addItem('Le GECE Paca', 'mGece', 'sm:');
addItem('Adh&eacute;sion A.C.A', 'eleveurs.cfm?rub=adhesion', '');
addItem('Vos chevaux', 'chevaux.cfm', '');
addItem('Mod&egrave;les et allures', '#', '').onclick="window.open('allures.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Etalons Haras nat.', 'chevaux.cfm', 'sm:').onclick="window.open('Catalogue_HN_2006.pdf','_blank','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=780, height=500')";
addItem('Livres / DVD...', 'livres.cfm', '');

startMenu('mGece', true, 125, 0, 115, subM, '', false);
addItem('Pr&eacute;sentation', 'eleveurs.cfm?rub=gece', '');
addItem('Infos &eacute;leveurs', 'eleveurs.cfm?rub=info', '');
addItem('Liste des adh&eacute;rents', 'eleveurs.cfm?rub=adherents', '');


startMenu('mContact', true, 0, 22, 130, subM, '', false);
addItem('Qui sommes-nous ?', 'qui.cfm', '');
addItem('Nos partenaires', 'site.cfm?rub=partenaires', '');
addItem('Sites amis', 'site.cfm?rub=liens', '');
addItem('Contactez-nous', 'site.cfm?rub=contacts', '');
addItem('Votre avis sur ce site', 'site.cfm?rub=avis', '');
addItem('Mentions l&eacute;gales', 'site.cfm?rub=copyright', '');

}

addMenuBorder(pMenu, window.subBlank,
 null, '#666666', 1, '#CCCCDD', 2);




addDropShadow(pMenu, window.subM,
 [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);
addDropShadow(pMenu, window.subBlank,
 [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);




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)');

}


// This is the "positioning from page anchors" code used by the advanced positioning expressions.
page.elmPos=function(e,p)
{
 var x=0,y=0,w=p?p:this.win;
 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}
 else if (e && e.focus && e.href && this.MS && /Mac/.test(navigator.platform))
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' +
   'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
};


function menuAnim(menuObj, menuName, dir)
{
 // The array index of the named menu (e.g. 'mFile') in the menu object (e.g. 'pMenu').
 var mD = menuObj.menu[menuName][0];
 // Add timer and counter variables to the menu data structure, we'll need them.
 if (!mD.timer) mD.timer = 0;
 if (!mD.counter) mD.counter = 0;

 with (mD)
 {
  // Stop any existing animation.
  clearTimeout(timer);

  // If the litNow() array doesn't show this menu as lit, and we're still showing it,
  // force a quick hide (this stops miscellaneous timer errors).
  //if (dir>0 && !menuObj.litNow[menuObj.menu[menuName][0].parentMenu]) dir = -100;

  // If the layer doesn't exist (cross-frame navigation) quit.
  if (!lyr || !lyr.ref) return;
  // This next line is not strictly necessary, but it stops the one-in-a-hundred menu that
  // shows and doesn't hide on very quick mouseovers.
  if (!visNow && dir>0) dir = 0-dir;
  // Show the menu if that's what we're doing.
  if (dir>0) lyr.vis('visible');
  // Also raise showing layers above hiding ones.
  lyr.sty.zIndex = dir>0 ? mD.zIndex + 1 : 1001;


  // Straightforward downwards clipping animation (default setting):
  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) );
  // If you want, comment out the above line and enable this one to animate bottom-upwards:
  //lyr.clip(0, (menuH+2)-(menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75), menuW+2, menuH+2);
  // Another alternative: Move+clip sliding animation. Looks really cool :).
  //if (!counter) mD.origY = lyr.y();
  //var newY = (menuH+2)-(menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75);
  //lyr.clip(0, newY, menuW+2, menuH+2);
  //lyr.y(mD.origY - newY);

  // Increment the counter and if it hasn't reached the end (counter is 0% or 100%),
  // set the timer to call the animation function again in 40ms to contine the animation.
  // Note that we hide the menu div on animation end in that direction.
  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);
 }
};




// Borders and Dropshadows:

function addMenuBorder(mObj, iS, alpha, bordCol, bordW, backCol, backW)
{
 // Loop through the menu array of that object, finding matching ItemStyles.
 for (var mN in mObj.menu)
 {
  var mR=mObj.menu[mN], dS='<div style="position:absolute; background:';
  if (mR[0].itemSty != iS) continue;
  // Loop through the items in that menu, move them down and to the right a bit.
  for (var mI=1; mI<mR.length; mI++)
  {
   mR[mI].iX += bordW+backW;
   mR[mI].iY += bordW+backW;
  }
  // Extend the total dimensions of menu accordingly.
  mW = mR[0].menuW += 2*(bordW+backW);
  mH = mR[0].menuH += 2*(bordW+backW);

  // Set the menu's extra content string with divs/layers underneath the items.
  if (isNS4) mR[0].extraHTML += '<layer bgcolor="'+bordCol+'" left="0" top="0" width="'+mW+
   '" height="'+mH+'" z-index="980"><layer bgcolor="'+backCol+'" left="'+bordW+'" top="'+
   bordW+'" width="'+(mW-2*bordW)+'" height="'+(mH-2*bordW)+'" z-index="990"></layer></layer>';
  else mR[0].extraHTML += dS+bordCol+'; left:0px; top:0px; width:'+mW+'px; height:'+mH+
   'px; z-index:980; '+
   (alpha!=null?'filter:alpha(opacity='+alpha+'); -moz-opacity:'+alpha+'%; opacity:'+(alpha/100):'')+
   '">'+dS+backCol+'; left:'+bordW+'px; top:'+bordW+'px; width:'+(mW-2*bordW)+'px; height:'+
   (mH-2*bordW)+'px; z-index:990"></div></div>';
 }
};

function addDropShadow(mObj, iS)
{
 // Pretty similar to the one above, just loops through list of extra parameters making
 // dropshadow layers (from arrays) and extending the menu dimensions to suit.
 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;
 }
};
