CSS to modify <img> SRC parameter ??

I’ve got a HTML / CSS problem that has me stumped and my online sources are failing me. All my experiments have come to naught.

I have a web page that contains an element like:
<img id=“myImgID” src=“SomeGraphic.gif”>

I need to modify the final browser-side result so the browser interprets that tag to display a different graphic, say “OtherGraphic.gif”. Easy, right? But …
The page is dynamically generated by code we don’t control and we have NO ability to modify the HTML emitted by the server. None.

We also do NOT have the ability to insert any script into the page, either directly inline, or by modifying a server-side file referenced by something like:
<script type=“text/javascript” src=“SomeScript.js”></script>
And no, we can’t just replace the contents of the one graphic with the other.
What we DO have is that the HTML references a server-side CSS file like this:
<link rel=“STYLESHEET” type=“text/css” href=“MyStyleSheet.css”>
and we CAN modify the MyStyleSheet.css file.
So: Is it possible to insert css elements into the css file which will have the effect of changing the value of the img tag’s src attribute? We can rely on the ID of the desired img tag being both static and unique.

Is there a way to sneak script into the css? It’d need to be both the script call and the source code, not just a call to script that would have to be loaded elsewhere.

The target browser is IE6, plus ideally all the other modern ones.

I don’t think that either of these methods would work and I can’t test them for you right now but might as well give it a shot…

#myImgID { src: url(‘newimage.gif’)}

OR, slap this at the bottom of the css page:

document.getImageById(‘myImgID’).src = ‘newimage.gif’

Those are the only possible ways I can think of manipulating an image, and I don’t think that src is a CSS attribute (first example) so that won’t work but you can give it a shot. MAYBE putting JS at the end of a CSS page would work.

Otherwise…you’re SOL.

Not document.getImageById…

document.getElementById(‘myImgId’).src = ‘newimage.gif’