// Jody added code here for booking tab - 09/07/2003
var bookStr,menuBarSize,showBookBtn=true;

// Cascading Popup Menus v5.2 - Single Frame Menu example script.


// If you're upgrading from v5.1, you can paste your existing menu data in, and if you're
// upgrading from v5.0 you need to add 'cursor' settings to your ItemStyles.
//
// And before going ANY further, you must have READ and AGREE TO the script license!
// It can be found on my site, in the syntax helpfile, or in the demo script document.


// 'horizontal Bar' style: menu items that use this ItemStyle are 40px wide, have 10px gaps
// between them, no popout indicator (the ">" in some menus) or popout indicator position,
// 0px padding of the text within items, #336699 background colour, a hover colour of #6699CC,
// 'highText' is the stylesheet class used for the menu text both normally and when highlighted,
// no border styles, 'null' means fully opaque items (set them to numbers between 0 and 100 to
// enable semitranslucency), and the 'hand'/'default' cursors are used for linked/submenu items.

var hBar = new ItemStyle(100, 0, '', 0, 0, '#ffc800', '#ff9700', 'itemText', 'itemText', '', '',
 null, null);

var cairnsM = new ItemStyle(22, 0, '&gt;', -15, 5, '#ffc800', '#ff9700', 'itemText', 'itemHover',
 'itemBorder', 'itemBorder', null, null);
 

// Jody added code here for booking tab - 09/07/2003

if (typeof bnbName == "undefined")
  showBookBtn=false;

menuBarSize=showBookBtn ? 710 : 610;  

// Create a PopupMenu() object, and pass its own name so it can reference itself later on.
// We also use a 'with' block to work with its properties and functions below.

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

// Here's what the values in the next startMenu() command mean, in order:
//  'root': the name of this menu.
//   false: orientated as a horizontal menu (true creates a vertical menu).
//      10: the 'left' offset of this menu in pixels.
//       0: the 'top' offset of this menu in pixels.
//      17: the height of this menu (for vertical menus, this becomes the menu width).
//    hBar: the ItemStyle used to give this menu colours and layout/formatting.
//      '': this menu does not display within a frame (see the Frameset Example Script to do that).
//   false: this menu shows submenus on mouseover. 'true' means show on click.
//
// Most of the items are 'sm:' items popping out submenus, except the last 'js:' JavaScript command
// to pop open a new window. I've also given each item a length in pixels, overriding the ItemStyle.

startMenu('root', false, 'page.winW()-menuBarSize', 0, 24, hBar);

addItem('<a href="/list_cairns.htm" onclick="document.location=\'/list_cairns.htm\'"><img src="/sample2/cairns2.gif" width="100" height="24" alt="" border="0"></a>', 'mCairns', 'sm:');
addItem('<a href="/list_sth.htm" onclick="document.location=\'/list_sth.htm\'"><img src="/sample2/south2.gif" width="100" height="24" alt="" border="0"></a>', 'mSouth', 'sm:');
addItem('<a href="/list_tbl.htm" onclick="document.location=\'/list_tbl.htm\'"><img src="/sample2/tablelands.gif" width="100" height="24" alt="" border="0"></a>', 'mTable', 'sm:');
addItem('<a href="/list_nth.htm" onclick="document.location=\'/list_nth.htm\'"><img src="/sample2/north.gif" width="100" height="24" alt="" border="0"></a>', 'mNorth', 'sm:');
addItem('<img src="/images/about_us2.gif" width="100" height="24" alt="" border="0">', '/aboutus.php', '');
addItem('<img src="/images/links2.gif" width="100" height="24" alt="" border="0">', '/links.php', '');
addItem('<img src="/images/map_tab.gif" width="100" height="24" alt="" border="0">', '/map.htm', '');


startMenu('mCairns', true, 0, 24, 300, cairnsM);
addItem('Abbeys BnB - Cairns', '/abbeys/default.htm', '');
addItem('Babs Orchard Haven - Edmonton <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.cairns-rainforest-bnb.com")', 'js:');
addItem('Bayview House - Bayview <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.cairnsluxurybandb.com.au")', 'js:');
addItem('Beaches at Holloways - Holloways Beach', 'window.open("http://www.beaches-at-holloways.com.au")', 'js:');
addItem('Billabong B&amp;B - Holloways Beach <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.cairns-bed-breakfast.com")', 'js:');
addItem('Bluewater B&amp;B - Trinity Park <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.bluewaterbbcairns.com.au")', 'js:');
addItem('Cadaghi Cottage - Kuranda <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.cadaghicottage.com.au")', 'js:');
addItem('Cairns Reef \'n Rainforest BnB - Earlville', 'window.open("http://www.cairnsreefbnb.com.au")', 'js:');
addItem('Capers at Kanimbla BNB - Cairns', 'window.open("http://www.capersbedbreakfast.com.au")', 'js:');
addItem('Galvins Edge Hill BnB - Cairns', 'window.open("http://www.cairns.aust.com/galvins")', 'js:');
addItem('Golden Sunbird BnB - Cairns', 'window.open("http://www.ambeausport.com/")', 'js:');
addItem('Gum Tree Nature Retreat - Palm Cove', '/gumtree/default.htm', '');
addItem('Jennys Homestay - Cairns', '/jennys/default.htm', '');
addItem('Kaikea BnB - Clifton Beach <img src="/images/smallGOAUS.gif" height="10" border="0">', '/kaikea/default.htm', '');
addItem('Kooka\'s BnB - Edge Hill <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.kookas-bnb.com")', 'js:');
addItem('Lilybank BnB - Cairns', 'window.open("http://www.lilybank.com.au")', 'js:');
//addItem('North Central Lodge BnB - Smithfield <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.cairnstravelaccommodation.com.au")', 'js:');
addItem('Nutmeg Grove - Cairns', 'window.open("http://www.nutmeggrove.com.au")', 'js:');
addItem('Tranquil Trinity  - Trinity Beach', '/tranquil/default.htm', '');
addItem('Trinity Hide Away - Trinity Beach <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.trinityhideawaybnb.com.au")', 'js:');
addItem('Trinity on the Esplanade - Trinity Beach', 'window.open("http://www.trinityesplanade.com")', 'js:');
addItem('A Villa Gail - Yorkeys Knob', 'window.open("http://www.avillagail.com")', 'js:');
addItem('Zanzoo Retreat - Cairns <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.zanzoo.com")', 'js:');

startMenu('mSouth', true, 0, 24, 240, cairnsM);
addItem('Cane Fields Cottage - South of Innisfail', 'window.open("http://www.canefieldscottage.com")', 'js:');
addItem('Canobie House - Townsville <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.canobiehouse.com.au")', 'js:');

addItem('Gingers Tropic Retreat - Mena Creek', 'window.open("http://www.gingers.com.au")', 'js:');
addItem('Hibiscus Lodge - Mission Beach <img src="/images/smallGOAUS.gif" height="10" border="0">', '/hibiscuslodge/index.html', '');

addItem('Sealords Bed and Breakfast - Mission Beach', 'window.open("http://www.sealords.com.au/")', 'js:');

startMenu('mTable', true, 0, 24, 300, cairnsM);
addItem('Allawah Retreat - Atherton <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.allawah-retreat.com.au")', 'js:');
addItem('Atherton Bluegum BnB - Atherton', 'window.open("http://www.athertonbluegum.com")', 'js:');
addItem('Breamber By The Lake - Lake Tinaroo/Yungaburra', 'window.open("http://www.breamberbythelake.com.au/")', 'js:');
addItem('Calm Water Landing - Lake Tinaroo/Yungaburra <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.calmwaterlanding.com.au")', 'js:');
addItem('Crater Lakes Rainforest Cottages - Lake Eacham <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.craterlakes.com.au")', 'js:');
addItem('Ellendee Homestay - Atherton <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.ellendee.com/")', 'js:');
addItem('Glen Eagle Station Farmstay Cottage - Mount Garnet', 'window.open("http://www.gleneaglestation.bigpondhosting.com/")', 'js:');
addItem('Grandview Country Accommodation - Malanda', 'window.open("http://www.grandviewcountry.com.au")', 'js:');
addItem('Herberton Heritage Cottage - Atherton', 'window.open("http://www.herbertoncottage.com")', 'js:');
addItem('Koah BnB - Kuranda', 'window.open("http://kurandahomestay.com")', 'js:'); 
addItem('Lavender BnB - Atherton', 'window.open("http://www.lavenderhill-bnb.com")', 'js:');
addItem('Millstream Retreat - Ravenshoe <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.millstreamretreat.com.au")', 'js:');
addItem('Possum Valley Rainforest Cottages - Ravenshoe', '/possumvalley/default.htm', '');
addItem('Rose Gums Wilderness Retreat - Lake Eacham', 'window.open("http://www.rosegums.com.au")', 'js:');
addItem('The Long Yard - Millaa Millaa', 'window.open("http://www.bnbnq.com.au/list_tbl.htm")', 'js:');
addItem('The Old Convent - Ravenshoe', 'window.open("http://www.theoldconvent.com.au")', 'js:');
addItem('The Pond Cottage - Ravenshoe <img src="/images/smallGOAUS.gif" height="10" border="0">', '/pondcottage/default.htm', '');
addItem('The Summit Rainforest Retreat - Atherton', 'window.open("http://www.summitrainforestretreat.com/")', 'js:');
addItem('Tinaroo Acres - Tinaroo Park', '/tinarooacres', '');
addItem('Williams Lodge - Yungaburra', 'window.open("http://www.williamslodge.com")', 'js:');


startMenu('mNorth', true, 0, 24, 280, cairnsM);
addItem('Barradise Lodge - Cooktown <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.barradisebandb.com/")', 'js:');
addItem('Cape Trib Exotic Fruit Farm - Cape Tribulation', 'window.open("http://www.capetrib.com.au")', 'js:');
addItem('Cape Trib Hideaway - Cape Tribulation', 'window.open("http://www.rainforesthideaway.com")', 'js:');
//addItem('Cape Trib Retreat - Cape Tribulation', 'window.open("http://www.capetribretreat.com.au")', 'js:');
addItem('Cape Trib Sanctuary - Cape Tribulation', 'window.open("http://www.capetribulationsanctuary.com.au")', 'js:');
addItem('Coral Sea Dreaming - Port Douglas', 'window.open("http://www.coral-sea-dreaming.com")', 'js:');
addItem('Cow Bay Homestay - Cow Bay <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.cowbayhomestay.com")', 'js:');
addItem('Daintree Escape - Daintree', 'window.open("http://www.daintreeescape.com.au")', 'js:');
addItem('Daintree Valley Haven - Daintree <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.daintreevalleyhaven.com.au")', 'js:');
addItem('Daintree Mangrove Sanctuary - Daintree', 'window.open("http://www.daintreewild.com.au")', 'js:');
addItem('Julatten Mountain Retreat -  Julatten <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.julattenretreat.com")', 'js:');
addItem('Marae - Port Douglas', 'window.open("http://www.marae.com.au")', 'js:');
addItem('Mossman Gorge BnB - Mossman <img src="/images/smallGOAUS.gif" height="10" border="0">', '/mossgorge/default.htm', '');
addItem('Mountain View Lodge - Port Douglas <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.mountainviewlodge-australia.com")', 'js:');
addItem('Papillon - Mossman <img src="/images/smallGOAUS.gif" height="10" border="0">', '/papillon', '');
addItem('Paradise Villa - Port Douglas <img src="/images/smallGOAUS.gif" height="10" border="0">', '/paradise/default.htm', '');
addItem('Red Mill House - Daintree', 'window.open("http://www.redmillhouse.com.au")', 'js:');
addItem('River Home Cottages - Daintree', 'window.open("http://www.riverhomecottages.com.au")', 'js:');
//addItem('Tropical Paradise B&B - Cape Tribulation <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.tropicalparadise.com.au")', 'js:');
addItem('A Sea Change B&amp;B - Newell Beach <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.daintreebeachbnb.com")', 'js:');
addItem('Tree House B&B -  Port Douglas <img src="/images/smallGOAUS.gif" height="10" border="0">', 'window.open("http://www.treehousebnb.com.au")', 'js:');

}

PopupMenu.prototype.setColumns = function(mN, numPerCol)
{
 var mnu = this.menu[mN], col = 0, num = 0, pos = 0;
 for (var i = 1; i < mnu.length; i++)
 {
  if (++num > numPerCol) { mnu[0].menuH = pos; pos = 0; num = 1; col++ }
  mnu[i].iX = col * (mnu[0].menuW - 1);
  mnu[i].iY = pos;
  pos += mnu[i].iH - 1;
 }
 mnu[0].menuW *= (col + 1);
};

pMenu.setColumns('mCairns', 18);




// CREATE ANOTHER MENU OBJECT here if you want multiple menus on a page, or you can just
// duplicate this entire file and rename 'pMenu' to something else.
// Every menu object MUST have a menu named 'root' in it, as that's always visible.

//var anotherMenu = new PopupMenu('anotherMenu');
//with (anotherMenu)
//{
// startMenu('root', .....);
// ... make menus here ...
//}




// ******************** MENU EFFECTS ********************
//
// Now you've created a basic menu object, you can add optional effects like borders and
// shadows to specific menus. You can remove this section entirely if you want, the
// functions called are found at the bottom of this file.



// BORDER: Added to all menus in a named object using a specified ItemStyle. The syntax is:
//  addMenuBorder(menuObject, ItemStyle,
//   opacity of border, 'border colour', border width, 'padding colour', padding width);
// Opacity is a number from 0 to 100, or null for solid colour (just like the ItemStyles).


// DROPSHADOW: added to specific ItemStyles again. The syntax is similar, but later on you
// pass arrays [...] for each layer of the shadow you want. I've used two grey layers
// here, but you can use as many or as few as you want. The syntax for the layers is:
//  [opacity, 'layer colour', X offset, Y offset, Width Difference, Height difference]
// Opacity is from 0 to 100 (or null to make it solid), and the X/Y offsets are the
// distance in pixels from the menu's top left corner to that shadow layer's corner.
// The width/height differences are added or subtracted to the current menu size, for
// instance the first layer of this shadow is 4px narrower and shorter than the menu
// it is shadowing.



// ******************** 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.


// Borders and Dropshadows:
//
// Here's the menu border and dropshadow functions we call above. Edit ot delete if you're
// not using them. Basically, they assign a string to pMenu.menu.menuName[0].extraHTML, which
// is written to the document with the menus as they are created -- the string can contain
// anything you want, really. They also adjust the menu dimensions and item positions
// to suit. Dig out the Object Browser script and open up "pMenu" for more info.

