If images and text are changing, the variable names don't need to change. The variable values could change.
To change an image, change its src property to the URL of the new image, e.g.
- document.getElementById("imgid").src = "newurl.gif";
To change the text, access the element (probably a div) that contains the text and change its innerHTML property to the new text. (Note: OK, there's a more standard compliant way, but its more difficult. If you want to do it the standard way, I can give you pointers for that).