
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.expert-webmasters.com/images/SEO-Cheat-Sheet-frontview_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet-frontview_large.gif", "Front View"];

theimage[1]=["http://www.expert-webmasters.com/search-engine-optimization/seo-images/SEO-Google-AdWords-And-Google-AdSense_small.gif", "http://www.expert-webmasters.com/images/SEO-7-Step-Process.JPG", "FREE Gift with Cheat Sheet"];

theimage[2]=["http://www.expert-webmasters.com/images/All-In-One-SEO-Cheat-Sheet.gif", "http://www.expert-webmasters.com/images/SEO-7-Step-Process.JPG", "SEO Cheat Sheet Package"];

theimage[3]=["http://www.expert-webmasters.com/images/60DayEmailSupport.gif", "http://www.expert-webmasters.com/images/SEO-7-Step-Process.JPG", "FREE Gift #2 with Cheat Sheet"];

theimage[4]=["http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page1of6_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page1of6_large.gif", "Page 1 of 6"];

theimage[5]=["http://www.expert-webmasters.com/images/SEO-Process_small.gif", "http://www.expert-webmasters.com/images/SEO-7-Step-Process.JPG", "7 Steps In SEO Process"];

theimage[6]=["http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page2of6_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page2of6_large.gif", "Page 2 of 6"];

theimage[7]=["http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page3of6_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page3of6_large.gif", "Page 3 of 6"];

theimage[8]=["http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page2and3_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page2and3_large.gif", "Pages 2 & 3"];

theimage[9]=["http://www.expert-webmasters.com/search-engine-optimization/seo-images/SEO-Google-AdWords-And-Google-AdSense_small.gif", "http://www.expert-webmasters.com/images/SEO-7-Step-Process.JPG", "FREE Gift with Cheat Sheet"];

theimage[10]=["http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page4of6_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page4of6_large.gif", "Page 4 of 6"];

theimage[11]=["http://www.expert-webmasters.com/images/60DayEmailSupport.gif", "http://www.expert-webmasters.com/images/SEO-7-Step-Process.JPG", "FREE Gift #2 with Cheat Sheet"];

theimage[12]=["http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page5of6_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page5of6_large.gif", "Page 5 of 6"];

theimage[13]=["http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page6of6_small.gif", "http://www.expert-webmasters.com/images/SEO-Cheat-Sheet_Page6of6_large.gif", "Page 6 of 6"];

theimage[14]=["http://www.expert-webmasters.com/images/SEO-KeywordAnalysis_small2.gif", "http://www.expert-webmasters.com/images/SEO-OtherScreenshots.JPG", "Excerpts From Cheat Sheet"];

///// Plugin variables

playspeed=7000;// The playspeed determines the delay for the "Play" button in ms
dotrans=1; // if value = 1 then there are transitions played in IE
transtype='blendTrans';// 'blendTrans' or 'revealtrans'
transattributes='23';// duration=seconds,transition=#<24
//#####
//key that holds where in the array currently are
i=0;


//###########################################
window.onload=function(){

	//preload images into browser
	preloadSlide();

	//set transitions
	GetTrans();

	//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
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Apply()')
	document.images.imgslide.src=theimage[i][0];
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Play()')

	//if they want name of current slide
	document.getElementById('slidebox').innerHTML=theimage[i][2];

	//if they want current slide number and total
	//document.getElementById('slidecount').innerHTML= "Image "+(i+1)+" of "+theimage.length;

}


//###########################################
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);
}


//###########################################
//desc: picks the transition to apply to the images
function GetTrans() {
	//si=document.slideshow.trans.selectedIndex;

		if((document.slideshow.trans && document.slideshow.trans.selectedIndex == 0) || (!document.slideshow.trans && dotrans==0)){
		dotrans=0;
	}
	else if ((document.slideshow.trans && document.slideshow.trans.selectedIndex == 1) || (!document.slideshow.trans && transtype == 'blendTrans')){
		dotrans=1;
		transtype='blendTrans';
		document.imgslide.style.filter = "blendTrans(duration=1,transition=1)";
	}else{
		dotrans=1;
		transtype='revealtrans';
		if(document.slideshow.trans) transattributes=document.slideshow.trans[document.slideshow.trans.selectedIndex].value;
		document.imgslide.style.filter = "revealTrans(duration=1,transition=" +transattributes+ ")";
	}

}
//###########################################
function preloadSlide() {
	for(k=0;k<theimage.length;k++) {
		theimage[k][0]=new Image().src=theimage[k][0];
	}
}

