// JavaScript Document

<!--//ImageROTATOR//-->
	//set variables
	var ImageLoc="http://www.piperschools.com/Images/BannerImages/"
	var dly=5000 //delay in m.seconds
	var yOld=3 //number of columns
	var xOld0=0 //don't change
	var xOld1=0 //don't change
	var xOld2=0 //don't change

	var picarray=new Array(yOld)
	for (i=0; i<yOld; i++)
	picarray[i]=new Array()

	picarray[0][0]='EW01.jpg'
	picarray[0][1]='EW02.jpg'
	picarray[0][2]='EW04.jpg'
	picarray[0][3]='MS01.jpg'
	picarray[0][4]='MS03.jpg'
	picarray[0][5]='MS05.jpg'
	picarray[0][6]='MS07.jpg'
	picarray[0][7]='MS10.jpg'
	picarray[0][8]='MS13.jpg'
	picarray[0][9]='MS15.jpg'
	picarray[0][10]='MS17.jpg'
	picarray[0][11]='MS20.jpg'
	picarray[0][12]='MS22.jpg'
	picarray[0][13]='MS24.jpg'
	picarray[0][14]='MS26.jpg'
	picarray[0][15]='MS29.jpg'
	picarray[0][16]='HS04.jpg'
	picarray[0][17]='HS08.jpg'
	picarray[0][18]='HS10.jpg'
	picarray[0][19]='HS11.jpg'

	picarray[1][0]='EW03.jpg'
	picarray[1][1]='MS09.jpg'
	picarray[1][2]='MS11.jpg'
	picarray[1][3]='MS19.jpg'
	picarray[1][4]='MS27.jpg'
	picarray[1][5]='MS30.jpg'
	picarray[1][6]='HS01.jpg'
	picarray[1][7]='HS03.jpg'
	picarray[1][8]='HS06.jpg'
	picarray[1][9]='HS07.jpg'
	picarray[1][10]='HS12.jpg'
	picarray[1][11]='HS13.jpg'

	picarray[2][0]='EW05.jpg'
	picarray[2][1]='EW06.jpg'
	picarray[2][2]='MS02.jpg'
	picarray[2][3]='MS04.jpg'
	picarray[2][4]='MS06.jpg'
	picarray[2][5]='MS08.jpg'
	picarray[2][6]='MS12.jpg'
	picarray[2][7]='MS14.jpg'
	picarray[2][8]='MS16.jpg'
	picarray[2][9]='MS18.jpg'
	picarray[2][10]='MS21.jpg'
	picarray[2][11]='MS23.jpg'
	picarray[2][12]='MS25.jpg'
	picarray[2][13]='MS28.jpg'
	picarray[2][14]='MS31.jpg'
	picarray[2][15]='HS02.jpg'
	picarray[2][16]='HS05.jpg'
	picarray[2][17]='HS09.jpg'
	picarray[2][18]='HS14.jpg'

	//do not change anything below
	function initialdelay(dly){
		setTimeout("autoswap()",dly);
	}
	function autoswap(){//auto-swap images
		var colcnt=picarray.length;
		var y=Math.floor(Math.random()*colcnt); //decides which array to swap
		if (y==yOld){y+=1;if (y>=colcnt){y=0}}; //ensures the same column isn't switched again
		var piccnt=picarray[y].length; //figures out how many pics in this array
		var x=Math.floor(Math.random()*piccnt); //decides which pic in array to swap
		if (y==0){if (x==xOld0){x+=1;if (x>=piccnt){x=0}}; //ensures the current picture isn't switched to again
			document.images.arrayspace0.src=ImageLoc+"tn-"+picarray[y][x];document.hideme.ImageInfo0.value=ImageLoc+"fs-"+picarray[y][x];yOld=y;xOld0=x;}
		if (y==1){if (x==xOld1){x+=1;if (x>=piccnt){x=0}}; //ensures the current picture isn't switched to again
			document.images.arrayspace1.src=ImageLoc+"tn-"+picarray[y][x];document.hideme.ImageInfo1.value=ImageLoc+"fs-"+picarray[y][x];yOld=y;xOld1=x;}
		if (y==2){if (x==xOld2){x+=1;if (x>=piccnt){x=0}}; //ensures the current picture isn't switched to again
			document.images.arrayspace2.src=ImageLoc+"tn-"+picarray[y][x];document.hideme.ImageInfo2.value=ImageLoc+"fs-"+picarray[y][x];yOld=y;xOld2=x;}
		var y=null;
		var piccnt=null;
		setTimeout("autoswap()",dly);
	}
	function manswap(y1){//manual-swap images
		var piccnt=picarray[y1].length; //figures out how many pics in this array
		var x1=Math.floor(Math.random()*piccnt); //decides which pic in array to swap
		if (y1==0){if (x1==xOld0){x1+=1;if (x1>=piccnt){x1=0}}; //ensures the current picture isn't switched to again
			document.images.arrayspace0.src=ImageLoc+"tn-"+picarray[y1][x1];document.hideme.ImageInfo0.value=ImageLoc+"fs-"+picarray[y1][x1];yOld=y1;xOld0=x1;}
		if (y1==1){if (x1==xOld1){x1+=1;if (x1>=piccnt){x1=0}}; //ensures the current picture isn't switched to again
			document.images.arrayspace1.src=ImageLoc+"tn-"+picarray[y1][x1];document.hideme.ImageInfo1.value=ImageLoc+"fs-"+picarray[y1][x1];yOld=y1;xOld0=x1;}
		if (y1==2){if (x1==xOld2){x1+=1;if (x1>=piccnt){x1=0}}; //ensures the current picture isn't switched to again
			document.images.arrayspace2.src=ImageLoc+"tn-"+picarray[y1][x1];document.hideme.ImageInfo2.value=ImageLoc+"fs-"+picarray[y1][x1];yOld=y1;xOld0=x1;}
		var y1=null;
		var piccnt=null;
	}
	function showbig(z1){//click-on images
		if (z1==0){BigPic=window.open(document.hideme.ImageInfo0.value,"","height=480,width=640")};
		if (z1==1){BigPic=window.open(document.hideme.ImageInfo1.value,"","height=480,width=360")};
		if (z1==2){BigPic=window.open(document.hideme.ImageInfo2.value,"","height=480,width=640")};
		z1=null;
	}
	document.write('<form name="hideme">');
	document.write('<input name="ImageInfo0" type="hidden" value="'+ImageLoc+'fs-'+picarray[0][0]+'">');
	document.write('<input name="ImageInfo1" type="hidden" value="'+ImageLoc+'fs-'+picarray[1][0]+'">');
	document.write('<input name="ImageInfo2" type="hidden" value="'+ImageLoc+'fs-'+picarray[2][0]+'">');
	document.write('</form>');
	document.write('<a class="ImageRotatorLink" href="javascript:showbig(0)" onmousedown="if(event.button==2){manswap(0);}"><img class="ImageRotatorImg" name="arrayspace0" src="'+ImageLoc+'tn-'+picarray[0][0]+'" width="200" height="150" border="3"></a>&nbsp;&nbsp;&nbsp;');
	document.write('<a class="ImageRotatorLink" href="javascript:showbig(1)" onmousedown="if(event.button==2){manswap(1);}"><img class="ImageRotatorImg" name="arrayspace1" src="'+ImageLoc+'tn-'+picarray[1][0]+'" width="150" height="150" border="3"></a>&nbsp;&nbsp;&nbsp;');
	document.write('<a class="ImageRotatorLink" href="javascript:showbig(2)" onmousedown="if(event.button==2){manswap(2);}"><img class="ImageRotatorImg" name="arrayspace2" src="'+ImageLoc+'tn-'+picarray[2][0]+'" width="200" height="150" border="3"></a>');
<!--//ImageROTATOR//-->