// Cascading Popup Menus v5.2 - Single Frame Menu example script.



// '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(40, 10, '', 0, 0, '', '10#E7ECFD', 'highText', 'highText', '', '',
 null, null, 'hand', 'default');

// The 'sub Menu' items: these have popout indicators of "Greater Than" signs ">" 15px from their
// right edge, and CSS borders. Text class also changes on mouseover.
var subM = new ItemStyle(22, 0, '>', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

// 'subBlank' is similar, but has an 'off' border the same colour as its background so it
// appears borderless when dim, and 1px spacing between items to show the hover border.
var subBlank = new ItemStyle(22, 1, '>', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');

// The purplish 'button' style also has 1px spacing to show up the fancy border, and it has
// different colours/text and less padding. They also have translucency set -- these items
// are 80% opaque when dim and 95% when highlighted. It uses the 'crosshair' cursor for items.
var button = new ItemStyle(22, 1, '>', -15, 2, '10#E7ECFD', '10#C5BBD3', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', 100, 90, 'default', 'default');

//var navRoot = new ItemStyle(0, 0, '', 0, 0, '/images/btn-home.gif', '/images/btn-home-on.gif', 'nav',  'nav', '',  '', null, null, 'hand', 'default');

//var navRoot1 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-service.gif', '/images/btn-service.gif', 'nav',  'nav', '',  '', null, null, 'hand', 'default');

try {
  eval(homeTab);
  var Menu1 = new ItemStyle(0, 0, '', 0, 0, '/images/home.gif', '/images/home.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch (e) {
  var Menu1 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-home.gif', '/images/btn-home-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}


try {
  eval(serviceTab);
  var Menu2 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-service.gif', '/images/tab-service.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu2 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-service.gif', '/images/btn-service-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}

try {
  eval(haulTab);
  var Menu3 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-haul.gif', '/images/tab-haul.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu3 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-haul.gif', '/images/btn-haul-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}

try {
  eval(storageTab);
  var Menu4 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-storage.gif', '/images/tab-storage.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu4 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-storage.gif', '/images/btn-storage-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}

try {
  eval(salesTab);
  var Menu5 = new ItemStyle(0, 0, '', -0, 0, '/images/tab-sales.gif', '/images/tab-sales.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu5 = new ItemStyle(0, 0, '', -0, 0, '/images/btn-sales.gif', '/images/btn-sales-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}

try {
  eval(contactTab);
  var Menu6 = new ItemStyle(0, 0, '', -0, 0, '/images/tab-contact.gif', '/images/tab-contact-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu6 = new ItemStyle(0, 0, '', -0, 0, '/images/btn-contact.gif', '/images/btn-contact-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}



// 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)
{

// The example 'root' menu is horizontal (false), positioned at (x = 10, y = 0), is 17px high,
// and items use the colours and dimensions in the 'hBar' ItemStyle defined above by default.
// If you want a vertical menu, change "false" to "true", and raise 17 to about 100 for the width.
// Most of these are 'sm:' items popping out submenus, except the last 'js:' JavaScript command to
// pop open a new window. It also has its own ItemStyle and width specified, longer than the rest.

startMenu('root', false, 320, 277, 22, hBar );

addItem('&nbsp;&nbsp; ', 'mMenu1', 'sm:', Menu1, 73).onclick = 'location.href="/"';
addItem('&nbsp;&nbsp; ', 'mMenu2', 'sm:', Menu2, 119).onclick = 'location.href="/rates/winterize.php"';
addItem('&nbsp;&nbsp; ', 'mMenu3', 'sm:', Menu3, 130).onclick = 'location.href="/haul/index.php"';
addItem('&nbsp;&nbsp; ', 'mMenu4', 'sm:', Menu4, 94).onclick = 'location.href="/storage/index.php"';
addItem('&nbsp;&nbsp; ', 'mMenu5', 'sm:', Menu5, 76).onclick = 'location.href="/sales/index.php"';
addItem('&nbsp;&nbsp; ', 'mMenu6', 'sm:', Menu6, 85).onclick = 'location.href="/aboutus/index.php"';
//addItem('  Visit My Site', 'window.open("http://www.twinhelix.com")', 'js:', hBar, 80);


// This is a vertical menu positioned 0px across and 22px down from its trigger, and is 80px wide.
// The URLs are set to # here, be sure to replace them with your path/file names or JS functions!
// Also note how the types are '', indicating these links open in the current frame/window.
// The last item here changes its text on mouseover (^ separates the two strings), links to my site,
// and has a custom ItemStyle and length specified so it's longer than the rest.

startMenu('mMenu1', true, 0, 25, 120, subM);
//addItem('Main Page', 'index.php', '',button,22,0);
//addItem('Screen Shots', 'screenshots.html', '',button,22,0);
//addItem('Project Timeline', 'timeline.html', '',button,22,0);
//addItem('Development Info', 'mReopen', 'sm:',button,22,0);

//addItem('TwinHelix', 'window.open("http://www.twinhelix.com")', 'js:', button,22,0);


startMenu('mMenu2', true, 0, 25, 160, subM);
//addItem('<b>Overview</b>', '/service/index.php', '',button,22,0);
addItem('<b>Rates</b>', '/rates/winterize.php', '',button,22,0);
//addItem('<b>Small Outboard</b>', 'mCommon', 'sm:',button,22,0).onclick = 'location.href="service/applications.php"';
//addItem('<b>Medium Outboard</b>', 'mIndustry', 'sm:',button,22,0).onclick = 'location.href="service/by-industry.php"';
//addItem('<b>Large Outboard</b>', '/service/custom.php', '',button,22,0);
//addItem('<b>Outdrive</b>', '/service/case-studies.php', '',button,22,0);

// Submenu items for 'Common Applications'
                startMenu('mCommon', true, 165, 0, 140, subM);
                //addItem('Surveys and Studies', 'service/surveys-studies.php', '', button, 25);
                //addItem('Tasks and Time', 'service/reporting.php', '', button, 25);
                //addItem('HR', 'service/hr.php', '', button, 25);
                //addItem('FAQ', 'service/faq.php', '', button, 25);
                //addItem('Scheduling', 'service/scheduling.php', '', button, 25);
                //addItem('Outbound Campaigns', 'service/autocaller.php', '', button, 25);
                //addItem('Dispatch', 'service/dispatch.php', '', button, 25);
                //addItem('Store Locator', 'service/locator.php', '', button, 25);
                //addItem('Crisis Management', 'service/crisis.php', '', button, 25);
                //addItem('Notification', 'service/notification.php', '', button, 25);


                startMenu('mIndustry', true, 165, 0, 140, subM);
                //addItem('Call Centers', 'service/callcenter.php', '', button, 25);
                //addItem('Finance', 'service/finance.php', '', button, 25);
                //addItem('Healthcare', 'service/healthcare.php', '', button, 25);
                //addItem('Government', 'service/government.php', '', button, 25);
                //addItem('Retail', 'service/retail.php', '', button, 25);
                //addItem('Transportation', 'service/transportation.php', '', button, 25);
                //addItem('Utilities', 'service/utilities.php', '', button, 25);



// 'haul Menu
startMenu('mMenu3', true, 0, 25, 160, subM);
addItem('<b>Rates</b>', '/haul/index.php', '',button,26,0);
//addItem('<b>VoiceXML IVR Software</b>', 'mPlatform', 'sm:',button,26,0).onclick = 'location.href="haul/platform-software.php"';
//addItem('<b>Turnkey VXML Gateways</b>', 'haul/turnkey-systems.php', '',button,26,0);
//addItem('<b>Plugins/Packages</b>', 'haul/plug-ins.php', '',button,26,0);
//addItem('<b>Hosted Gateways</b>', 'mHosted', 'sm:',button,26,0).onclick = 'location.href="haul/hosted-gateway.php"';
//addItem('<b>Demos/Examples</b>', 'haul/demos.php', '',button,26,0);

                // Submenu items for VoiceXML Platform
                startMenu('mPlatform', true, 165, 0, 140, subM);
                //addItem('Backgrounder', 'haul/backgrounder.php', '', button, 25);
                //addItem('Architecture', 'haul/architecture', '', button, 25);
                //addItem('VoiceXML Interpreter', 'haul/interpreter.php', '', button, 25);
                //addItem('Admin Tools', 'haul/admin-tools.php', '', button, 25);
                //addItem('Application Tools', 'haul/application-tools.php', '', button, 25);

                // Submenu items for Hosted Gateways
                //startMenu('mHosted', true, 165, 0, 140, subM);
                //addItem('Facilities', 'haul/facility.php', '', button, 25);



// storage Menu
startMenu('mMenu4', true, 0, 25, 180, subM);
addItem('<b>Rates</b>', '/storage/index.php', '',button,22,0);
//addItem('<b>Custom Systems</b>', 'mCustomSystems', 'sm:',button,26,0).onclick = 'location.href="storage/professional-services.php"';
//addItem('<b>Product storage</b>', 'storage/product-storage.php', '',button,22,0);
//addItem('<b>Training Programs</b>', 'storage/training-programs.php', '',button,22,0);


                // Submenu items for Custom Systems
                startMenu('mCustomSystems', true, 165, 0, 140, subM);
                addItem('3 Step Process', 'storage/solution-process.php', '', button, 25);



// Sales Menu
startMenu('mMenu5', true, 0, 25, 160, subM);
//addItem('<b>How to Buy</b>', 'sales/how-to-buy.php', '',button,22,0);
//addItem('<b>Free Dev Site</b>', 'sales/devsite.php', '',button,22,0);
//addItem('<b>Free Trial Software</b>', 'sales/freetrial.php', '',button,22,0);
//addItem('<b>Application Partnerships</b>', 'sales/applicationpartners.php', '',button,22,0);
//addItem('<b>Reseller Opportunities</b>', 'sales/partnership-opportunities.php', '',button,22,0);



// About Us Menu
startMenu('mMenu6', true, 0, 25, 115, subM);
//addItem('<b>Company Profile</b>', 'aboutus/company.php', '',button,22,0);
//addItem('<b>Management</b>', 'aboutus/management.php', '',button,22,0);
//addItem('<b>Contact Us</b>', 'aboutus/contact.php', '',button,22,0);
//addItem('<b>Careers</b>', 'aboutus/careers.php', '',button,22,0);





// You can also customise hide or show delays (in milliseconds) to the menus. 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.
//
// You can assign 'oncreate' events to specific menus. By default, the script has only one for
// the root menu that shows it when it is created. You may wish to change it to something like the
// following, which uses the animation function to show the menu, or delay its show altogether.
//menu.root[0].oncreate = function() { pMenu.doVis('root', true) }

// End of 'with (pMenu)' block. That's one menu object created!

}



// 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 ...
//}


