// JavaScript Document

// JavaScript Document


// Create arrays to contain all the values 
// for image locations

image_array = new Array
var image_index = 0;

image_array[image_index++]="images/pers_artifact.jpg"
image_array[image_index++]="images/rus_kremlin.jpg"
image_array[image_index++]="images/rus_river.jpg"
image_array[image_index++]="images/ger_berlin.jpg"
image_array[image_index++]="images/fr_chateau_frontenac.jpg"
image_array[image_index++]="images/fr_arc.jpg"
image_array[image_index++]="images/fr_african_market.jpg"
image_array[image_index++]="images/sp_macchu.jpg"
image_array[image_index++]="images/sp_palace.jpg"
image_array[image_index++]="images/kor_building.jpg"
image_array[image_index++]="images/jap_antiquity.jpg"
image_array[image_index++]="images/jap_fuji.jpg"
image_array[image_index++]="images/port_rio.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++] = "Artifact";
quote[quote_index++] = "Kremlin";
quote[quote_index++] = "Moscow";
quote[quote_index++] = "Berlin";
quote[quote_index++] = "Chateau";
quote[quote_index++] = "Arc de Triomphe";
quote[quote_index++] = "African Market";
quote[quote_index++] = "Macchu Picchu";
quote[quote_index++] = "Madrid";
quote[quote_index++] = "Korea";
quote[quote_index++] = "Japan";
quote[quote_index++] = "Japan";
quote[quote_index++] = "Rio de Janeiro";


// 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];
}
