var imageArray = new Array();
var ext = "images/lab_setup/";

imageArray[0] = ext+"1.jpg"; //You can replace these image file names with your own image names.
imageArray[1] = ext+"2.jpg";
imageArray[2] = ext+"3.jpg";
imageArray[3] = ext+"4.jpg";
imageArray[4] = ext+"5.jpg";
imageArray[5] = ext+"6.jpg";
imageArray[6] = ext+"7.jpg";
imageArray[7] = ext+"8.jpg";
imageArray[8] = ext+"9.jpg";

function doIt()
{
var rand = Math.floor(Math.random()*9); //Generating a random number between 0 and 3 here in your case you can replace 4 with 11 if you have 10 images

var imgPath = "<img src='"+imageArray[rand]+"' alt='Failed to load. Please refresh page.' name='slide' border='0' align='absmiddle' width='300' height='200' />";
document.getElementById("image").innerHTML = imgPath;
}


	
	
var ext1 = "images/hpage/";
var fig = new Array();

fig[0] = ext1+"1.jpg";
fig[1] = ext1+"2.jpg";
fig[2] = ext1+"3.jpg";
fig[3] = ext1+"4.jpg";
fig[4] = ext1+"6.jpg";
fig[5] = ext1+"5.jpg";

function doIt1()
{
var rand1 = Math.floor(Math.random()*6); //Generating a random number between 0 and 3 here in your case you can replace 4 with 11 if you have 10 images

var imgPath1 = "<img src='"+fig[rand1]+"' alt='Failed to load. Please refresh page.' name='slide' border='0' align='absmiddle' width='350' height='200' />";
document.getElementById("image").innerHTML = imgPath1;
}

var ext2 = "images/comp_facilities/";
var fig1 = new Array();

fig1[0] = ext2+"1.jpg";
fig1[1] = ext2+"2.jpg";
fig1[2] = ext2+"3.jpg";
fig1[3] = ext2+"4.jpg";

function doIt2()
{
var rand2 = Math.floor(Math.random()*4); //Generating a random number between 0 and 3 here in your case you can replace 4 with 11 if you have 10 images

var imgPath2 = "<img src='"+fig1[rand2]+"' alt='Failed to load. Please refresh page.' name='slide' border='0' align='absmiddle' width='241' height='181' />";
document.getElementById("image").innerHTML = imgPath2;
}
