// Cascading Popup Menus v5.2


var browser = "";

var ua = navigator.userAgent.toLowerCase();
if ( ua.indexOf( "opera" ) != -1 ) {
browser = "opera";
} else if ( ua.indexOf( "msie" ) != -1 ) {
browser = "msie";
} else if ( ua.indexOf( "safari" ) != -1 ) {
browser = "safari";
} else if ( ua.indexOf( "mozilla" ) != -1 ) {
if ( ua.indexOf( "firefox" ) != -1 ) {
browser = "firefox";
} else {
browser = "netscape";
}
}


var hBar = new ItemStyle(40, 0, '>', 47, 0, '', 'whitesmoke', 'lowtext', 'highText', '', '',
 null, null, 'hand', 'hand');

var entry = new ItemStyle(40, 0, '>', 79, 0, '', 'whitesmoke', 'lowtext', 'highText', '', '',
 null, null, 'hand', 'hand');


var subM = new ItemStyle(16, 0, '', 0, 1, 'whitesmoke', 'whitesmoke', 'sublowText', 'subhighText',
 '', '', null, null, 'hand', 'default');

var subM2 = new ItemStyle(18, 0, '', 0, 1, 'whitesmoke', 'whitesmoke', 'lowtext', 'highText',
 '', '', null, null, 'hand', 'default');



var MaxCory = new PopupMenu('MaxCory');
with (MaxCory)
{


startMenu('root', true, 'contents.page.elmPos("MC").x', 'contents.page.elmPos("MC").y + 18', 100, hBar, 'contents', false);

//addItem('&nbsp; Entry Form', 'MCEntry', 'sm:', entry, 18);
addItem('Results', 'ResMCCup', 'sm:', null, 18);

//startMenu('MCEntry', true, 90, 0, 35, subM2, 'contents', false);
//addItem('View', 'Races files/max cory race entry.htm', 'main');
//addItem('Print', 'Races files/max cory race entry.htm', 'window.open()');


startMenu('ResMCCup', true, 'contents.page.winW() - menuW -8', -32, 32, subM, 'contents', false);

if(browser == "msie" || browser == "safari")

{
addItem('2010', 'Races files/max10.htm', 'main');
addItem('2009', 'Races files/max09.htm', 'main');
addItem('2008', 'Races files/max08.htm', 'main');
addItem('2007', 'Races files/max07.htm', 'main');
addItem('2006', 'Races files/max06.htm', 'main');
addItem('2005', 'Races files/max05.htm', 'main');
addItem('2004', 'Races files/max04.htm', 'main');
addItem('2003', 'Races files/max03.htm', 'main');
addItem('2001', 'Races files/max01.htm', 'main');
addItem('2000', 'Races files/max00.htm', 'main');
addItem('1998', 'Races files/max98.htm', 'main');
addItem('1997', 'Races files/max97.htm', 'main');
}

else

{
addItem('2010', 'max10.htm', 'main');
addItem('2009', 'max09.htm', 'main');
addItem('2008', 'max08.htm', 'main');
addItem('2007', 'max07.htm', 'main');
addItem('2006', 'max06.htm', 'main');
addItem('2005', 'max05.htm', 'main');
addItem('2004', 'max04.htm', 'main');
addItem('2003', 'max03.htm', 'main');
addItem('2001', 'max01.htm', 'main');
addItem('2000', 'max00.htm', 'main');
addItem('1998', 'max98.htm', 'main');
addItem('1997', 'max97.htm', 'main');
}

//showDelay = 0;
hideDelay = 300;

//hideDocClick = true;

}


var MadCup = new PopupMenu('MadCup');
with (MadCup)
{


startMenu('root', true, 'contents.page.elmPos("Mad").x', 'contents.page.elmPos("Mad").y + 18', 100, hBar, 'contents', false);

//addItem('&nbsp; Entry Form', 'MadCupEntry', 'sm:', entry, 18);
addItem('Results', 'ResMadCup', 'sm:', null, 18);

//startMenu('MadCupEntry', true, 90, 0, 35, subM2, 'contents', false);
//addItem('View', 'Races files/madeline cup race entry.htm', 'main');
//addItem('Print', 'Races files/madeline cup race entry.htm', 'window.open()');


startMenu('ResMadCup', true, 'contents.page.winW() - menuW -8', -32, 32, subM, 'contents', false);

if(browser == "msie" || browser == "safari")

{
addItem('2009', 'Races files/madcup09.htm', 'main');
addItem('2008', 'Races files/madcup08.htm', 'main');
addItem('2007', 'Races files/madcup07.htm', 'main');
addItem('2006', 'Races files/madcup06.htm', 'main');
addItem('2005', 'Races files/madcup05.htm', 'main');
addItem('2004', 'Races files/madcup04.htm', 'main');
addItem('2003', 'Races files/madcup03.htm', 'main');
addItem('2002', 'Races files/madcup02.htm', 'main');
addItem('2001', 'Races files/madcup01.htm', 'main');
addItem('2000', 'Races files/madcup00.htm', 'main');
addItem('1999', 'Races files/madcup99.htm', 'main');
addItem('1998', 'Races files/madcup98.htm', 'main');
addItem('1997', 'Races files/madcup97.htm', 'main');
}

else

{
addItem('2009', 'madcup09.htm', 'main');
addItem('2008', 'madcup08.htm', 'main');
addItem('2007', 'madcup07.htm', 'main');
addItem('2006', 'madcup06.htm', 'main');
addItem('2005', 'madcup05.htm', 'main');
addItem('2004', 'madcup04.htm', 'main');
addItem('2003', 'madcup03.htm', 'main');
addItem('2002', 'madcup02.htm', 'main');
addItem('2001', 'madcup01.htm', 'main');
addItem('2000', 'madcup00.htm', 'main');
addItem('1999', 'madcup99.htm', 'main');
addItem('1998', 'madcup98.htm', 'main');
addItem('1997', 'madcup97.htm', 'main');
}

//showDelay = 0;
hideDelay = 300;

//hideDocClick = true;

}


var DACup = new PopupMenu('DACup');
with (DACup)
{


startMenu('root', true, 'contents.page.elmPos("AC").x', 'contents.page.elmPos("AC").y + 18', 100, hBar, 'contents', false);

//addItem('&nbsp; Entry Form', 'DAEntry', 'sm:', entry, 18);
addItem('Results', 'ResDACup', 'sm:', null, 18);

//startMenu('DAEntry', true, 90, 0, 35, subM2, 'contents', false);
//addItem('View', 'Races files/amerman cup race entry.htm', 'main');
//addItem('Print', 'Races files/amerman cup race entry.htm', 'window.open()');


startMenu('ResDACup', true, 'contents.page.winW() - menuW -8', -32, 32, subM, 'contents', false);

if(browser == "msie" || browser == "safari")

{
addItem('2009', 'Races files/single09.htm', 'main');
addItem('2008', 'Races files/single08.htm', 'main');
addItem('2007', 'Races files/single07.htm', 'main');
addItem('2006', 'Races files/single06.htm', 'main');
addItem('2005', 'Races files/single05.htm', 'main');
addItem('2004', 'Races files/single04.htm', 'main');
addItem('2003', 'Races files/single03.htm', 'main');
addItem('2002', 'Races files/single02.htm', 'main');
addItem('2001', 'Races files/single01.htm', 'main');
addItem('2000', 'Races files/single00.htm', 'main');
addItem('1999', 'Races files/single99.htm', 'main');
addItem('1998', 'Races files/single98.htm', 'main');
addItem('1997', 'Races files/single97.htm', 'main');
addItem('1996', 'Races files/single96.htm', 'main');
}

else

{
addItem('2008', 'single08.htm', 'main');
addItem('2007', 'single07.htm', 'main');
addItem('2006', 'single06.htm', 'main');
addItem('2005', 'single05.htm', 'main');
addItem('2004', 'single04.htm', 'main');
addItem('2003', 'single03.htm', 'main');
addItem('2002', 'single02.htm', 'main');
addItem('2001', 'single01.htm', 'main');
addItem('2000', 'single00.htm', 'main');
addItem('1999', 'single99.htm', 'main');
addItem('1998', 'single98.htm', 'main');
addItem('1997', 'single97.htm', 'main');
addItem('1996', 'single96.htm', 'main');
}

//showDelay = 0;
hideDelay = 300;

//hideDocClick = true;

}

// 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}}
 if (e && this.MS && navigator.platform.indexOf('Mac')>-1 && e.tagName=='A')
 {
  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};
};
