Helloo!
I don't think document.write is any good for anything... :-P
At least I've never found a good use for it.
It looks like you want to add a picture to your page.
Code:
var elementName = 'CHANGE_ME'; /* ID of the html element you want to add the pic to */
var imageName = 'CHANGE_ME.BMP'; /* Name of the image file */
var myImage = document.createElement('img');
myImage.setAttribute('src', imageName);
document.getElementById(elementName).appendChild(myImage);
You can find lots of good information about DOM manipulation online.
If this isn't what you want or you have any questions just ask.
Joe