// JavaScript Document
//random_watkins.js
//random image rotator for Katzen site by matt {@} mattbillings.com


// Create arrays to contain all the values 
// for image locations

image_array = new Array
var image_index = 0;

image_array[image_index++]="images/watkins/avery_green_landscape_1945_med.jpg";
image_array[image_index++]="images/watkins/davis_untitled_1966_med.jpg";
image_array[image_index++]="images/watkins/kainen_observerxxxi_med.jpg";


// quote array is associtated to the image array
// make sure quote[x] is the caption for image_arraay[x] 

quote = new Array
var quote_index = 0;

quote[quote_index++] = "Milton Avery, <em>Green Landscape</em>, 1945<br />oil on canvas<br />Gift of Duncan Phillips";
quote[quote_index++] = "Gene Davis, <em>Untitled, 1966</em><br />acrylic on canvas<br />Gift of Linda Lichtenberg Kaplan";
quote[quote_index++] = "Jacob Kainen, <em>Observer XXXI</em><br />oil on canvas<br />Gift of John Naisbitt and Patricia Aburdene";


// Create a random number between 1 and length of quote array
random_num = (Math.round(Math.random()*(quote_index-1)))
//alert(random_num_quote);


// returns image tag with approrpite alt_tag and image name
function get_image(){
return("<img class=\"side_img\" src=\""  + image_array[random_num] + "\" name=\"left_image\" alt=\""+ quote[random_num] +"\" />");
}

// returns quote corresponding to the image called above
function get_quote(){
	return quote[random_num];
}

