var images = new Array()
var captions = new Array()
				
var selected = 0; 

function showImageAndCaption()
{
	selected = Math.round(Math.random()*(images.length-1));
	
	document.write('<div class="imageRight">');
	document.write('<img src="' + images[selected] + '" alt="' + captions[selected] + '" />');
	document.write('<p>' + captions[selected] + '</p>');
	document.write('</div>');
}

function addImage(src, caption)
{
	images.push(src);
	captions.push(caption);
}