randNavPhotoRun = true;
navPhotoArray = new Array;
navPhotoImages= new Array
	("newImage1.png", "newImage2.png", "newImage3.png", "newImage4.png",
	"newImage5.png", "newImage6.png", "newImage7.png", "newImage8.png",
	"newImage9.png");

for(i=0; i<navPhotoImages.length; i++)
{
	navPhotoArray[i] = new Image();
	navPhotoArray[i].src = "images/navphotos/" + navPhotoImages[i]; 
}

function changeNavPhoto(nid)
{
	navphotoimage = document.getElementById("navphoto");
	navphotoimage.src = navPhotoArray[nid].src;
	randNavPhotoRun = false;
}

function startRandNavPhoto()
{
	window.setTimeout("randNavPhoto()", 3000);
}

function randNavPhoto()
{
	if (randNavPhotoRun)
	{
		var randid = Math.floor( Math.random() * navPhotoImages.length );
		navphotoimage = document.getElementById("navphoto");
		navphotoimage.src = navPhotoArray[randid].src;
		window.setTimeout("randNavPhoto()", 3000);
	}
}


