Prova con:

....style.background = 'url(x.gif)';

ciao