For calling and passing read this: http://www.w3schools.com/js/js_functions.asp
P.S. Did you run what I gave you? Did the page refresh? Did the div magically show the image? And did the image (Even if larger then the div) fit perfectly?