var theImages = new Array()
theImages[0] = 'random/ink.png'
theImages[1] = 'random/bottle.png'
theImages[2] = 'random/quill.png'
theImages[3] = 'random/compass.png'
theImages[4] = 'random/windrose.png'
theImages[5] = 'random/globe.png'
theImages[6] = 'random/compass2.png'
theImages[7] = 'random/map.png'
theImages[8] = 'random/magnifier.png'
theImages[9] = 'random/book.png'
theImages[10] = 'random/writing.png'
theImages[11] = 'random/mentor.png'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<DIV STYLE="position: absolute; top: 20px; right: 20px;"><IMG SRC="'+theImages[whichImage]+'" BORDER="0"></DIV>');
}

var theDice = new Array()
theDice[0] = 'blackshield.png'
theDice[1] = 'skull.png'
theDice[2] = 'whiteshield.png'
var j = 0
var p = theDice.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theDice[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showDie(){
document.write('<IMG SRC="'+theDice[whichImage]+'" BORDER="0">');
}