// JavaScript Document
var frockImages = new Array()
var StaticUrl = "http://frockpaperscissors.com/wp-content/themes/frockpaperscissors";

//Random-loading images
frockImages[0] = StaticUrl+'/splash_images/large/frock0.jpg' // replace with names of images
frockImages[1] = StaticUrl+'/splash_images/large/frock1.jpg' // replace with names of images
frockImages[2] = StaticUrl+'/splash_images/large/frock1.jpg' // replace with names of images
frockImages[3] = StaticUrl+'/splash_images/large/frock3.jpg' // replace with names of images

var j = 0
var p = frockImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = frockImages[i]
}
var whichFrockImage = Math.round(Math.random()*(p-1));
function showFrockImage(){
if(whichFrockImage==0){
document.write('<a title="Frock" href ="http://frockpaperscissors.com/"><img src="'+frockImages[whichFrockImage]+'" border=0 width=300 height=450 alt="Frock"><span class="desc"></span></a>');
}
else if(whichFrockImage==1){
document.write('<a title="Frock" href ="http://frockpaperscissors.com/"><img src="'+frockImages[whichFrockImage]+'" border=0 width=300 height=450 alt="Frock"><span class="desc"></span></a>');
}
else if(whichFrockImage==2){
document.write('<a title="Frock" href ="http://frockpaperscissors.com/"><img src="'+frockImages[whichFrockImage]+'" border=0 width=300 height=450 alt="Frock"><span class="desc"></span></a>');
}
else if(whichFrockImage==3){
document.write('<a title="Frock" href ="http://frockpaperscissors.com/"><img src="'+frockImages[whichFrockImage]+'" border=0 width=300 height=450 alt="Frock"><span class="desc"></span></a>');
}

}

var paperImages = new Array()

//Random-loading images
paperImages[0] = StaticUrl+'/splash_images/large/paper0.jpg' // replace with names of images
paperImages[1] = StaticUrl+'/splash_images/large/paper0.jpg' // replace with names of images
paperImages[2] = StaticUrl+'/splash_images/large/paper0.jpg' // replace with names of images
paperImages[3] = StaticUrl+'/splash_images/large/paper0.jpg' // replace with names of images

var j = 0
var p = paperImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = paperImages[i]
}
var whichPaperImage = Math.round(Math.random()*(p-1));
function showPaperImage(){  
if(whichPaperImage==0){
document.write('<a title="paper" href ="http://frockpaperscissors.com/"><img src="'+paperImages[whichPaperImage]+'" border=0 width=300 height=450 alt="paper"><span class="desc"></span></a>');
}
else if(whichPaperImage==1){
document.write('<a title="paper" href ="http://frockpaperscissors.com/"><img src="'+paperImages[whichPaperImage]+'" border=0 width=300 height=450 alt="paper"><span class="desc"></span></a>');
}
else if(whichPaperImage==2){
document.write('<a title="paper" href ="http://frockpaperscissors.com/"><img src="'+paperImages[whichPaperImage]+'" border=0 width=300 height=450 alt="paper"><span class="desc"></span></a>');
}
else if(whichPaperImage==3){
document.write('<a title="paper" href ="http://frockpaperscissors.com/"><img src="'+paperImages[whichPaperImage]+'" border=0 width=300 height=450 alt="paper"><span class="desc"></span></a>');
}

}

var scissorsImages = new Array()

//Random-loading images
scissorsImages[0] = StaticUrl+'/splash_images/large/scissors0.jpg' // replace with names of images
scissorsImages[1] = StaticUrl+'/splash_images/large/scissors0.jpg' // replace with names of images
scissorsImages[2] = StaticUrl+'/splash_images/large/scissors2.jpg' // replace with names of images
scissorsImages[3] = StaticUrl+'/splash_images/large/scissors3.jpg' // replace with names of images

var j = 0
var p = scissorsImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = scissorsImages[i]
}
var whichScissorsImage = Math.round(Math.random()*(p-1));
function showScissorsImage(){
if(whichScissorsImage==0){
document.write('<a title="scissors" href ="http://frockpaperscissors.com/"><img src="'+scissorsImages[whichScissorsImage]+'" border=0 width=300 height=450 alt="scissors"><span class="desc"></span></a>');
}
else if(whichScissorsImage==1){
document.write('<a title="scissors" href ="http://frockpaperscissors.com/"><img src="'+scissorsImages[whichScissorsImage]+'" border=0 width=300 height=450 alt="scissors"><span class="desc"></span></a>');
}
else if(whichScissorsImage==2){
document.write('<a title="scissors" href ="http://frockpaperscissors.com/"><img src="'+scissorsImages[whichScissorsImage]+'" border=0 width=300 height=450 alt="scissors"><span class="desc"></span></a>');
}
else if(whichScissorsImage==3){
document.write('<a title="scissors" href ="http://frockpaperscissors.com/"><img src="'+scissorsImages[whichScissorsImage]+'" border=0 width=300 height=450 alt="scissors"><span class="desc"></span></a>');
}

}
