Possible Duplicate:
Javascript hard refresh of current page
I have a random image javascript that loads a random image on page load. I would like to load another random image when clicking a link named "Random image". Here is the page: http://www.heybrian.com/
The way it is now, the "Random image" link just refreshes the entire page which pulls in a new random image.
EDIT:
Below is the (truncated) javascript code. Please note that there are about 100 random photos that can load, but I've only included four, to simplify:
images = new Array(99);
images[0] = "<div id='content_white_border' style='border: 1px white solid;'><div id='content_photo'><a href = 'travels/thailand/2004/ko_tao.php'><img src='lib/images/travels/thailand/2004/ko_tao_mango_bay.jpg' alt='' width='956' height='512' border='0' /></a></div></div><h4>Mango Bay (Taa Toh Bay), Ko Tao — April 9, 2004</h4>";
images[1] = "<div id='content_white_border' style='border: 1px white solid;'><div id='content_photo'><a href = 'travels/france'><img src='lib/images/travels/france/eiffel_close.jpg' alt='' width='956' height='512' border='0' /></a></div></div><h4>La Tour Eiffel, Paris, France — November 26, 2006</h4>";
images[2] = "<div id='content_white_border' style='border: 1px white solid;'><div id='content_photo'><a href = 'travels/china/2007/hangzhou.php'><img src='lib/images/travels/china/2007/hangzhou_gold_buddha.jpg' alt='' width='956' height='512' border='0' /></a></div></div><h4>Buddha image, Língyǐn Temple <span lang='zh' xml:lang='zh'>灵隐寺</span>, Hángzhōu, China — August 2, 2007</h4>";
images[3] = "<div id='content_white_border' style='border: 1px white solid;'><div id='content_photo'><a href = 'travels/sri_lanka'><img src='lib/images/travels/sri_lanka/elephant_baby_wide.jpg' alt='' width='956' height='512' border='0' /></a></div></div><h4>Baby at the elephant breeding center, Kandy, Sri Lanka</h4>";
images[4] = "<div id='content_white_border' style='border: 1px white solid;'><div id='content_photo'><a href='travels/mongolia/'><img src='lib/images/travels/mongolia/man_baby_3_wide.jpg' alt='' width='956' height='512' border='0' /></a></div></div><h4>Mongol and his baby, Mongolia — July 2006</h4>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);