//Clear text box of initial content in search engines
function clearIt(what)
{
if(what.value == what.defaultValue) what.value = '';
}
function setIt(what)
{
if(what.value == '') what.value = what.defaultValue;
}


//The array which is going to hold the image information. Store the image info along with their correct path; I've omitted the path here as I've stored the images in the same folder where my web page resides.
var linkArray = new Array();

linkArray[0] = "http://merlot.coe.edu/ipac20/ipac.jsp?session=12493R92L8371.2&menu=search&aspect=subtab31&npp=10&ipp=20&spp=20&profile=sml2&ri=&index=.AW&term=&oper=AND&aspect=subtab31&index=.TW&term=Mona+Lisa&oper=AND&index=.SW&term=&oper=AND&index=.GW&term=&limitbox_1=CO01+%3D+co_W&sort=&x=12&y=8#focus";
linkArray[1] = "http://merlot.coe.edu/ipac20/ipac.jsp?session=12493R92L8371.2&limitbox_1=CO01+%3D+co_W&menu=search&aspect=subtab31&npp=10&ipp=20&spp=20&profile=sml2&ri=2&source=%7E%21horizon&index=.TW&term=Predictably+Irrational&aspect=subtab31";
linkArray[2] = "http://merlot.coe.edu/ipac20/ipac.jsp?session=12493R92L8371.2&profile=sml2&source=~!horizon&view=subscriptionsummary&uri=full=3100001~!238102~!0&ri=5&aspect=subtab31&menu=search&ipp=20&spp=20&staffonly=&term=Key&index=.TW&uindex=&aspect=subtab31&menu=search&ri=5&limitbox_1=CO01+=+co_W#focus";
linkArray[3] = "http://merlot.coe.edu/ipac20/ipac.jsp?session=12581459988DP.2189&profile=sml2&uri=link=3100007~!543362~!3100001~!3100022&aspect=subtab30&menu=search&ri=1&source=~!horizon&term=The+Wikipedia+revolutin+%3A+how+a+bunch+of+nobodies+created+the+world%27s+greatest+encyclopedia+%2F&index=ALTIT#focus";
linkArray[4] = "http://search.ebscohost.com/login.aspx?authtype=ip,uid";
linkArray[5] = "http://avalon.law.yale.edu/default.asp";
linkArray[6] = "http://www.jstor.org/";
linkArray[7] = "http://pubs.acs.org/";
linkArray[8] = "http://www.accessscience.com/";
linkArray[9] = "http://infomotions.com/alex/";
linkArray[10] = "http://ahiv.alexanderstreet.com/";
linkArray[11] = "http://www.artstor.org/index.shtml";
linkArray[12] = "http://www.bartleby.com/index.html";
linkArray[13] = "http://www.bioone.org/";
linkArray[14] = "http://search.eb.com/";
linkArray[15] = "http://coecollege.newspaperarchive.com/";
linkArray[16] = "http://www.credoreference.com/";
linkArray[17] = "http://www.doaj.org/";
linkArray[18] = "http://journals.eserver.org/";
linkArray[19] = "http://lcweb2.loc.gov/hlas/mdbquery.html";
linkArray[20] = "http://highwire.stanford.edu/";
linkArray[21] = "http://historicaltextarchive.com/";
linkArray[22] = "http://www.ingentaconnect.com//";
linkArray[23] = "http://www.netlibrary.com/";
linkArray[24] = "http://muse.jhu.edu/";
linkArray[25] = "http://www.plos.org/journals/index.php";
linkArray[26] = "http://asp6new.alexanderstreet.com/ladd/";
linkArray[27] = "http://www.sciencedirect.com/";

var imageArray = new Array();

imageArray[0] = "images/Books&Databases/Book_MonaLisa.jpg"; 
imageArray[1] = "images/Books&Databases/Book_PredictablyIrrational.jpg";
imageArray[2] = "images/Books&Databases/Book_RosetaKey.jpg";
imageArray[3] = "images/Books&Databases/Book_WikipediaRevolution.jpg";
imageArray[4] = "images/Books&Databases/Database_EbscoHost.jpg"; 
imageArray[5] = "images/Books&Databases/DataBases_AvalonProject copy.jpg";
imageArray[6] = "images/Books&Databases/DataBases_JSTOR.jpg";
imageArray[7] = "images/Books&Databases/Database_ACS.jpg";
imageArray[8] = "images/Books&Databases/DataBases_AccessScience.jpg";
imageArray[9] = "images/Books&Databases/DataBases_AlexCatalogue.jpg";
imageArray[10] = "images/Books&Databases/DataBases_AmericanHistoryInVideo.jpg";
imageArray[11] = "images/Books&Databases/DataBases_ArtStor.jpg";
imageArray[12] = "images/Books&Databases/DataBases_Bartleby.jpg";
imageArray[13] = "images/Books&Databases/DataBases_BioOne.jpg";
imageArray[14] = "images/Books&Databases/DataBases_BritannicaOnline.jpg";
imageArray[15] = "images/Books&Databases/DataBases_CoeCosmos.jpg";
imageArray[16] = "images/Books&Databases/DataBases_CredoReference.jpg";
imageArray[17] = "images/Books&Databases/DataBases_DirectoryOfOpenAccessJournals.jpg";
imageArray[18] = "images/Books&Databases/DataBases_EServerJournals.jpg";
imageArray[19] = "images/Books&Databases/DataBases_HandbookOfLatinAmericanStudies.jpg";
imageArray[20] = "images/Books&Databases/DataBases_HighWirePress.jpg";
imageArray[21] = "images/Books&Databases/DataBases_HistoricalTextArchive.jpg";
imageArray[22] = "images/Books&Databases/DataBases_IngentaConnect.jpg";
imageArray[23] = "images/Books&Databases/DataBases_NetLibrary.jpg";
imageArray[24] = "images/Books&Databases/DataBases_ProjectMuse.jpg";
imageArray[25] = "images/Books&Databases/DataBases_PublicLibraryOfScience.jpg";
imageArray[26] = "images/Books&Databases/DataBases_SocialAndCulturalHistory.jpg";
imageArray[27] = "images/Books&Databases/ScienceDirect.jpg";

function RandomBook()
{
var rand = 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 imgPath = "<a href='"+linkArray[rand]+"'><img src='"+imageArray[rand]+"' alt='Featured Book' border='0' align='absmiddle' /></a>";

document.getElementById("image").innerHTML = imgPath;

}


function RandomDatabase()
{
var rand = Math.floor((Math.random()*23)+4); //Generating a random number between 3 and 5 here in your case you can replace 4 with 11 if you have 10 images

var imgPath = "<a href='"+linkArray[rand]+"'><img src='"+imageArray[rand]+"' alt='Featured Book' border='0' align='absmiddle' /></a>";

document.getElementById("image2").innerHTML = imgPath;
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/*Dreamweavers show hide layers used in Library Resources box bottom of homePage*/
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
/*code for show hide layers using option select boxes*/
/*Name objects 1 to n, value associated with the first index is shown*/
function showHideLayers()
{ 

  var i,showIndex,obj,args=showHideLayers.arguments;
  showIndex=args[0];

  
  for (i=1; i<(args.length);i++) 
  {
	  obj=document.getElementById(args[i]);
	  obj=obj.style;
	  
	  if(i==showIndex)
	  	{
			obj.visibility="visible";
		}
	  else
	    {
			obj.visibility="hidden";
		}
  }  

}

/*play sound*/




