// 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(85, 0, '', 0, 0, '#ffc800', '#ff9700', 'itemText', 'itemText', '', '', null, null); var cairnsM = new ItemStyle(22, 0, '>', -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=800; // 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. // 'page.winW()-menuBarSize' startMenu('root', false, 'page.winW()-menuBarSize ', 0, 45, hBar); addItem('', 'mCairns', 'sm:'); addItem('', 'mSouth', 'sm:'); addItem('', 'mTable', 'sm:'); addItem('', 'mNorth', 'sm:'); addItem('Southern Queensland', 'http://www.bbfq.com.au/', ''); addItem('', '/giftVoucher.html', ''); addItem('', '/aboutus.php', ''); addItem('', '/links.php', ''); addItem('', '/map.htm', ''); startMenu('mCairns', true, 0, 24, 300, cairnsM); addItem('Bayview House - Bayview ', 'window.open("http://www.cairnsluxurybandb.com.au")', 'js:'); addItem('Billabong B & B - Holloways Beach ', 'window.open("http://www.cairns-bed-breakfast.com/")', 'js:'); addItem('Bluewater B & B - Trinity Park ', 'window.open("http://www.bluewaterbbcairns.com.au/")', 'js:'); addItem('Cairns Edge Hill Bed & Breakfast - Edge Hill ', 'window.open("http://www.cairnsedgehillbnb.com.au")', 'js:'); addItem('Cairns Reef N Rainforest Bnb - Earlville ', 'window.open("http://www.cairnsreefbnb.com.au/")', 'js:'); addItem('Capers At Kanimbla - Kanimbla', 'under repair', ''); addItem('Clifton Beach Retreat - Clifton Beach', 'window.open("http://www.cliftonbeachretreat.com.au")', 'js:'); addItem('Galvins Edge Hill B & B - Edge Hill', 'window.open("http://www.galvinsonedge.com.au")', 'js:'); addItem('Gum Tree Retreat - Clifton Beach', 'window.open("http://www.bnbnq.com.au/gumtree/")', 'js:'); addItem('Jungara Cairns B & B - Redlynch ', 'window.open("http://www.jungara.net.au")', 'js:'); addItem('Kookas - Edge Hill ', 'window.open("http://www.kookas-bnb.com/")', 'js:'); addItem('Lilybank - Stratford', 'window.open("http://www.lilybank.com.au/")', 'js:'); addItem('Nigana B & B - Caravonica ', 'window.open("http://www.nigana-cairns.com.au")', 'js:'); addItem('The Garden Gate B & B - Edge Hill', 'window.open("http://www.bnbnq.com.au/thegardengate/")', 'js:'); addItem('Toby`s Retreat At Holloways Beach - Holloways Beach', 'window.open("http://www.tobysretreat.com.au")', 'js:'); addItem('Villa Gail - Yorkeys Knob', 'window.open("http://www.avillagail.com")', 'js:'); startMenu('mSouth', true, 0, 24, 300, cairnsM); addItem('Bartle Frere B & B - Bartle Frere', 'window.open("http://www.bartlefrerebedandbreakfast.com.au")', 'js:'); addItem('Cairns Gateway B & B Cottage - Gordonvale ', 'window.open("http://www.cairnsgwaybb.com")', 'js:'); addItem('Hibiscus Lodge - Mission Beach, ', 'window.open("http://www.bnbnq.com.au/hibiscuslodge/")', 'js:'); addItem('Seascape Bed & Breakfast - Cardwell', 'window.open("http://www.bnbnq.com.au/seascape")', 'js:'); startMenu('mTable', true, 0, 24, 300, cairnsM); addItem('Albert Manor - Yungaburra', 'window.open("http://www.albertmanor.com.au")', 'js:'); addItem('Allawah Retreat - Tolga Via Atherton ', 'window.open("http://www.allawah-retreat.com.au")', 'js:'); addItem('Atherton Blue Gum B&b - Atherton', 'window.open("http://www.athertonbluegum.com")', 'js:'); addItem('Barking Owl Retreat - Kairi', 'window.open("http://www.barkingowlretreat.com.au/")', 'js:'); addItem('Bustard Downs - Maryfarms Via Mt Molloy', 'window.open("http://www.bustarddowns.com.au")', 'js:'); addItem('Chilverton Cottages And Fine Dining - Ravenshoe ', 'window.open("http://www.chilvertoncottages.com.au")', 'js:'); addItem('Crater Lakes Rainforest Cottages - Atherton Tablelands ', 'window.open("http://www.craterlakes.com.au/ ")', 'js:'); addItem('Grandview Country Retreat - Atherton Tablelands', 'window.open("http://www.grandviewcountry.com.au")', 'js:'); addItem('Isabels On The Hill B & B - Atherton', 'window.open("http://www.isabelsonthehill.com")', 'js:'); addItem('Jabiru Safari Camp - Biboohra Via Mareeba', 'window.open("http://www.jabirusafarilodge.com.au")', 'js:'); addItem('Julatten Birdlovers Cottage - Julatten', 'window.open("http://www.julatten.com")', 'js:'); addItem('Misty Manor Bed & Breakfast - Malanda', 'window.open("http://www.mistymanorbedandbreakfast.com.au")', 'js:'); addItem('Mt Quincan Crater Retreat - Yungaburra ', 'window.open("http://www.mtquincan.com.au")', 'js:'); addItem('Possum Valley Rainforest Cottages - Ravenshoe', 'window.open("http://www.bnbnq.com.au/possumvalley")', 'js:'); 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.thelongyard.com/")', 'js:'); addItem('The Pond Cottage B & B - Ravenshoe ', 'window.open("http://www.bnbnq.com.au/pondcottage")', 'js:'); addItem('The Summit Rainforest Retreat - Atherton', 'window.open("http://www.summitrainforestretreat.com")', 'js:'); addItem('Tinaroo Escape - Tinaroo Via Kairi', 'window.open("http://www.atinarooescape.com.au")', 'js:'); addItem('Williams Lodge - Yungaburra', 'window.open("http://www.williamslodge.com")', 'js:'); startMenu('mNorth', true, 0, 24, 300, cairnsM); addItem('Cape Trib Exotic Fruit Farm - Cape Tribulation', 'window.open("http://www.capetrib.com.au/")', 'js:'); addItem('Cape Tribulation Sanctuary - Cape Tribulation', 'window.open("http://www.capetribulationsanctuary.com.au/")', 'js:'); addItem('Cow Bay Homestay - Cow Bay', 'window.open("http://www.cowbayhomestay.com/")', 'js:'); addItem('Daintree Valley Haven - Daintree', 'window.open("http://www.daintreevalleyhaven.com.au")', 'js:'); addItem('Marae - Shannonvale Via Port Douglas', 'window.open("http://www.marae.com.au/marae.html")', 'js:'); addItem('Mossman Fantail B & B - Mossman', 'window.open("http://www.fantailbnb.com.au")', 'js:'); addItem('Mossman Gorge Bed & Breakfast - Mossman ', 'window.open("http://www.bnbnq.com.au/mossgorge")', 'js:'); addItem('Mountain View Lodge - Oak Beach, Port Douglas ', 'window.open("http://www.mountainviewlodge-australia.com/")', 'js:'); addItem('Papillon - Mossman ', 'window.open("http://www.bnbnq.com.au/papillon/")', 'js:'); addItem('Paradise Villa - Port Douglas ', 'window.open("http://www.bnbnq.com.au/paradise")', 'js:'); addItem('Port Douglas B & B Four Mile Beach - Port Douglas (four Mile Beach) ', 'window.open("http://www.portdouglasbb.com")', 'js:'); addItem('Red Mill House Bed & Breakfast - Daintree', 'window.open("http://www.redmillhouse.com.au/")', 'js:'); addItem('Sea Change B & B - Newell Beach ', 'window.open("http://www.daintreebeachbnb.com")', 'js:'); addItem('Treehouse B & B - Mossman', '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', 15); pMenu.setColumns('mTable', 15); pMenu.setColumns('mSouth', 15); pMenu.setColumns('mNorth', 15); // 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.