
/* Functions for controlling the navigation menu */

var selectedOption = null;

function SelectOption(obj)
{
    if ( obj != selectedOption )
    {
        var lastOption = selectedOption;
        selectedOption = null;
        MenuMouseOut(lastOption);
        selectedOption = obj;
        obj.style.backgroundColor = 'gold';
        obj.style.color = 'olive';
    }
}

function MenuMouseOver(obj)
{
    if ( obj != selectedOption )
    {
        obj.style.backgroundColor = 'white';
        obj.style.color = 'olive';
    }
}

function MenuMouseOut(obj)
{
    if ( obj != selectedOption )
    {
        obj.style.backgroundColor = 'olive';
        obj.style.color = 'white';
    }
}

function MenuClick(obj,target)
{
    if ( obj != selectedOption )
    {
        SelectOption(obj); 
        window.location = target;
    }
}

/* Additional functions particular to the design steps menu */


function ProcessMenuClick(obj,target)
{
    if ( obj != selectedOption )
    {
        SelectOption(obj);
        ShowDesignStep(target);
    }
}


function ShowDesignStep(stepid)
{
  document.getElementById('designStep').innerHTML = document.getElementById(stepid).innerHTML;
}

