	var arPhotos		= new Array();		// array of all photos
	var num_photos		= new Number();		// number of photos
	var preload_photos	= new Array();		// array of all preloaded photos
	var thumb_linker	= new Array();		// array to link thumbs with which image they contain (for the large image)
	var beginner		= new Number(0);	// the starting "thumb"
	var next_displayed	= new Number(0);	// next thumb to "start" the # from
	var counter			= new Number(0);	// misc counter
	var counter_flush	= new Number(0);	// counter to check if there are # images to display or not
	var tmpString		= new String();		// misc string to keep temp element ID names
	
	// image settings
	var max_image_num	= new Number(12);
	var thumb_id		= new String('gallery_thumb_');							// id title that is constant for all gallery photo thumbnails
	var large_img_id	= new String('gallery_large');							// id title for the large image
	var large_link_id	= new String('gallery_large_link');						// id title for the large image link
	var thumb_class		= new String('gallery-small');							// css class for the thumb images
	var blank_image		= new String("images/blank_dot.gif");					// blank image for when an image doesn't exist, or there arent enough
	var large_short		= new String("images/gallery_photos_photo/large/");		// base path to large image
	var large_path		= new String("inc_code/imgresize.inc.php?w=132&h=88&img=/images/gallery_photos_photo/large/"); // path to large thumbnails
	var thumb_path		= new String("inc_code/imgresize.inc.php?w=35&h=35&img=/images/gallery_photos_photo/thumb/");	// path to small thumbnails
	var back_displayed	= max_image_num;	// next thumb to "end" the # from
	
			arPhotos[0] = '4/nygiants02.jpg';
			arPhotos[1] = '1/kevin_boss160.jpg';
			arPhotos[2] = '1/WOU.jpg';
			arPhotos[3] = '1/K_Boss_Spend_Day_Giant_0028.jpg';
			arPhotos[4] = '2/kb_c10.jpg';
			arPhotos[5] = '1/DSC02101.jpg';
			arPhotos[6] = '2/boss_cw_2.jpg';
			arPhotos[7] = '1/kevin_boss041.jpg';
			arPhotos[8] = '2/_MG_9960.JPG';
			arPhotos[9] = '2/kb_c23.jpg';
			arPhotos[10] = '4/nygiants07.jpg';
			arPhotos[11] = '4/nygiants06.jpg';
			arPhotos[12] = '1/29746750.jpg';
			arPhotos[13] = '1/K_Boss_Spend_Day_Giant__0026.jpg';
			arPhotos[14] = '1/K_Boss_Spend_Day_Giant_0025.jpg';
			arPhotos[15] = '3/superbowl06.jpg';
			arPhotos[16] = '5/10.jpg';
			arPhotos[17] = '4/nygiants13.jpg';
			arPhotos[18] = '6/fanpic-090929.jpg';
			arPhotos[19] = '2/kb_c12.jpg';
			arPhotos[20] = '1/espy_photo.JPG';
			arPhotos[21] = '3/superbowl07.jpg';
			arPhotos[22] = '1/channel6III.jpg';
			arPhotos[23] = '2/kevin_boss.jpg';
			arPhotos[24] = '5/Kevin2.jpg';
			arPhotos[25] = '1/K_Boss_Spend_Day_Giant_0113.jpg';
			arPhotos[26] = '6/fanpic010.jpg';
			arPhotos[27] = '1/003317032971_007.jpg';
			arPhotos[28] = '6/fanpic-01.jpg';
			arPhotos[29] = '1/C2F1BA9F6C0D4719B2D90723E575E025.jpg';
			arPhotos[30] = '2/kb_c19.jpg';
			arPhotos[31] = '6/giants-camp-08-2009.jpg';
			arPhotos[32] = '2/kb_c2.jpg';
			arPhotos[33] = '4/nygiants10.jpg';
			arPhotos[34] = '6/fanpic005.jpg';
			arPhotos[35] = '3/superbowl09.jpg';
			arPhotos[36] = '1/proday.jpg';
			arPhotos[37] = '3/superbowl03.jpg';
			arPhotos[38] = '1/kevin_boss196.jpg';
			arPhotos[39] = '1/_MG_9965.jpg';
			arPhotos[40] = '1/kevin_boss236.jpg';
			arPhotos[41] = '3/superbowl04.jpg';
			arPhotos[42] = '4/nygiants04.jpg';
			arPhotos[43] = '5/17.jpg';
			arPhotos[44] = '6/fanpic007.jpg';
			arPhotos[45] = '3/superbowl01.jpg';
			arPhotos[46] = '1/kevinboss_sb1.jpg';
			arPhotos[47] = '2/kb_c25.jpg';
			arPhotos[48] = '2/boss_ww_1.jpg';
			arPhotos[49] = '1/2-8-09_OSA_162.JPG';
			arPhotos[50] = '2/kevin_boss_23.jpg';
			arPhotos[51] = '1/kevin_boss139.jpg';
			arPhotos[52] = '5/Kevin3.jpg';
			arPhotos[53] = '1/2-8-09_OSA_165.JPG';
			arPhotos[54] = '4/nygiants11.jpg';
			arPhotos[55] = '3/superbowl08.jpg';
			arPhotos[56] = '3/superbowl02.jpg';
			arPhotos[57] = '6/fanpic009.jpg';
			arPhotos[58] = '1/bilde.jpg';
			arPhotos[59] = '2/kevin_boss_19.jpg';
			arPhotos[60] = '4/nygiants09.jpg';
			arPhotos[61] = '1/K_Boss_Spend_Day_Giant_0085.jpg';
			arPhotos[62] = '6/fanpic006.jpg';
			arPhotos[63] = '1/kevin_boss215.jpg';
			arPhotos[64] = '4/nygiants03.jpg';
			arPhotos[65] = '1/_MG_9960.jpg';
			arPhotos[66] = '6/fanpic002.jpg';
			arPhotos[67] = '1/kevin_boss380.jpg';
			arPhotos[68] = '2/boss_run_3.jpg';
			arPhotos[69] = '1/n33705167_30849424_1347.jpg';
			arPhotos[70] = '6/101908_11161.jpg';
			arPhotos[71] = '2/kb_c18.jpg';
			arPhotos[72] = '1/kevin_boss271.jpg';
			arPhotos[73] = '1/kevinboss_sb3.jpg';
			arPhotos[74] = '4/nygiants01.jpg';
			arPhotos[75] = '1/kevin_boss333.jpg';
			arPhotos[76] = '6/fanpic003.jpg';
			arPhotos[77] = '1/2-8-09_OSA_161.JPG';
			arPhotos[78] = '6/boss.jpg';
			arPhotos[79] = '5/19.jpg';
			arPhotos[80] = '2/_MG_9965.JPG';
			arPhotos[81] = '3/superbowl05.jpg';
			arPhotos[82] = '4/nygiants05.jpg';
			arPhotos[83] = '2/n51700524_30021276_8372.jpg';
			arPhotos[84] = '1/kevinboss_sb2.jpg';
			arPhotos[85] = '2/kb_c17.jpg';
			arPhotos[86] = '5/3.jpg';
			arPhotos[87] = '1/n13303411_32331425_7104.jpg';
			arPhotos[88] = '1/kevin_boss068.jpg';
			arPhotos[89] = '6/fanpic004.jpg';
			arPhotos[90] = '6/fanpic008.jpg';
			arPhotos[91] = '5/11.jpg';
			arPhotos[92] = '4/nygiants08.jpg';
			arPhotos[93] = '2/kb_c6.jpg';
			arPhotos[94] = '4/nygiants12.jpg';
			arPhotos[95] = '1/gal_nygiants_1.jpg';
			arPhotos[96] = '2/kb_c7.jpg';
			arPhotos[97] = '5/18.jpg';
	
	num_photos = arPhotos.length;

	for (i=0; i<num_photos; i++) {
		// preload all of the thumbnails for faster cycling
		preload_photos[i] = new Image();
		preload_photos[i].src = "images/gallery_photos_photo/thumb/"+arPhotos[i];
	}

	for (i=0; i<max_image_num; i++) {
		// setup the base array and make everything empty
		thumb_linker[i] = "";
	}
	
	function prevPics() {
		// show the previous 'max_image_num' photos
		counter			= 0;
		counter_flush	= 0;
		if ((beginner > 0) && (num_photos > (max_image_num-1))) {
			// there are 'previous' photos
			if (next_displayed != back_displayed) {
				next_displayed = (back_displayed - max_image_num);
				back_displayed = next_displayed;
			} else
				next_displayed = (beginner - max_image_num);
			
			next_displayed = (next_displayed > 0) ? next_displayed : 0;
			beginner = next_displayed;
			
			
			document.getElementById(large_img_id).src = large_path+arPhotos[next_displayed];
			document.getElementById(large_img_id).style.display = "";
			if ((num_photos - next_displayed) < (max_image_num+1))
				counter_flush = (num_photos - next_displayed);			
			for (i=next_displayed; ((i<num_photos) && (counter < max_image_num)); i++) {
				tmpString = thumb_id + counter;
				document.getElementById(tmpString).src = thumb_path+arPhotos[i];
				document.getElementById(tmpString).className = thumb_class;
				document.getElementById(tmpString).style.display = "";
				thumb_linker[counter] = arPhotos[i];
				counter++;
				next_displayed++;
			}
						
			fillBlanks();
		}
	}
	
	function nextPics() {
		// show the next 9 photos
		if (next_displayed < num_photos) {
			// there are more photos to show
			counter = 0;
			counter_flush = 0;
			document.getElementById(large_img_id).src = large_path+arPhotos[next_displayed];
			document.getElementById(large_link_id).href = large_short+arPhotos[next_displayed];
			document.getElementById(large_link_id).style.display = "";
			beginner = next_displayed;
			if ((num_photos-next_displayed) < (max_image_num+1))
				counter_flush = (num_photos - next_displayed);
			for (i=next_displayed; ((i<num_photos) && (counter<max_image_num)); i++) {
				tmpString = thumb_id+counter;
				document.getElementById(tmpString).src = thumb_path+arPhotos[i];
				document.getElementById(tmpString).className = thumb_class;
				document.getElementById(tmpString).style.display = "";
				thumb_linker[counter] = arPhotos[i];
				counter++;
				next_displayed++;
			}
			
			fillBlanks();
		}
	}
	
	function fillBlanks() {
		// if there are any blank thumbs, fill 'em in
		if (counter_flush != 0) {
			for (i=counter_flush; i<max_image_num; i++) {
				tmpString = thumb_id+i;
				document.getElementById(tmpString).src = blank_image;
				document.getElementById(tmpString).className = "";
				document.getElementById(tmpString).style.display = "none";
				thumb_linker[i] = "";
			}
		}
	}
	
	function transportThumb(whichThumb) {
		// make the current thumbnail into the big thumbnail
		if (thumb_linker[whichThumb]) {
			document.getElementById(large_img_id).src = large_path+thumb_linker[whichThumb];
			document.getElementById(large_link_id).href = large_short+thumb_linker[whichThumb];
		}
	}
