javascript onClick help

I have two radio buttons with corresponding text boxes for input, when one is chosen I am disabling the text box for the other, is there a way to "gray out" the disabled text box using background-color or something? Any help is greatly appreciated, right now my onClick looks like this:

onClick=javascript:document.UserReg." + TEXT_ACCOUNT_NBR + ".disabled=true

// element is the textbox object
element.style.backgroundColor="#CCCCCC"

Make a javascript function and put such code inside leaving just the function call in HTML, or it will be terribly difficult to maintain.

But this is not anyhow related to UNIX .......