var leftoffset = 310;
var topoffset = 127; 	//       the 'top' offset of this menu in pixels.
var height = 33; 	//       the height of this menu (for vertical menus, this becomes the menu width).
var vSpacing =105;  // Horizontal spacing
var subWidth = 180;
var itemSpacing = 7;

//var hBar = new ItemStyle( vSpacing   , 0      , ''                , 0                 , 0      , '#e0e9f9'              , '#bcd4e9'               , 'vMenuLow'      , 'vMenuHigh'      , 'menuBorder'                , 'menuBorder'                 , null       , null        , 'hand'           , 'hand'              );      

var hBar = new ItemStyle( vSpacing   , itemSpacing      , ''                , 0                 , 0      , 'images/buton_background.gif'              , 'images/buton_background.gif'                , 'vMenuLow'      , 'vMenuHigh'      , ''                , ''                 , null       , null        , 'hand'           , 'hand'              );      
var vBar = new ItemStyle( vSpacing   , 0      , ''                , 0                 , 0      , 'images/buton_background.gif'              , 'images/buton_background.gif'               , 'vMenuLow'      , 'vMenuHigh'      , 'menuBorder'                , 'menuBorder'                 , null       , null        , 'hand'           , 'hand'              );      


var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root', false, 'window.page.elmPos("menuhome").x+leftoffset', topoffset, height, hBar, '', false);
addItem('&nbsp; Home', 'index.php', '');
addItem('&nbsp; Buyers/Sellers', 'mBuyers', 'sm:');
addItem('&nbsp; Sales Calendar', 'calendar.php', '');
addItem('&nbsp; Sales Results', 'results.php', '');
addItem('&nbsp; Contact Us', 'contacts.php', '');
addItem('&nbsp; Directions', 'mDirections', 'sm:');

startMenu('mBuyers', true, 0, height+2, subWidth, vBar, '', false);
addItem('&nbsp; Introduction', './buyersinfo.php', '', '', height);
/*
addItem('&nbsp; News Letter Archive', './newsletterarchive.php', '', '', height);
*/
addItem('&nbsp; Foreign Buyers Incentive', './buyersinfo.php?info=17', '', '', height);
addItem('&nbsp; Conditions of Sale', 'window.open("./pdf/conditions.pdf")', 'js:', '', height);
addItem('&nbsp; Credit Guidelines', './buyersinfo.php?info=10', '', '', height);
addItem('&nbsp; Buyers Card App', 'window.open("./pdf/buyers_app.pdf")', 'js:', '', height);
addItem('&nbsp; Authorisation of Agent', 'window.open("./pdf/authorisation.pdf")', 'js:', '', height);
addItem('&nbsp; Repository', './buyersinfo.php?info=16', '', '', height);
addItem('&nbsp; Sales Entry Forms', './entryforms.php', '', '', height);
/*
startMenu('mCalendar', true, 0, height+2 , subWidth, vBar, '', false);
addItem('&nbsp; 2010Sale Calendar pdf', '#', '', '', height);;
*/
/*
startMenu('mResults', true, 0, height+2, subWidth, vBar, '', false);
addItem('&nbsp; Cape Yearling Sale', '#', '', '', height);
addItem('&nbsp; National Yearling Sale', '#', '', '', height);
*/
/*
startMenu('mContact', true, 0, height+2, subWidth, vBar, '', false);
addItem('&nbsp; List & photos', '#', '', '', height);
*/
startMenu('mDirections', true, 0, height+2, subWidth, vBar, '', false);
addItem('&nbsp; TBA Sales Complex', 'directions-tba.php', '', '', height);
/*
addItem('&nbsp; Sandringham Farm', '#', '', '', height);
*/
// HIDE OR SHOW DELAYS (in milliseconds) can be customised. Defaults are:
//showDelay = 0;
hideDelay = 500;
// Specify hideDelay as zero if you want to disable autohiding, and showDelay as a couple of
// hundred if you don't want the menus showing instantaneously when moused over.
}


// ******************** FUNCTIONS CALLED BY THE EFFECTS SECTION ********************

// These can be deleted if you're not using them. Alternatively, if you're using several menu
// data files, you may want to move them to the "core" script file instead.



// 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};
};