// change the background color of required form fields // once they have typed in something function backgroundChange( field, fieldValue, offColor, onColor ) { if ( fieldValue.length > 0 ) { field.style.backgroundColor = offColor; } else { field.style.backgroundColor = onColor; } }