if (document.images) { // preload the button images
    homeon = new Image();	homeon.src = "../graphics/home-on.gif";
    homeoff = new Image();	homeoff.src = "../graphics/home-off.gif";
}  

function imageon(img) { // show active button
    if (document.images) document[img].src = eval(img + "on.src");
}

function imageoff(img) { // show inactive button
    if (document.images) document[img].src = eval(img + "off.src");
}