// 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#EDE9FD', '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#c7dae9', '10#ffffff', '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-solutions.gif', 'images/btn-solutions.gif', 'nav',  'nav', '',  '', null, null, 'hand', 'default');

try {
  eval(homeTab);
  var Menu1 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-home.gif', '/images/tab-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(productTab);
  var Menu2 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-products.gif', '/images/tab-products.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu2 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-products.gif', '/images/btn-products-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}

try {
  eval(aboutTab);
  var Menu3 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-about.gif', '/images/tab-about.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu3 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-about.gif', '/images/btn-about-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}

try {
  eval(serviceTab);
  var Menu4 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-service.gif', '/images/tab-service.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu4 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-service.gif', '/images/btn-service-on.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
}

try {
  eval(videoTab);
  var Menu5 = new ItemStyle(0, 0, '', 0, 0, '/images/tab-video.gif', '/images/tab-video.gif', 'buttonText', 'buttonHover', '', '', null, null, 'hand', 'default');
} catch(e) {
  var Menu5 = new ItemStyle(0, 0, '', 0, 0, '/images/btn-video.gif', '/images/btn-video-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.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,  305, 162, 16, hBar );

addItem('&nbsp;&nbsp; ', 'mMenu1', 'sm:', Menu1, 82).onclick = 'location.href="/"';
addItem('&nbsp;&nbsp; ', 'mMenu2', 'sm:', Menu2, 110).onclick = 'location.href="/products"';
addItem('&nbsp;&nbsp; ', 'mMenu3', 'sm:', Menu3, 96).onclick = 'location.href="/about"';
addItem('&nbsp;&nbsp; ', 'mMenu4', 'sm:', Menu4, 92).onclick = 'location.href="/service"';
addItem('&nbsp;&nbsp; ', 'mMenu5', 'sm:', Menu5, 80).onclick = 'location.href="/video"';
addItem('&nbsp;&nbsp; ', 'mMenu6', 'sm:', Menu6, 110).onclick = 'location.href="/contact"';
//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, 220, subM);
addItem('<b>Single Scale</b>', '/products/single-scale.php', '',button,22,0).onclick = 'location.href="rates/"';
addItem('<b>Two Scale</b>', '/products/two-scale.php', '',button,22,0);
addItem('<b>Bulk Single</b>', '/products/single-scale-bulk.php', '',button,22,0);
addItem('<b>Bulk Two Scale</b>', '/products/two-scale-bulk.php', '',button,22,0);
addItem('<b>Multiple</b>', '/products/multi-scale.php', '',button,22,0);
addItem('<b>Counters</b>', '/products/counters.php', '',button,22,0);
addItem('<b>Conveyor Scoop/Vertical </b>', '/products/conveyors.php', '',button,22,0);
addItem('<b>Check Weigher </b>', '/products/weigher.php', '',button,22,0);
addItem('<b>Multihead Weighers</b>', '/products/multihead.php', '',button,22,0);
addItem('<b>Bagging Systems</b>', '/products/bagging.php', '',button,22,0);
addItem('<b>Powder/Granule Auger Filler</b>', '/products/auger.php', '',button,22,0);
addItem('<b>Product and Container Handling</b>', '/products/container.php', '',button,22,0);
addItem('<b>Metal Detectors and Check Weighers</b>', '/products/metaldetect.php', '',button,22,0);



// Submenu items for 'Common Applications'
                //startMenu('mCommon', true, 165, 0, 140, subM);
               // addItem('Surveys and Studies', 'solutions/surveys-studies.php', '', button, 25);
                //addItem('Tasks and Time', 'solutions/reporting.php', '', button, 25);
               // addItem('HR', 'solutions/hr.php', '', button, 25);
               // addItem('FAQ', 'solutions/faq.php', '', button, 25);
              //  addItem('Scheduling', 'solutions/scheduling.php', '', button, 25);
              // addItem('Outbound Campaigns', 'solutions/autocaller.php', '', button, 25);
                //addItem('Dispatch', 'solutions/dispatch.php', '', button, 25);
               // addItem('Store Locator', 'solutions/locator.php', '', button, 25);
                //addItem('Crisis Management', 'solutions/crisis.php', '', button, 25);
               // addItem('Notification', 'solutions/notification.php', '', button, 25);


                //startMenu('mIndustry', true, 165, 0, 140, subM);
                //addItem('Call Centers', 'solutions/callcenter.php', '', button, 25);
                //addItem('Finance', 'solutions/finance.php', '', button, 25);
                //addItem('Healthcare', 'solutions/healthcare.php', '', button, 25);
                //addItem('Government', 'solutions/government.php', '', button, 25);
                //addItem('Retail', 'solutions/retail.php', '', button, 25);
                //addItem('Transportation', 'solutions/transportation.php', '', button, 25);
                //addItem('Utilities', 'solutions/utilities.php', '', button, 25);



// About Menu
startMenu('mMenu3', true, 0, 25, 120, subM);
addItem('<b>History</b>', '/about/history.php', '',button,20,0);
//addItem('<b>Parents Handbook</b>', '/documents/parent-handbook.pdf', '',button,26,0);
//addItem('<b>Cooking</b>', '/gallery/jewelry-gemstones', '',button,26,0);
//addItem('<b>Computers</b>', '/gallery/jewelry-bridal', '',button,26,0);
//addItem('<b>Field Trips</b>', '/gallery/jewelry-watches', '',button,26,0);
//addItem('<b>Floor Games</b>', '/gallery/jewelry-custom', '',button,26,0);
//addItem('<b>Homework</b>', '/gallery/jewelry-bridal', '',button,26,0);
//addItem('<b>Music</b>', '/gallery/jewelry-bridal', '',button,26,0);
//addItem('<b>Outside</b>', '/gallery/jewelry-bridal', '',button,26,0);
//addItem('<b>Science</b>', '/gallery/jewelry-bridal', '',button,26,0);
//addItem('<b>SDA</b>', '/gallery/jewelry-bridal', '',button,26,0);
//addItem('<b>Sports</b>', '/gallery/jewelry-bridal', '',button,26,0);
                // Submenu items for VoiceXML Platform
                //startMenu('mPlatform', true, 165, 0, 140, subM);
                //addItem('Backgrounder', 'technology/backgrounder.php', '', button, 25);
                //addItem('Architecture', 'technology/architecture', '', button, 25);
                //addItem('VoiceXML Interpreter', 'technology/interpreter.php', '', button, 25);
                //addItem('Admin Tools', 'technology/admin-tools.php', '', button, 25);
                //addItem('Application Tools', 'technology/application-tools.php', '', button, 25);

                // Submenu items for Hosted Gateways
                //startMenu('mHosted', true, 165, 0, 140, subM);
                //addItem('Facilities', 'technology/facility.php', '', button, 25);



// service Menu
startMenu('mMenu4', true, 0, 25, 180, subM);
//addItem('<b>Registration Forms</b>', '/register/#forms', '',button,22,0);
//addItem('<b>Schedules</b>', '/register/#forms', '',button,22,0);
//addItem('<b>Vacation Release Form</b>', '/register/#forms', '',button,22,0);
//addItem('<b>Fees</b>', '/register/#fees', '',button,22,0);
//addItem('<b>food</b>', '/drygoods/index.php', '',button,22,0);
//addItem('<b>heater/chillers</b>', '/drygoods/index.php', '',button,22,0);
//addItem('<b>lighting</b>', '/drygoods/index.php', '',button,22,0);
//addItem('<b>pumps/powerheads</b>', '/drygoods/index.php', '',button,22,0);
//addItem('<b>protein skimmers</b>', '/drygoods/index.php', '',button,22,0);


                // Submenu items for Custom Systems
                //startMenu('mCustomSystems', true, 165, 0, 140, subM);
                //addItem('3 Step Process', 'support/solution-process.php', '', button, 25);



// Video Menu
startMenu('mMenu5', true, 0, 25, 120, subM);


// contact-us Menu
startMenu('mMenu6', true, 0, 25, 120, subM);
addItem('<b>Contact numbers</b>', '/contact', '',button,22,0);
addItem('<b>Directions</b>', '/contact/directions.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);






// 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 ...
//}


