// JavaScript Document
//when the browser loads the window it will run the function "choosePic"
window.onload = choosePic;

//creates a variable called myPic which is a new Array with all the images that would be randomly appearing
var myIconTop = new Array("img/icon_blue_eye.jpg","img/icon_green_eye.jpg","img/icon_orange_eye.jpg","img/icon_purple_eye.jpg");
var myIconBottom = new Array("img/icon_blue_hand.jpg","img/icon_green_hand.jpg","img/icon_orange_hand.jpg","img/icon_purple_hand.jpg");

function choosePic() {
	//creates a random number from 0 to the length of the array of myPic
	randomNum1 = Math.floor((Math.random() * myIconTop.length));
	randomNum2 = Math.floor((Math.random() * myIconBottom.length));
	//changes the src of the img tag with randompic as it's id to the random number spot in the array of myPic
	document.getElementById("IconSwap1").src = myIconTop[randomNum1];
	document.getElementById("IconSwap2").src = myIconBottom[randomNum2];
	return false;
}


