		var images = ["images/spot0.jpg", "images/spot1.jpg", "images/spot2.jpg", "images/spot3.jpg"];
		var links = ["shoesdetail.php?id=27&crumb=wedges%20and%20platforms&myCatType=Style", "shoesdetail.php?id=18&crumb=pumps&myCatType=Style", "shoesdetail.php?id=25&crumb=wedges%20and%20platforms&myCatType=Style", "shoesdetail.php?id=11&crumb=pumps&myCatType=Style"
		];
		var index = 0;
		
		//rotate the banner
		function rotate(){
			if(index >= images.length) index = 0;
			document.spot.src=images[index];
			index++;
			setTimeout("rotate()", 3000); // give it 3 seconds
		}
		
		//change location of current document
		function location(){
			if(index >= links.length) index = 0;
			document.location.href=links[index-1];
			index++;
		}




/*
//preload images to browser
function loadPics(){
	spot0=new Image();
	spot0.src="images/spot0.jpg";
	spot1=new Image();
	spot1.src="images/spot1.jpg";
	spot2=new Image();
	spot2.src="images/spot2.jpg";
	spot3=new Image();
	spot3.src="images/spot3.jpg";
	spotImages=new Array();
	spotImages[0]=spot0.src;
	spotImages[1]=spot1.src;
	spotImages[2]=spot2.src;
	spotImages[3]=spot3.src;
}

spotImages = new Array(
	"images/spot0.jpg",
	"images/spot1.jpg",
	"images/spot2.jpg",
	"images/spot3.jpg"
	)
thisImg = 0
imgCt = spotImages.length

spotLinks = new Array(
	"http://zephir.seattlecentral.edu/~dlouie02/lolapop/shoesdetail.php?id=27&crumb=wedges%20and%20platforms&myCatType=Style",
	"http://zephir.seattlecentral.edu/~dlouie02/lolapop/shoesdetail.php?id=18&crumb=pumps&myCatType=Style",
	"http://zephir.seattlecentral.edu/~dlouie02/lolapop/shoesdetail.php?id=25&crumb=wedges%20and%20platforms&myCatType=Style",
	"http://zephir.seattlecentral.edu/~dlouie02/lolapop/shoesdetail.php?id=11&crumb=pumps&myCatType=Style"
	)
thisLink = 0
lnkCt = spotLinks.length

//rotate the spot ads
function rotate() {
	if (document.images) {
		thisImg++
	if (thisImg == imgCt) {
		thisImg = 0
		} 
	document.spot.src=spotImages[thisImg]
	setTimeout("rotate()", 3 * 1000)
	}
}

//change to detail page of featured product
function location() {
	if (document.images) {
		thisLink++
	if (thisLink == lnkCt) {
		thisLink = 0
		} 
	document.location.href=spotLinks[lnkCt-1]
	}
}*/