Need some javascript help


<script>
function clickPost(el){
	var im=el.parentNode.style.backgroundImage;
	var sp0=im.split("/");
	var sp1=sp0[sp0.length-1].split(".");
	document.getElementById("formInp").value=sp1[0];
	document.F.submit();
}
</script>


<div class="thumb" style="background-image: url('images/1.jpg');"><a href='javascript:void(0)' onclick='clickPost(this)'>

This code snags the number from the background-image file, I changed my code around and I believe I need to go to a childnode now but am having issues figuring it out. Thanks


<div id="container">
<a href='javascript:void(0)' onclick='clickPost(this)'><div class="overlay"></div>
<div class="image"><img src="images/2.jpg" /></a></div>
</div>

Which element has the background image?

The very bottom code is what I am using now


<div id="container">
<a href='javascript:void(0)' onclick='clickPost(this)'><div class="overlay"></div>
<div class="image"><img src="images/2.jpg" /></a></div>
</div>

Whats on top in my first post is what was used before