﻿<!-- configurable script -->
theimage = new Array();


// The dimensions of ALL the images should be the same or some of them may look stretched or reduced in Netscape 4.
// Format: theimage[...]=[image URL, link URL, name/description]
theimage[0]=["http://www.many-miniatures.com/prime/photos/logo_mm.gif", "http://www.many-miniatures.com/prime/divisions.asp", "Many Miniatures"];
theimage[1]=["http://www.many-miniatures.com/prime/photos/specials/fb10-12.jpg", "http://www.many-miniatures.com/prime/cat_tundra.asp", "Facebook Featured: December 2010"];
theimage[2]=["http://www.many-miniatures.com/prime/inventory/pvc/animals/ar13.jpg", "http://www.many-miniatures.com/prime/cat_tundra.asp", "Reindeer"];
theimage[3]=["http://www.many-miniatures.com/prime/inventory/pvc/animals/ar15.jpg", "http://www.many-miniatures.com/prime/cat_tundra.asp", "Arctic Fox"];
theimage[4]=["http://www.many-miniatures.com/prime/inventory/pvc/animals/sl03.jpg", "http://www.many-miniatures.com/prime/cat_tundra.asp", "Walrus"];
theimage[5]=["http://www.many-miniatures.com/prime/inventory/pvc/animals/pb06.jpg", "http://www.many-miniatures.com/prime/cat_tundra.asp", "Female Polar Bear"];
theimage[6]=["http://www.many-miniatures.com/prime/inventory/pvc/animals/ar01.jpg", "http://www.many-miniatures.com/prime/cat_tundra.asp", "Howling Gray Wolf"];
theimage[7]=["http://www.many-miniatures.com/prime/photos/logos/logo_facebook.jpg", "http://www.facebook.com/pages/Many-Miniatures/284967344339", "Facebook Page"];
theimage[8]=["http://www.many-miniatures.com/prime/photos/caption_1101.jpg", "http://www.facebook.com/#!/photo.php?fbid=492108999339&set=a.454711389339.246057.284967344339", "January Photo Caption Contest"];
theimage[9]=["http://www.many-miniatures.com/prime/photos/logos/logo_ebay.jpg", "http://stores.ebay.com/manyminiatures", "Ebay Store"];
theimage[10]=["http://www.many-miniatures.com/prime/photos/logos/logo_twitter.jpg", "http://www.twitter.com/manyminiatures", "MindOfManyMiniatures"];

///// Plugin variables

playspeed=3500;// The playspeed determines the delay for the "Play" button in ms
//#####
//key that holds where in the array currently are
i=0;


//###########################################
window.onload=function(){

	//preload images into browser
	preloadSlide();

	//set the first slide
	SetSlide(0);

	//autoplay
	PlaySlide();
}

//###########################################
function SetSlide(num) {
	//too big
	i=num%theimage.length;
	//too small
	if(i<0)i=theimage.length-1;

	//switch the image
	document.images.imgslide.src=theimage[i][0];

}


//###########################################
function PlaySlide() {
	if (!window.playing) {
		PlayingSlide(i+1);
		if(document.slideshow.play){
			document.slideshow.play.value="   Stop   ";
		}
	}
	else {
		playing=clearTimeout(playing);
		if(document.slideshow.play){
			document.slideshow.play.value="   Play   ";
		}
	}
	// if you have to change the image for the "playing" slide
	if(document.images.imgPlay){
		setTimeout('document.images.imgPlay.src="'+imgStop+'"',1);
		imgStop=document.images.imgPlay.src
	}
}


//###########################################
function PlayingSlide(num) {
	playing=setTimeout('PlayingSlide(i+1);SetSlide(i+1);', playspeed);
}


//###########################################
function preloadSlide() {
	for(k=0;k<theimage.length;k++) {
		theimage[k][0]=new Image().src=theimage[k][0];
	}
}



