// 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(150, 0, '', 0, 0, '#283d42', '#34545c', 'itemText', 'itemText', '', '', null, null); var cairnsM = new ItemStyle(42, 0, '>', 0, 5, '#283d42', '#34545c', 'itemText1', 'itemHover', 'itemBorder', 'itemBorder', null, null); // Jody added code here for booking tab - 09/07/2003 if (typeof bnbName == "undefined") showBookBtn=false; menuBarSize=1400; // 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, '0 ', 0, 60, hBar); addItem('Home', '/index.php', ''); addItem('
Cairns & Suburbs BNBNQ
', 'mCairns', 'sm:'); addItem('
South Of Cairns BNBNQ
', 'mSouth', 'sm:'); addItem('
Tablelands BNBNQ
', 'mTable', 'sm:'); addItem('
North Of Cairns BNBNQ
', 'mNorth', 'sm:'); addItem('South Queensland', 'bbfqRedirect.php', ''); addItem('About Us', '/aboutus.php', ''); addItem('Links', '/links.php', ''); startMenu('mCairns', true, 0, 60, 300, cairnsM); addItem('Kookas - Edge Hill', 'window.open("http://www.kookas-bnb.com/")', 'js:'); addItem('South Pacific B & B Clifton Beach - Clifton Beach', 'window.open("http://www.southpacificbnbcliftonbeach.com.au")', 'js:'); startMenu('mSouth', true, 0, 60, 300, cairnsM); addItem('Cairns Gateway B & B Cottage - Gordonvale', 'window.open("http://www.cairnsgwaybb.com")', 'js:'); startMenu('mTable', true, 0, 60, 300, cairnsM); addItem('A Tinaroo Escape - Tinaroo Via Kairi', 'window.open("http://www.atinarooescape.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('Gilberton Outback Retreat - Einasleigh', 'window.open("http://www.gilbertonoutbackretreat.com/")', 'js:'); addItem('Possum Valley Rainforest Cottages - Ravenshoe', 'window.open("http://www.possumvalley.com.au/")', 'js:'); addItem('Sweetwater Lodge - Julatten', 'window.open("http://www.sweetwaterlodge.com.au")', 'js:'); addItem('The Pond Cottage - Ravenshoe', 'window.open("http://www.bnbnq.com.au/pondcottage")', 'js:'); addItem('The Summit Rainforest Retreat - Atherton', 'window.open("http://www.summitrainforestretreat.com")', 'js:'); startMenu('mNorth', true, 0, 60, 300, cairnsM); addItem('Bustard Downs - Maryfarms Via Mt Molloy', 'window.open("http://www.bustarddowns.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('Mossman Gorge Bed & Breakfast - Mossman', 'window.open("http://www.bnbnq.com.au/mossgorge")', 'js:'); addItem('Port Douglas B & B Four Mile Beach - Port Douglas (four Mile Beach)', 'window.open("http://www.bnbnq.com.au/portdouglasbb4mile")', '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); pMenu.setColumns('mTable', 18); pMenu.setColumns('mSouth', 18); pMenu.setColumns('mNorth', 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.