﻿
    // Highlight on - no tab
    function MenuMouseOverNoTab(item) {

        // Clear all tabs - to allow quick switching from one menu item to the other
        ClearAllTabs()

        // Highlight the menu item
        item.className = 'MenuItemOn';

    }


    // Show menu tab - from the menu bar
    function MenuMouseOver(tab, item) {

        // Clear all tabs - to allow quick switching from one menu item to the other
        ClearAllTabs()

        // Show the menu tab
        document.getElementById(tab).className = 'MenuTabOn';

        // Highlight the menu item
        item.className = 'MenuItemOn';

    }

    // Show menu tab - from the tab itself
    function TabMouseOver(tab, item) {

        // Hide the menu tab
        tab.className = 'MenuTabOn';

        // Unhighlight the menu item
        document.getElementById(item).className = 'MenuItemOn';
    }


    // Highlight off - no tab
    function MenuMouseOutNoTab(item) {

        // Unhighlight the menu item
        item.className = 'MenuItemOff';
    }


    // Hide menu tab - from the menu bar
    function MenuMouseOut(tab, item) {

        // Pause a bit to allow the mouse to move to the tab
        pausecomp(250);

        // Hide the menu tab
        document.getElementById(tab).className = 'MenuTabOff';

        // Unhighlight the menu item
        item.className = 'MenuItemOff';
    }

        
    // Hide menu tab - from the tab itself
    function TabMouseOut(tab, item) {

        // Hide the menu tab
        tab.className = 'MenuTabOff';

        // Unhighlight the menu item
        document.getElementById(item).className = 'MenuItemOff';
    }


    // Clears all tabs
    function ClearAllTabs() 
    {
        // Services
        document.getElementById("ServicesButton").className = 'MenuItemOff';
        document.getElementById("ServicesMenu").className = 'MenuTabOff';

        // Client success stories
        document.getElementById("ClientSuccessButton").className = 'MenuItemOff';
        document.getElementById("ClientSuccessMenu").className = 'MenuTabOff';

        // Hot topics and knowledge base
        document.getElementById("HotTopicsButton").className = 'MenuItemOff';
        document.getElementById("HotTopicsMenu").className = 'MenuTabOff';

        // About DC
        document.getElementById("AboutButton").className = 'MenuItemOff';
        document.getElementById("AboutMenu").className = 'MenuTabOff';

        // Contact
        document.getElementById("ContactButton").className = 'MenuItemOff';
        document.getElementById("ContactMenu").className = 'MenuTabOff';

    }


    // Pause function
    function pausecomp(millis) {
        var date = new Date();
        var curDate = null;

        do { curDate = new Date(); }
        while (curDate - date < millis);
    } 



