gui pop up when you mouse over an object

I want to mouse over a computer when you are close and have a gui pop up saying press e to whatever. how can i do this without putting a function in a function?

function OnGUI(){
GUI.Box(Rect(10,10,150,100), "Press E to enter turret");

function OnMouseOver() {

    Debug.Log ("computer here");

    }
}

Use a boolean and check that boolean inside OnGUI.

var showGUI : boolean;

function OnMouseEnter()
{
    showGUI = true;
}

function OnMouseExit()
{
    showGUI = false;
}

function OnGUI()
{
    if (showGUI)
    {
        GUI.Label(...)
    }
}