		var numDisplay = new Array("Images/Gallery/MenuGraphics/num0.jpg",
				      "Images/Gallery/MenuGraphics/num1.jpg",
				      "Images/Gallery/MenuGraphics/num2.jpg",
				      "Images/Gallery/MenuGraphics/num3.jpg",
				      "Images/Gallery/MenuGraphics/num4.jpg",
				      "Images/Gallery/MenuGraphics/num5.jpg",
				      "Images/Gallery/MenuGraphics/num6.jpg",
				      "Images/Gallery/MenuGraphics/num7.jpg",
				      "Images/Gallery/MenuGraphics/num8.jpg",
				      "Images/Gallery/MenuGraphics/num9.jpg");

		var numberList = new Array();
		var thisPic = 0;
		var thisPage = 1;

		//var picture1 = "blank.jpg";
		var pictureschosenFew = new Array("",
					"",
					"",
					"",
					"",
					"");

		var currentsmlList = new Array("",
					"",
					"",
					"",
					"",
					"");


		var currentlrgList = new Array("",
					"",
					"",
					"",
					"",
					"");

		var undochosenFew = new Array("",
					"",
					"",
					"",
					"",
					"");





		for (t=0; t<6; t++){
			pictureschosenFew[t] = "Images/Gallery/MenuGraphics/blank.png";
			undochosenFew[t] = "Images/Gallery/MenuGraphics/blank.png";
		}

		var imgCt = mylrgPix.length - 1;

		fillCurrentList(0);
		function fillCurrentList(startVal){
			var temp = ""
			for (t=0; t<6; t++){
				var temp = t+startVal;  
				
				if (t+startVal <= imgCt){
					currentsmlList[t] = mysmlPix[t+startVal];
				} else {
					currentsmlList[t] = "Images/Gallery/MenuGraphics/blanked.png";
				}
				currentlrgList[t] = mylrgPix[t+startVal];
			}
		}
		
		
		function splitNumber(theNumber){
			
			var tempNum = 0;
			var theNumString = '' + theNumber;	//make a string
			for (r=0; r < theNumString.length; r++){
				tempNum = theNumString.charAt(r) * 1;
				numberList[r] = numDisplay[tempNum];
			}
			if (theNumString.length < 2){
				numberList[1] = numberList[0];
				numberList[0] = "Images/Gallery/MenuGraphics/num0.jpg";
			}
		}
		
		function chgSlide(direction){
			var theLower = 0;
			var theUpper = 0;
			var theTotal = imgCt + 1
			if (document.images){
				
				if (direction == -1) {	//left
					if (thisPic - 12 < 0){
						if (thisPic - 6 <= 0) { thisPic = 0}
						theLower = 1;
						theUpper = 6;
						document.previous.src = "Images/Gallery/MenuGraphics/blank_previous.jpg";
						document.next.src = "Images/Gallery/MenuGraphics/next.jpg";
					} else {
						thisPic -= 6;
						theLower = thisPic + 1;
						theUpper = thisPic + 6;
						document.previous.src = "Images/Gallery/MenuGraphics/previous.jpg";
						document.next.src = "Images/Gallery/MenuGraphics/next.jpg";
					}

				}
				else {			//right
					if (thisPic + 12 > imgCt){
						if (thisPic + 6 < imgCt) { thisPic += 6}
						theLower = thisPic + 1;
						theUpper = theTotal;
						document.next.src = "Images/Gallery/MenuGraphics/blank_next.jpg"
						document.previous.src = "Images/Gallery/MenuGraphics/previous.jpg";
					} else {
						thisPic += 6;
						theLower = thisPic + 1;
						theUpper = thisPic + 6;
						document.next.src = "Images/Gallery/MenuGraphics/next.jpg";
						document.previous.src = "Images/Gallery/MenuGraphics/previous.jpg";						
					}
				}
				//alert("Viewing " + theLower + " to " + theUpper + " of " + theTotal + ".");
				splitNumber(theLower);
				document.sleft.src=numberList[0];
				document.sright.src=numberList[1];
				splitNumber(theUpper);
				document.fleft.src=numberList[0];
				document.fright.src=numberList[1];
				splitNumber(theTotal);
				document.tleft.src=numberList[0];
				document.tright.src=numberList[1];
				fillCurrentList(thisPic);
				// load up the chosen block into active block
				document.myPicture1.src=currentsmlList[0];
				document.myPicture2.src=currentsmlList[1];
				document.myPicture3.src=currentsmlList[2];
				document.myPicture4.src=currentsmlList[3];
				document.myPicture5.src=currentsmlList[4];
				document.myPicture6.src=currentsmlList[5];
			}
		}
		function addPicture(picVal){
			if (currentsmlList[picVal] != "Images/Gallery/MenuGraphics/blanked.png"){
				undochosenFew[thisPage-1] = pictureschosenFew[thisPage-1];
				pictureschosenFew[thisPage-1] = currentlrgList[picVal];
				document.myMainPicture.src=pictureschosenFew[thisPage-1]
			}
		}

		function undoPicture(){
			pictureschosenFew[thisPage-1] = undochosenFew[thisPage-1];
			undochosenFew[thisPage-1] = "Images/Gallery/MenuGraphics/blank.png";
			document.myMainPicture.src=pictureschosenFew[thisPage-1];
		}

		
		