	var thumbImg1 = 1
	var thumbImg2 = 2
	var thumbImg3 = 3
	var thumbImg4 = 4
	
	var thisImg = 1
	var imgCt = 15
	var urlBase = "/photos/"
	var imgBase = "/images/"
	var curset="bospig-2006sep/bospig200609_"
	var curthumbs="bospig-2006sep/WT_bospig200609_"
	
	function initArray()
	{
		this.length = initArray.arguments.length
		for (var i=0; i < this.length; i++)
		{
			this[i] = initArray.arguments[i]
		}
	}
	
	var pic = new initArray("carrot", "clover", "coldpaws", "iloveyou", "need-a-hug", "roses", "youth")
	
	function openPic(picName)
	{ 
		var newWin = window.open(picName,'Picture','toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes,status=no,resizable=yes,copyhistory=no,width=360,height=290,left=50,top=50');
		newWin.focus();
	}
	
	function isWin(){
			if (navigator.appVersion.indexOf("Win") != -1)	return true;
			else return false;
		}

	function isIE(){
		if (navigator.appName == "Microsoft Internet Explorer") return true;
		else return false;
	}
	
	function isIEPC(){
		if (isWin() && isIE()) return true;
		else return false;
	}
	
	function popem(page,winname,width,height,scroll){
    		winname = window.open(page,winname,'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
			if (isIEPC() != 1) {
				winname.focus();
			}
		}
	
	function loadThumbs(direction, numThumbs) 
	{
		if (document.images) 
		{
			for (var i = 0; i < numThumbs; i++) 
			{
 				if (direction > 0) 
				{
			        thumbImg1++
			        thumbImg2++
			        thumbImg3++
			        thumbImg4++
 				}
 				else 
				{
			        thumbImg1--
			        thumbImg2--
			        thumbImg3--
			        thumbImg4--
 				}

				if (thumbImg1 < 1) 
				{
				  	thumbImg1 = imgCt
				}
				if (thumbImg1 > imgCt) 
				{
				  	thumbImg1 = 1
				}
				if (thumbImg2 < 1) 
				{
				  	thumbImg2 = imgCt
				}
				if (thumbImg2 > imgCt) 
				{
				  	thumbImg2 = 1
				}
				if (thumbImg3 < 1) 
				{
				  	thumbImg3 = imgCt
				}
				if (thumbImg3 > imgCt) 
				{
				  	thumbImg3 = 1
				}
				if (thumbImg4 < 1) 
				{
				  	thumbImg4 = imgCt
				}
				if (thumbImg4 > imgCt) 
				{
				  	thumbImg4 = 1
				}
			}
			
			document.thumb1.src = urlBase + curthumbs + thumbImg1 + ".jpg"
			document.thumb2.src = urlBase + curthumbs + thumbImg2 + ".jpg"
			document.thumb3.src = urlBase + curthumbs + thumbImg3 + ".jpg"
			document.thumb4.src = urlBase + curthumbs + thumbImg4 + ".jpg"
		}
	}



	function newSlide(index) 
	{
		if (document.images) 
		{
			document.slide.src = urlBase + curset + eval("thumbImg" + index) + ".jpg"
		}
	}
	
	function newSlide2(index)
	{
		if (document.images)
		{
			var picture = "carrot";
			switch (index)
			{
			case 0:
				picture = "happyeaster";
				break;
			case 1:
				picture = "clover";
				break;
			case 2:
				picture = "birthday-spots";
				break;
			case 3:
				picture = "iloveyou";
				break;
			case 4:
				picture = "collage-carethanks";
				break;
			case 5:
				picture = "roses";
				break;
			case 6:
				picture = "youth";
				break;
			case 7:
				picture = "together";
				break;
			case 8:
				picture = "summer-notext";
				break;
			case 9:
				picture = "hi-closeup";
				break;
			case 10:
				picture = "collage-world";
				break;
			case 11:
				picture = "carrot";
				break;
			case 12:
				picture = "snow";
				break;
			case 13:
				picture = "coldpaws";
				break;
			case 14:
				picture = "happyholidays";
				break;
			case 15:
				picture = "hairychristmas";
				break;
			}
			
			document.slide.src = imgBase + "candy-" + picture + ".jpg"
		}
	}

	function reset() 
	{
		thumbImg1 = 1
		thumbImg2 = 2
		thumbImg3 = 3
		thumbImg4 = 4
		thisImg   = 1
		document.thumb1.src = urlBase + curthumbs + thumbImg1 + ".jpg"
		document.thumb2.src = urlBase + curthumbs + thumbImg2 + ".jpg"
		document.thumb3.src = urlBase + curthumbs + thumbImg3 + ".jpg"
		document.thumb4.src = urlBase + curthumbs + thumbImg4 + ".jpg"
		document.slide.src  = urlBase + curset + thisImg + ".jpg"
	}

	function changeSet(newSet, newThumbs, numImages) 
	{
		curset = newSet
		curthumbs = newThumbs
		imgCt = numImages
		reset()
	}

