// JavaScript Document
//photo gallery for the Artist Confidential


//set this varible to true if you wnat to shuffle the images. Set it false if you don't
var randominze_images = true;

	
	var photos = new Array();
	var styles = new Array();
	var captions = new Array();
	var current = 0;
	var defaultStyle = "defaultStyle"	;
	

var count = 0;
	
photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/aaron_neville_01.jpg";
styles[count] = "";
captions[count++] = "Aaron Neville";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/al_jareau_01.jpg";
styles[count] = "";
captions[count++] = "Al Jareau";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/andrea_bocelli_01.jpg";
styles[count] = "";
captions[count++] = "Andrea Bocelli";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/ani_difranco_01.jpg";
styles[count] = "";
captions[count++] = "Ani Difranco";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/arif_mardin_01.jpg";
styles[count] = "";
captions[count++] = "Arif Mardin";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/bob_weir_01.jpg";
styles[count] = "";
captions[count++] = "Bob Weir";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/bob_weir_02.jpg";
styles[count] = "";
captions[count++] = "Bob Weir";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/bonnie_raitt_01.jpg";
styles[count] = "";
captions[count++] = "Bonnie Raitt";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/brian_wilson_01.jpg";
styles[count] = "";
captions[count++] = "Brian Wilson";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/bruce_hornsby_01.jpg";
styles[count] = "";
captions[count++] = "Bruce Hornsby";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/chicago_01.jpg";
styles[count] = "";
captions[count++] = "Chicago";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/chicago_02.jpg";
styles[count] = "";
captions[count++] = "Chicago";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/chicago_03.jpg";
styles[count] = "";
captions[count++] = "Chicago";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/coldplay_01.jpg";
styles[count] = "";
captions[count++] = "Coldplay";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/david_gilmour_01.jpg";
styles[count] = "";
captions[count++] = "David Gilmour";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/def_leppard_01.jpg";
styles[count] = "";
captions[count++] = "Def Leppard";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/dixie_chicks_01.jpg";
styles[count] = "";
captions[count++] = "Dixie Chicks";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/dixie_chicks_02.jpg";
styles[count] = "";
captions[count++] = "Dixie Chicks";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/don_henley_01.jpg";
styles[count] = "";
captions[count++] = "Don Henley";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/eddie_money_01.jpg";
styles[count] = "";
captions[count++] = "Eddie Money";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/emmylou_harris_01.jpg";
styles[count] = "";
captions[count++] = "Emmylou Harris";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/george_winston_01.jpg";
styles[count] = "";
captions[count++] = "George Winston";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/hall_oats_01.jpg";
styles[count] = "";
captions[count++] = "Hall and Oates";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/john_mayer_01.jpg";
styles[count] = "";
captions[count++] = "John Mayer";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/joss_stone_01.jpg";
styles[count] = "";
captions[count++] = "Joss Stone";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/joss_stone_02.jpg";
styles[count] = "";
captions[count++] = "Joss Stone";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/judy_collins_01.jpg";
styles[count] = "";
captions[count++] = "Judy Collins";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/judy_collins_02.jpg";
styles[count] = "";
captions[count++] = "Judy Collins";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/judy_collins_03.jpg";
styles[count] = "";
captions[count++] = "Judy Collins";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/judy_collins_04.jpg";
styles[count] = "";
captions[count++] = "Judy Collins";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/lamont_dozier_01.jpg";
styles[count] = "";
captions[count++] = "Lamont Dozier";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/lenny_kravitz_01.jpg";
styles[count] = "";
captions[count++] = "Lenny Kravitz";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/ludacris_01.jpg";
styles[count] = "";
captions[count++] = "Ludacris";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/ludacris_02.jpg";
styles[count] = "";
captions[count++] = "Ludacris";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/natalie_cole_01.jpg";
styles[count] = "";
captions[count++] = "Natalie Cole";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/neal_sedaka_01.jpg";
styles[count] = "";
captions[count++] = "Neal Sedaka";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/paul_mccartney_01.jpg";
styles[count] = "";
captions[count++] = "Paul McCartney";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/paul_mccartney_02.jpg";
styles[count] = "";
captions[count++] = "Paul McCartney";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/paul_mccartney_03.jpg";
styles[count] = "";
captions[count++] = "Paul McCartney";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/pete_seeger_01.jpg";
styles[count] = "";
captions[count++] = "Pete Seeger";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/phil_collins_01.jpg";
styles[count] = "";
captions[count++] = "Phil Collins";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/pink_01.jpg";
styles[count] = "";
captions[count++] = "Pink";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/pink_02.jpg";
styles[count] = "";
captions[count++] = "Pink";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/reo_speedwagon_01.jpg";
styles[count] = "";
captions[count++] = "REO Speedwagon";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/robert_plant_01.jpg";
styles[count] = "";
captions[count++] = "Robert Plant";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/robert_plant_02.jpg";
styles[count] = "";
captions[count++] = "Robert Plant";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/rush_01.jpg";
styles[count] = "";
captions[count++] = "Rush";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/santana_01.jpg";
styles[count] = "";
captions[count++] = "Santana";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/santana_02.jpg";
styles[count] = "";
captions[count++] = "Santana";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/santana_03.jpg";
styles[count] = "";
captions[count++] = "Santana";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/sting_01.jpg";
styles[count] = "";
captions[count++] = "Sting";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/sting_02.jpg";
styles[count] = "";
captions[count++] = "Sting";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/sting_03.jpg";
styles[count] = "";
captions[count++] = "Sting";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/sting_04.jpg";
styles[count] = "";
captions[count++] = "Sting";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/willie_nelson_01.jpg";
styles[count] = "";
captions[count++] = "Willie Nelson";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/wynton_marsalis_01.jpg";
styles[count] = "";
captions[count++] = "Wynton Marsalis";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/wynton_marsalis_02.jpg";
styles[count] = "";
captions[count++] = "Wynton Marsalis";


photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/wynton_marsalis_03.jpg";
styles[count] = "";
captions[count++] = "Wynton Marsalis";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/marty_stuart_01.jpg";
styles[count] = "";
captions[count++] = "Marty Stuart";
photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/marty_stuart_02.jpg";
styles[count] = "";
captions[count++] = "Marty Stuart";
photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/marty_stuart_03.jpg";
styles[count] = "";
captions[count++] = "Marty Stuart";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/smashing_pumpkins_01.jpg";
styles[count] = "";
captions[count++] = "Smashing Pumpkins";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/smashing_pumpkins_02.jpg";
styles[count] = "";
captions[count++] = "Smashing Pumpkins";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/smashing_pumpkins_03.jpg";
styles[count] = "";
captions[count++] = "Smashing Pumpkins";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/smashing_pumpkins_04.jpg";
styles[count] = "";
captions[count++] = "Smashing Pumpkins";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/smashing_pumpkins_05.jpg";
styles[count] = "";
captions[count++] = "Smashing Pumpkins";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/gloria_estefan_01.jpg";
styles[count] = "";
captions[count++] = "Gloria Estefan";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/gloria_estefan_02.jpg";
styles[count] = "";
captions[count++] = "Gloria Estefan";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/gloria_estefan_03.jpg";
styles[count] = "";
captions[count++] = "Gloria Estefan";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/kool_01.jpg";
styles[count] = "";
captions[count++] = "Kool & The Gang";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/kool_02.jpg";
styles[count] = "";
captions[count++] = "Kool & The Gang";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/kool_03.jpg";
styles[count] = "";
captions[count++] = "Kool & The Gang";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/kool_04.jpg";
styles[count] = "";
captions[count++] = "Kool & The Gang";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/diamond_rio_01.jpg";
styles[count] = "";
captions[count++] = "Diamond Rio";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/diamond_rio_05.jpg";
styles[count] = "";
captions[count++] = "Diamond Rio";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/lyle_lovett_01.jpg";
styles[count] = "";
captions[count++] = "Lyle Lovett";

photos[count] = "/images/onXM/series/artist_confidential/photo_gallery/lyle_lovett_05.jpg";
styles[count] = "";
captions[count++] = "Lyle Lovett";



var key_arr= new Array();


for (var i=0; i<photos.length ; i++){
	key_arr[i] = i;
}


	
//shuffle an array	
shuffle = function(o){ 
	for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
	return o;
}


//shuffle images?
if (randominze_images){
	//Shuffle up teh top array so that phtos are in random order
	shuffle(key_arr);
}



function next(){
	current++;
	current  = current % (photos.length); //if past end, set to zero
	
	var photo = document.getElementById("photo");
	var caption = document.getElementById("caption");
	
	photo.src =	photos[key_arr[current]];
	
	if (styles[current] != "" ){
		photo.className = styles[key_arr[current]];
	} else {
		photo.className	= defaultStyle;
	}
	
	caption.innerHTML = captions[key_arr[current]];
	
	
}






function prev(){
	current--;
	current  = current % (photos.length);
	if (current < 0) { current = photos.length - 1; } //if negative set to end
	
	
	var photo = document.getElementById("photo");
	var caption = document.getElementById("caption");
	
	
	photo.src =	photos[key_arr[current]];
	
	if (styles[current] != ""){
		photo.className = styles[key_arr[current]];
	} else {
		photo.className	= defaultStyle;
	}
	
	
	caption.innerHTML = captions[key_arr[current]];
	
}
