// JavaScript Document

function thumbs()
{
	var rotimg = new Array();
	var numcells = 18;
	// use the "pipe" separator, list items in order: file name, Alt Text, target URL
    rotimg.push("Through-the-Woodsdetail.jpg|Rebecca Rousseau|http://www.rebeccarousseau.com");
    rotimg.push("horse-sculpture-copy.jpg|Reuven Fields|http://www.creativeironart.net");
    rotimg.push("octhumb_brucemitchell.jpg|Bruce Mitchell|http://www.paintingsbybruce.com");
    rotimg.push("100_0639.jpg|Tim Rider|http://www.timrider.com");
    rotimg.push("RE-COLLECTING.jpg|Alice Levinson|http://www.alicelevinson.com");
    rotimg.push("Red-Eft.jpg|Jean LeCluyse|http://www.jlecluyseillustrations.com");
    rotimg.push("Frog.jpg|Dale A. Morgan|http://www.ferncreekillustrations.com");
    rotimg.push("2x23.jpg|Maggi Grace|http://www.maggigrace.com");
    rotimg.push("BMB_02.jpg|Betty Meehan-Black|http://www.WisteriaDesigns.net");
    rotimg.push("01web.jpg|Eduardo Lapetina|http://www.eduardolapetina.com");
    rotimg.push("Zenobi.jpg|Nadine Zenobi|http://www.skyriversjewelry.com");
    rotimg.push("mauragarcia.jpg|Maura Garcia|http://www.mixedbloodwoman.com");
    rotimg.push("metalmorphosisweb.jpg|John Amero|http://www.johnamerometal.com");
    rotimg.push("UrbanskiCloseUpweb.jpg|Bartholomew Urbanski|http://www.bestbart.com");
    rotimg.push("blue-ridge-dawn.jpg|Thomas Johnson|http://www.twjohnsonart.com");
    rotimg.push("TeaHouseweb.jpg|Anne & Gene Shelton|http://www.creekviewstudio.net");
    rotimg.push("Chester_SoniaKatchianmed.jpg|Sonia Katchian|http://www.photoshuttle.com");
    rotimg.push("poppies_web.jpg|Beverly Currence|http://www.glassartwindows.net");
    
	
	for(i=1; i<=numcells; i++) 
	{
	  numavail = rotimg.length;
	  chosen = Math.random() * numavail.toPrecision(4);
	  
	  var thisimg = rotimg[Math.floor(chosen)].split("|");	
	  //document.getElementById("th"+i).src="images/im"+(19-i)+".jpg"
      document.getElementById("th"+i).innerHTML="<IMG src='images/"+(thisimg[0])+"' alt='"+  thisimg[1]+"' title='" + thisimg[1]+"' class='thumbs'>";
      document.getElementById("th"+i).href=thisimg[2];
      document.getElementById("th"+i).title= thisimg[1];
      document.getElementById("th"+i).target="_blank";
	  
	  rotimg.splice(Math.floor(chosen),1);
	}
	
	// chose cell for about image
	abtcell = Math.floor(Math.random() * numcells.toPrecision(4)); 
	document.getElementById("th"+abtcell).innerHTML="<IMG src='images/about.jpg' alt='About Thumbnails' title='About Thumbnails' class='thumbs'>";
      document.getElementById("th"+abtcell).href='index-2.html#aboutthumbs';
      document.getElementById("th"+abtcell).title= 'About Thumbnails';
      document.getElementById("th"+abtcell).target="_top";
}
