﻿function showMenu(menuHead, menuName, imageID, imageURL)
    {
        var menuShow = document.getElementById(menuName);
        //menuHead.style['backgroundColor'] = '#AAAA33';
        var menuImage = document.getElementById(imageID);
        menuImage.src = imageURL;
        if (menuShow)
        {
            menuShow.style['display'] = 'block';
            menuShow.setAttribute('class', 'menuoff');
            menuShow.setAttribute('className', 'menuoff');
        }
    }
    function hideMenu(menuHead, menuName, imageID, imageURL)
    {
        var menuShow = document.getElementById(menuName);
        //menuHead.style['backgroundColor'] = 'ActiveCaption';
        var menuImage = document.getElementById(imageID);
        menuImage.src = imageURL;
        if (menuShow)
        {
            menuShow.style['display'] = 'none';
            menuShow.setAttribute('class', 'menudrop');
            menuShow.setAttribute('className', 'menudrop');
        }
    }
    function overItem(menuItem)
    {
        menuItem.setAttribute('class', 'menudrop');
        menuItem.setAttribute('className', 'menudrop');
    }
    function outItem(menuItem)
    {
        menuItem.setAttribute('class', 'menuoff');
        menuItem.setAttribute('className', 'menuoff');
    }
	function overSub(menuItem, parentItem)
	{
		overItem(menuItem);
		var parentShow = document.getElementById(parentItem);
		parentShow.setAttribute('onclick', '');
	}
	function outSub(menuItem, parentItem, address)
	{
		outItem(menuItem);
		var parentShow = document.getElementById(parentItem);
		parentShow.setAttribute('onclick', 'clickMenu(\'' + address + '\')');
	}
    function showSub(menuSub, subName)
    {
        var menuShow = document.getElementById(subName);
        menuShow.style['display'] = 'inline';
        menuShow.setAttribute('class', 'menuoff');
        menuShow.setAttribute('className', 'menuoff');
    }
    function hideSub(menuSub, subName)
    {
        var menuShow = document.getElementById(subName);
        menuShow.style['display'] = 'none';
        menuShow.setAttribute('class', 'menudrop');
        menuShow.setAttribute('className', 'menudrop');

    }
    function clickMenu(address)
    {
        switch(address) {
        // Services
            case 'services':
                window.location = 'services.asp';
                break;
            case 'services overview':
                window.location = 'services.asp';
                break;
            case 'product procurement':
                window.location = '';
                break;
            case 'asset recovery':
                window.location = '';
                break;
            case 'vendor managed inventory':
                window.location = 'vmi.asp';
                break;
            case 'excess inventory management':
                window.location = 'excessinventory.asp';
                break;
            case 'market information':
                window.location = '';
                break;
            case 'eol/obsolete sourcing':
                window.location = 'eol.asp';
                break;
            case 'eol specialists':
                window.location = 'eolspecialists.asp';
                break;
				
        // Quality
            case 'quality':
                window.location = 'quality.asp';
                break;
            case 'quality overview':
                window.location = 'quality.asp';
                break;
            case 'process':
                window.location = 'qualityprocess.asp';
                break;
            case 'certifications':
                window.location = 'index.asp';
                break;
            case 'rohs compliance':
                window.location = 'rohs.asp';
                break;
            case 'approved vendor program':
                window.location = 'approvedvendor.asp' ;
                break;
        // About CCI
            case 'about':
                window.location = 'aboutus.asp';
                break;
            case 'about us':
                window.location = 'aboutus.asp';
                break;
            case 'executive staff':
                window.location = 'executives.asp';
                break;
            case 'locations':
                window.location = 'contact.asp';
                break;
            case 'contact':
                window.location = 'contact.asp';
                break;
        // Careers
            case 'careers':
                window.location = 'careers.asp';
                break;
            case 'openings':
                window.location = 'careers.asp';
                break;
            case 'benefits':
                window.location = 'benefits.asp';
                break;
        }
    }


