// JavaScript Document
//ONLY EDIT THESE IF YOU KNOW WHAT YOU ARE DOING//
var arrayNumTop = 0;
var timerTopEnabled = 1;
var textTop = new Array();
var imgTop = new Array();
var imgPathTop = "/graphics/rotation/banners/";

//YOU CAN EDIT THIS TO MAKE THE TIME BETWEEN ROTATIONS SHORTER OR LONGER//
var timerTop = 10000;	

//ROTATING TEXT AND IMAGES AT THE TOP//
/********************************************
*Edit rotating images and text here. Image 	*
*name goes in the first link in quotes. The *
*page that it wants to link to goes in the 	*
*second line. The text next to the image 	*
*goes in the bottom line. 					*
*											*
*Can be copied and repeated as many times 	*
*as wanted.									*
*********************************************/
	
	//EDIT THIS AREA//
	
	
	imgTop[arrayNumTop] = imgPathTop + "bullriding.jpg";
	textTop[arrayNumTop++] = "WZND and Six Strings are teaming up again for WZND's Crazy Country Concerts giveaway. Look for us on the quad Wednesday, March 17th for your chance to win tickets to Six Strings Concerts. Must be 21 and over.";
	
	imgTop[arrayNumTop] = imgPathTop + "streetteam.jpg";
	textTop[arrayNumTop++] = "WZND is always giving away tons of prizes. Look for us on the quad for your chance to win.";
	

// DO NOT EDIT BELOW HERE UNLESS YOU ARE SURE OF WHAT YOU ARE DOING //
	
	var x =-1;

function rotateTextTop() {
	if(timerTopEnabled == 1)
	{
	if(x==-1)
	  x = Math.floor(Math.random() * textTop.length);
	else	
	{
	 if(x == (textTop.length -1))
	   x = 0;
	 else
	   x++; 
	}
	  document.getElementById('rotateTextTop').innerHTML= textTop[x];
	  document.getElementById('rotateImgTop').alt = "";
	  document.getElementById('rotateImgTop').src = imgTop[x];
	}

	  setTimeout("rotateTextTop()",timerTop);

}
function rotateNext() {
	if(x==-1)
	  x = Math.floor(Math.random() * textTop.length);	
	else
	{
	 if(x == (textTop.length -1))
	   x = 0;
	 else
  	 	x++; 
	}
	  document.getElementById('rotateTextTop').innerHTML= textTop[x];
	  document.getElementById('rotateImgTop').alt = "";
	  document.getElementById('rotateImgTop').src = imgTop[x];
	  timerTopEnabled = 0;
}
function rotatePrevious() {
	if(x==-1)
	 x = Math.floor(Math.random() * textTop.length);	
	else
	{
	 if(x == 0)
	   x = (textTop.length -1);
	 else
	   x=x-1; 
	}
	  document.getElementById('rotateTextTop').innerHTML= textTop[x];
	  document.getElementById('rotateImgTop').alt = "";
	  document.getElementById('rotateImgTop').src = imgTop[x];
	  timerTopEnabled = 0;
}
function rotatePause() {
	if(timerTopEnabled == 0)
	 timerTopEnabled = 1;
	else
	 timerTopEnabled = 0;
	}