

function drawImages(gallery) 
	{
	var ImgLoc = "results/";


var images = Array();
	var caption = Array();
	
	images[0] = "Sattley-08-Dawn-podium.jpg";
	images[1] = "mp-crit-podium-aimee-number-2.jpg";
	images[2] = "protech08teamcamp.jpg";
	images[3] = "DSC01490_2.jpg";
	images[4] = "2661922143_4a1655c200.jpg";
	images[5] = "07-08-pictures-055.jpg";
	images[6] = "07-08-pictures-076.jpg";
	images[7] = "07-08-pictures-081.jpg";
	images[8] = "08-check-in-for-kern-county.jpg";
	images[9] = "08-Sea-Ranch-Chris-and-Melody.jpg";
	images[10] = "Aimee.jpg";
	images[11] = "Dunlap-08-Dawn-podium.jpg";
	images[12] = "memorial-ride-photo-number-2.jpg";
	images[13] = "wedding-attendants-protech.jpg";
	images[14] = "bike-taxi.jpg";

	

	caption[0] = "Dawn Neisser winning the Northern California/Nevada District Time Trail&nbsp;Championship,&nbsp;Women&nbsp;50-54.";
	caption[1] = "Menlo Park Criterium, Aimee Baker winning the Women\'s&nbsp;3\'s.";
	caption[2] = "Protech Team Camp, Los Olivos, California";
	caption[3] = "US Masters National Time Trial Championships, Women&nbsp;50-54";
	caption[4] = "2d in the Coyote Creek Circuit Race, Women's 1/2/3 - south&nbsp;San&nbsp;Jose";
	caption[5] = "Trying on kit samples";
	caption[6] = "Team Camp, riding in the spring rain, Solvang, CA";
	caption[7] = "Team Camp, Camp mascot \"Boo\"";
	caption[8] = "Checking in for Kern County";
	caption[9] = "Chris and Melody Appleton, Protech Skin Care, team getaway at Sea&nbsp;Ranch";
	caption[10] = "Aimee Baker out for a training&nbsp;ride";
	caption[11] = "Dawn on the Podium, Dunlap Time&nbsp;Trial";
	caption[12] = "Kim Perez and teammates, Kristy Gough and Matt Peterson Memorial&nbsp;ride";
	caption[13] = "How to get married - Flower Girls for Lloyd and&nbsp;Lisa";
	caption[14] = "How to get married - Lloyd and Lisa's Getaway&nbsp;Car";
	
		
if (gallery)
	{
		
	i = 0;
	while (i < images.length)
		{
			document.write('\n<div id=\"img'+i+'\"><img src=\"'+ImgLoc + images[i]+'\"><br />'+caption[i]+'</div>');
			i++;
		}
		
		
	} else {
		
		
	var index1 = Math.floor(Math.random() * images.length);
	var index2 = Math.floor(Math.random() * images.length);
	
	
	var i = index1;
	var j = index2;


	while (i == j)
		{
		index2 = Math.floor(Math.random() * images.length);
		j = index2;	
		//alert(i +" -- "+ j);
		}

	document.getElementById('photo1').innerHTML = '<p><img src="'+ ImgLoc + images[index1] + '" border="0" alt="'+caption[index1]+'" /><p></p>'+caption[index1]+'</p><P>&nbsp;</P>';
	document.getElementById('photo2').innerHTML = '<p><img src="'+ ImgLoc + images[index2] + '" border="0" alt="'+caption[index2]+'" /><p></p>'+caption[index2]+'</p><P>&nbsp;</P>';
	}

}

