I can't find the problem with this code and I've been having way too much trouble with it tonight, can anyone help me out?
<html>
<script type="text/javascript">
var image = new Array ();
image[0] = "header1.png";
image[1] = "header2.png";
image[2] = "header3.png";
image[3] = "header4.png";
var size = image.length
var x = Math.floor(size*Math.random())
var backgroundImageFile = image[x];
var backgroundImageUrl = "url('" + backgroundImageFile + "')";
$('#header-image').css('background-image', 'backgroundImageUrl');
function op()
{
document.getElementById('header-image').innerHTML=backgroundImageUrl;
}
</script>
<body onload="op();">
<img src="backgroundImageFile">
</body>
</html>
$('#header-image').css('background-image', backgroundImageUrl);#header-image