/******************************************************************************
 * Javascript to manage pictures behind the penguin of the month
 * 2010-01-01
 *****************************************************************************/

	num_images = 22;
	
	var images = new Array(num_images);
	images[0] = new Image();
	images[0].src = "./backgrounds/2010-01/2010-01-pengy.gif";
	for (i=1; i<=num_images-1; i++) {
		images[i] = new Image();
		images[i].src = "./backgrounds/2010-01/2010-01-" + i + ".jpg";
	}
	images[0].title  = "Happy New Year!!";
	images[1].title  = "1 Caleb Lane";
	images[2].title  = "2 Caleb Lane";
	images[3].title  = "3 Caleb Lane";
	images[4].title  = "4 Caleb Lane";
	images[5].title  = "5 Corey Sevier";
	images[6].title  = "6 Corey Sevier";
	images[7].title  = "7 Corey Sevier";
	images[8].title  = "8 Corey Sevier";
	images[9].title  = "9 Corey Sevier";
	images[10].title = "10 Eamon Sullivan";
	images[11].title = "11 Eamon Sullivan";
	images[12].title = "12 Eamon Sullivan";
	images[13].title = "13 Eamon Sullivan";
	images[14].title = "14 Eamon Sullivan";
	images[15].title = "15 Eamon Sullivan and Michael Phelps";
	images[16].title = "16 Hideo Muraoka";
	images[17].title = "17 Hideo Muraoka";
	images[18].title = "18 Hideo Muraoka";
	images[19].title = "19 Hideo Muraoka";
	images[20].title = "20 Hideo Muraoka";
	images[21].title = "21 Blue Eyes";
/*	images[22].title = "22 Tyler Lough";
	images[23].title = "23 Tyler Lough";
	images[24].title = "24 Adam Phebus";
	images[25].title = "25 Adam Phebus";
	images[26].title = "26 Adam Phebus";
	images[27].title = "27 Jonathan Waud";
	images[28].title = "28 Jonathan Waud";
	images[29].title = "29 Jonathan Waud";
	images[30].title = "30 Jonathan Waud";
	images[31].title = "31 Jonathan Waud";
	images[32].title = "32 Jonathan Waud";
	images[33].title = "33 Matt Wood";
	images[34].title = "34 Matt Wood";
	images[35].title = "35 Matt Wood";
	images[36].title = "36 Matt Wood";
	images[37].title = "37 Matt Wood";
	images[38].title = "38 Matt Wood";
	images[39].title = "39 Matt Wood";
	images[40].title = "40 Matt Wood";
	images[41].title = "41 Novak Djokovic";
	images[42].title = "42 Novak Djokovic";
	images[43].title = "43 Saulo Melo";
	images[44].title = "44 Saulo Melo";
	images[45].title = "45 Saulo Melo";
	images[46].title = "46 Saulo Melo";
	images[47].title = "47 Saulo Melo";
	images[48].title = "48 Saulo Melo";
	images[49].title = "49 Saulo Melo";
	images[50].title = "50 Saulo Melo";
	images[51].title = "51 Thomas Ryan";
	images[52].title = "52 Thomas Ryan";
	images[53].title = "53 Thomas Ryan";
	images[54].title = "54 Thomas Ryan";
	images[55].title = "55 Thomas Ryan";
	images[56].title = "56 Thomas Ryan";
	images[57].title = "57 Thomas Ryan";
	images[58].title = "58 Have you been naughty???";
	images[59].title = "59 Kiss me!";
	images[60].title = "60 Happy Holidays!"; 
*/


	var inner_html_texts = new Array(num_images);
	for (i=0; i<num_images; i++) {
		inner_html_texts[i] = '<img src="' + images[i].src + '" alt="" title="' + images[i].title + '" onclick="switchpic()" />\n';
	}

	/***************************************************************************************************************************************************************************************************
	inner_html_texts[num_images-1] = '<object\ttype="application/x-shockwave-flash" data="mediaplayer.swf" width="400" height="300">\n';
	inner_html_texts[num_images-1]+= '\t<param\tname="movie"\t\t\tvalue="mediaplayer.swf" />\n';
	inner_html_texts[num_images-1]+= '\t<param\tname="allowfullscreen"\tvalue="true" />\n';
	inner_html_texts[num_images-1]+= '\t<param\tname="allowscriptaccess"\tvalue="always" />\n';
	inner_html_texts[num_images-1]+= '\t<param\tname="flashvars"\tvalue="file=http://www.penguinhuggle.com/stuff/zach.flv&amp;image=http://www.penguinhuggle.com/chat/backgrounds/2008-06-17.jpg" />\n';
	inner_html_texts[num_images-1]+= '\tThis movie requires the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe Flash Player</a>.\n';
	inner_html_texts[num_images-1]+= '</object>\n';
	inner_html_texts[num_images-1]+= '<p><a href="javascript:void(0)" onclick="switchpic()">Click to see the penguin again</a></p>\n';
	***************************************************************************************************************************************************************************************************/

	imagevalue = 0;

	function switchpic()
	{
		imagevalue = (imagevalue+1) % num_images;
		posterboywindowdiv  = document.getElementById("posterboywindow");
		posterboywindowdiv.innerHTML = inner_html_texts[imagevalue];
	}

