what d'you mean exactly?
you want to display a random image as part of your template?
in this case you can find useful the code i'm using in my homepage to display images in upper-left corner (try refreshing
www.freefallblog.it to see it in action). here it is:
CODE
<script language="JavaScript" type="text/javascript">
<!--// JavaScript to interpolate random images into a page.
var ic = 9; // Number of alternative images
var xoxo = new Array(ic); // Array to hold filenames
xoxo[0] = "http://www.freefallblog.it/images/graphic1.jpg";
xoxo[1] = "http://www.freefallblog.it/images/graphic2.jpg";
xoxo[2] = "http://www.freefallblog.it/images/graphic3.jpg";
xoxo[3] = "http://www.freefallblog.it/images/graphic4.jpg";
xoxo[4] = "http://www.freefallblog.it/images/graphic5.jpg";
xoxo[5] = "http://www.freefallblog.it/images/graphic6.jpg";
xoxo[6] = "http://www.freefallblog.it/images/graphic7.jpg";
xoxo[7] = "http://www.freefallblog.it/images/graphic8.jpg";
xoxo[8] = "http://www.freefallblog.it/images/graphic9.jpg";
function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}
// Write out an IMG tag, using a randomly-chosen image name.
var choice = pickRandom(ic);
// -->
</script>
and then
<script LANGUAGE="JavaScript" type="text/javascript">document.writeln('<IMG SRC="'+xoxo[choice]+'" HEIGHT=136 WIDTH=162 BORDER=0 ALT="Refresh it, baby! :)">');</SCRIPT>
or d'you have a photoblog and want to display a random image from your photolog in your homepage?