Say I've got these functions. They're used to switch the color and background image of a button and imagefield respectively, depending on a user's choice from a menu list. Keep in mind this is just for Explorer at the moment while I'm trying some things out:

function changeColorBox()
{
eval("document.form1.button.style.backgroundColor='" + document.form1.ColorMenu.options[document.form1.ColorMenu.selectedIndex].value + "'");
eval("document.images.imageField.src='images/spacer.gif'");
eval("document.form1.printSelect.options.selectedIndex='0'");
eval("document.form1.button.value=''");
}
function changeBackground()
{
eval("document.images.imageField.src='" + document.form1.printSelect.options[document.form1.printSelect.selectedIndex].value + "'");
eval("document.form1.button.style.backgroundColor='white'");
eval("document.form1.ColorMenu.options.selectedIndex='0'");
eval("document.form1.button.value='Print Selected'");
}

As you can see, this works for one form only - "form1". I want to be able to pass a variable form name so I can use these functions for multiple forms.

<select style="width:120" onChange="changeColorBox(this);" name="ColorMenu">