All true, except what pcbrainbuster said, but the reason your original code didn't work are these:
Code:
case 1: { document.write("now with 10%25 more potatoes!"; break); break [color=red]}
Switch statements use a series of labels, not code blocks (one more reason they should be outlawed
), and that break has no business being inside a function's brackets. Also, you've failed to account for case 0, and non-Javascript browsers.
Code:
<img src="http://www.a2h.8m6.net/images/logo.php?msg=some%20default%20message" alt="Banner" id="banner">
<script type="text/javascript" src="http://www.twey.co.uk/pythonic.js"></script>
<script type="text/javascript">
Twey.Pythonic.LOAD("Array.randomChoice");
document.images['banner'].src = "http://www.a2h.8m6.net/images/logo.php?msg=" +
encodeURIComponent([
"now with 10% more potatoes!",
"anger2headshot is not a crack dealer.",
"here is your free complementary wastage of your internet bandwidth...",
"CHUCK NORRIS IS BEHIND YOU!!!",
"free lying parrot not provided."
].randomChoice());
</script>
Untested.
Bookmarks