//* JavaScript Document*//
window.onload = choosePic;

var adImages = new Array("images/showInTell/january11/Zen.JPG",
						 "images/showInTell/February 2011/Guest Speaker (2).JPG",
						 "images/showInTell/April 2011/DSCF4316.JPG",
						  "images/showInTell/june 2011/100_0982.jpg", 
						 "images/showInTell/june 2011/100_0985.jpg",
						 "images/showInTell/june 2011/100_0942.jpg" );						 
						 
						 
						 
var thisAd = 0;

function choosePic() {
	
	thisAd = Math.floor((Math.random() * adImages.length));
	document.getElementById("picture").src = adImages[thisAd];
	
	rotate();
}

function rotate() {
	thisAd++;
	if (thisAd == adImages.length) {
		thisAd = 0;
	}
	document.getElementById("picture").src  = adImages[thisAd];

	setTimeout(rotate, 3 * 1000);
}

/*window.onload = rolloverInit;

function rolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].parentNode.tagName == "A") {
			setupRollover(document.images[i]);
		}
	}
}

function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = function() {
		this.src = this.outImage.src;
	}

	thisImage.clickImage = new Image();
	thisImage.clickImage.src = "images/" + thisImage.id + "_click.gif";
	thisImage.onclick = function() {
		this.src = this.clickImage.src;
	}

	thisImage.overImage = new Image();
	thisImage.overImage.src = "images/" + thisImage.id + "_on.gif";
	thisImage.onmouseover = function() {
		this.src = this.overImage.src;
	}
}*/
