So I know that it is easy enough to swap images of named img tags
<img name="image1" src="" />
<script>document["image1"].src="candybar.jpg";</script>
The problem is that I am being forced to use content server, and I can't name the image tag.
So If I name a Div tag that wraps the image can I use that to specify the image tag in question?
Something like..
<div id="namedDiv"><img src="" /></div>
<script>
var imgDiv=document.getElementById['namedDiv'];
imgDiv.$imgtag$.src="candybar.jpg";
</script>
So because I know the parent, and it only has 1 image tage within, i want to say "hey Div, give me your only child as an object"