var imgArr = new Array();

imgArr[0] = "xtra_pencil";		// the values here should be the ID's of the images in the CSS
imgArr[1] = "xtra_coffee";		// the images should be set to hidden in the css.
imgArr[2] = "xtra_eraser";
/*imgArr[3] = "img4";
imgArr[4] = "img5";*/

function imgVis(){
	var rand = Math.floor(Math.random() * 10);	// fetch an integer
	if(rand/2 == Math.floor(rand/2)){			// divide by 2 and if there's decimal places, it's odd.  If not, it's even.  Coin toss!
		return "visible";
	}else{
		return "hidden";
	}
}

function initVis(){		// called in onload attribute of body tag
	for(i=(imgArr.length - 1);i>=0;i--){	// looping backwards to save processor on comparison
		document.getElementById(imgArr[i]).style.visibility = imgVis();		// set visibility of all images in question
	}
}