// FILE: tour.js
// GOAL: To identify files for slideshow tours
// WHO:  Bradley Roberts


// Set the following attributes for tours in general

// Set the background color for the slide object
var fadebgcolor="#FFFF80"; // var fadebgcolor="white"

var fadearray=new Array(); // Working array to cache fadeshow instances
var fadeclear=new Array(); // Working array to cache corresponding clearinterval pointers

// Set flags for later use
var dom=(document.getElementById); // Used by all modern DOM oriented browsers
var iebrowser=document.all;        // Flag to detect Internet Explorer
 

// Setup a unique array for each slideshow tour - q.v. makeshow
// FMT: [$FILE, $URL, $RND]
// WHERE: 
//     $FILE is the relative path to the image file - i.e. 450x350 px
//     $URL is the URL to go to if someone clicks on the image
//     $RND is the randomizer flag: "R" causes a random order; else the order is sequential


// Toolshed Show
var toolshedshow = new Array();
toolshedshow[0]=["album/pence_remodeling/images/image001.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[1]=["album/pence_remodeling/images/image002.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[2]=["album/pence_remodeling/images/image003.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[3]=["album/pence_remodeling/images/image004.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[4]=["album/pence_remodeling/images/image005.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[5]=["album/pence_remodeling/images/image006.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[6]=["album/pence_remodeling/images/image007.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[7]=["album/pence_remodeling/images/image008.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[8]=["album/pence_remodeling/images/image009.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[9]=["album/pence_remodeling/images/image010.jpg", "http://www.watsonline.org/construction.html",""];
toolshedshow[10]=["album/pence_remodeling/images/image011.jpg", "http://www.watsonline.org/construction.html",""];

// Library Tour Show
var library = new Array();
library[0]=["album/WATS_Library/images/image001.jpg", "http://www.watsonline.org/library.html",""];
library[1]=["album/WATS_Library/images/image002.jpg", "http://www.watsonline.org/library.html",""];
library[2]=["album/WATS_Library/images/image003.jpg", "http://www.watsonline.org/library.html",""];
library[3]=["album/WATS_Library/images/image004.jpg", "http://www.watsonline.org/library.html",""];
library[4]=["album/WATS_Library/images/image005.jpg", "http://www.watsonline.org/library.html",""];
library[5]=["album/WATS_Library/images/image006.jpg", "http://www.watsonline.org/library.html",""];
library[6]=["album/WATS_Library/images/image007.jpg", "http://www.watsonline.org/library.html",""];
library[7]=["album/WATS_Library/images/image008.jpg", "http://www.watsonline.org/library.html",""];
library[8]=["album/WATS_Library/images/image009.jpg", "http://www.watsonline.org/library.html",""];


// Twentieth Year Show
var Twenty = new Array();
Twenty[0]=["album/twenty_year/image001.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[1]=["album/twenty_year/image001.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[2]=["album/twenty_year/image002.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[3]=["album/twenty_year/image003.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[4]=["album/twenty_year/image004.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[5]=["album/twenty_year/image005.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[6]=["album/twenty_year/image006.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[7]=["album/twenty_year/image007.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[8]=["album/twenty_year/image008.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[9]=["album/twenty_year/image009.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[10]=["album/twenty_year/image010.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[11]=["album/twenty_year/image011.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[12]=["album/twenty_year/image012.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[13]=["album/twenty_year/image013.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[14]=["album/twenty_year/image014.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[15]=["album/twenty_year/image015.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[16]=["album/twenty_year/image016.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[17]=["album/twenty_year/image017.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[18]=["album/twenty_year/image018.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[19]=["album/twenty_year/image019.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[20]=["album/twenty_year/image020.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[21]=["album/twenty_year/image021.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[22]=["album/twenty_year/image022.jpg", "http://www.watsonline.org/twentieth",""];
Twenty[23]=["album/twenty_year/image023.jpg", "http://www.watsonline.org/twentieth",""];

// Most recent graduation pictures
var graduation = new Array();
graduation[0]=["album/Graduation_200905/image001.jpg", "http://www.watsonline.org/graduation",""];
graduation[1]=["album/Graduation_200905/image002.jpg", "http://www.watsonline.org/graduation",""];
graduation[2]=["album/Graduation_200905/image003.jpg", "http://www.watsonline.org/graduation",""];
graduation[3]=["album/Graduation_200905/image004.jpg", "http://www.watsonline.org/graduation",""];
graduation[4]=["album/Graduation_200905/image005.jpg", "http://www.watsonline.org/graduation",""];
graduation[5]=["album/Graduation_200905/image006.jpg", "http://www.watsonline.org/graduation",""];
graduation[6]=["album/Graduation_200905/image007.jpg", "http://www.watsonline.org/graduation",""];
graduation[7]=["album/Graduation_200905/image008.jpg", "http://www.watsonline.org/graduation",""];
graduation[8]=["album/Graduation_200905/image009.jpg", "http://www.watsonline.org/graduation",""];
graduation[9]=["album/Graduation_200905/image010.jpg", "http://www.watsonline.org/graduation",""];
graduation[10]=["album/Graduation_200905/image011.jpg", "http://www.watsonline.org/graduation",""];
graduation[11]=["album/Graduation_200905/image012.jpg", "http://www.watsonline.org/graduation",""];
graduation[12]=["album/Graduation_200905/image013.jpg", "http://www.watsonline.org/graduation",""];
graduation[13]=["album/Graduation_200905/image014.jpg", "http://www.watsonline.org/graduation",""];
graduation[14]=["album/Graduation_200905/image015.jpg", "http://www.watsonline.org/graduation",""];
graduation[15]=["album/Graduation_200905/image016.jpg", "http://www.watsonline.org/graduation",""];
graduation[16]=["album/Graduation_200905/image017.jpg", "http://www.watsonline.org/graduation",""];
graduation[17]=["album/Graduation_200905/image018.jpg", "http://www.watsonline.org/graduation",""];
graduation[18]=["album/Graduation_200905/image019.jpg", "http://www.watsonline.org/graduation",""];
graduation[19]=["album/Graduation_200905/image020.jpg", "http://www.watsonline.org/graduation",""];
graduation[20]=["album/Graduation_200905/image021.jpg", "http://www.watsonline.org/graduation",""];
graduation[21]=["album/Graduation_200905/image022.jpg", "http://www.watsonline.org/graduation",""];
graduation[22]=["album/Graduation_200905/image023.jpg", "http://www.watsonline.org/graduation",""];
graduation[23]=["album/Graduation_200905/image024.jpg", "http://www.watsonline.org/graduation",""];
graduation[24]=["album/Graduation_200905/image025.jpg", "http://www.watsonline.org/graduation",""];
graduation[25]=["album/Graduation_200905/image026.jpg", "http://www.watsonline.org/graduation",""];
graduation[26]=["album/Graduation_200905/image027.jpg", "http://www.watsonline.org/graduation",""];
graduation[27]=["album/Graduation_200905/image028.jpg", "http://www.watsonline.org/graduation",""];
graduation[28]=["album/Graduation_200905/image029.jpg", "http://www.watsonline.org/graduation",""];
graduation[29]=["album/Graduation_200905/image030.jpg", "http://www.watsonline.org/graduation",""];
graduation[30]=["album/Graduation_200905/image031.jpg", "http://www.watsonline.org/graduation",""];
graduation[31]=["album/Graduation_200905/image032.jpg", "http://www.watsonline.org/graduation",""];
graduation[32]=["album/Graduation_200905/image033.jpg", "http://www.watsonline.org/graduation",""];
graduation[33]=["album/Graduation_200905/image034.jpg", "http://www.watsonline.org/graduation",""];
graduation[34]=["album/Graduation_200905/image035.jpg", "http://www.watsonline.org/graduation",""];
graduation[35]=["album/Graduation_200905/image036.jpg", "http://www.watsonline.org/graduation",""];
graduation[36]=["album/Graduation_200905/image037.jpg", "http://www.watsonline.org/graduation",""];


// Honorary Doctorate Pictures
var honoraree = new Array();

honoraree[0]=["album/honorary/image001.jpg", "http://www.watsonline.org/album/honorary/image001.jpg",""];
honoraree[1]=["album/honorary/image002.jpg", "http://www.watsonline.org/album/honorary/image002.jpg",""];
honoraree[2]=["album/honorary/image003.jpg", "http://www.watsonline.org/album/honorary/image003.jpg",""];
honoraree[3]=["album/honorary/image004.jpg", "http://www.watsonline.org/album/honorary/image004.jpg",""];
honoraree[4]=["album/honorary/image005.jpg", "http://www.watsonline.org/album/honorary/image005.jpg",""];
honoraree[5]=["album/honorary/image006.jpg", "http://www.watsonline.org/album/honorary/image006.jpg",""];
honoraree[6]=["album/honorary/image007.jpg", "http://www.watsonline.org/album/honorary/image007.jpg",""];
honoraree[7]=["album/honorary/image008.jpg", "http://www.watsonline.org/album/honorary/image008.jpg",""];
honoraree[8]=["album/honorary/image009.jpg", "http://www.watsonline.org/album/honorary/image009.jpg",""];
honoraree[9]=["album/honorary/image010.jpg", "http://www.watsonline.org/album/honorary/image010.jpg",""];
honoraree[10]=["album/honorary/image011.jpg", "http://www.watsonline.org/album/honorary/image011.jpg",""];
honoraree[11]=["album/honorary/image012.jpg", "http://www.watsonline.org/album/honorary/image012.jpg",""];
honoraree[12]=["album/honorary/image013.jpg", "http://www.watsonline.org/album/honorary/image013.jpg",""];
honoraree[13]=["album/honorary/image014.jpg", "http://www.watsonline.org/album/honorary/image014.jpg",""];
honoraree[14]=["album/honorary/image015.jpg", "http://www.watsonline.org/album/honorary/image015.jpg",""];
honoraree[15]=["album/honorary/image016.jpg", "http://www.watsonline.org/album/honorary/image016.jpg",""];
honoraree[16]=["album/honorary/image017.jpg", "http://www.watsonline.org/album/honorary/image017.jpg",""];
honoraree[17]=["album/honorary/image018.jpg", "http://www.watsonline.org/album/honorary/image018.jpg",""];
honoraree[18]=["album/honorary/image019.jpg", "http://www.watsonline.org/album/honorary/image019.jpg",""];
honoraree[19]=["album/honorary/image020.jpg", "http://www.watsonline.org/album/honorary/image020.jpg",""];
honoraree[20]=["album/honorary/image021.jpg", "http://www.watsonline.org/album/honorary/image021.jpg",""];
honoraree[21]=["album/honorary/image022.jpg", "http://www.watsonline.org/album/honorary/image022.jpg",""];
honoraree[22]=["album/honorary/image023.jpg", "http://www.watsonline.org/album/honorary/image023.jpg",""];
honoraree[23]=["album/honorary/image024.jpg", "http://www.watsonline.org/album/honorary/image024.jpg",""];
honoraree[24]=["album/honorary/image025.jpg", "http://www.watsonline.org/album/honorary/image025.jpg",""];
honoraree[25]=["album/honorary/image026.jpg", "http://www.watsonline.org/album/honorary/image026.jpg",""];
honoraree[26]=["album/honorary/image027.jpg", "http://www.watsonline.org/album/honorary/image027.jpg",""];
honoraree[27]=["album/honorary/image028.jpg", "http://www.watsonline.org/album/honorary/image028.jpg",""];
honoraree[28]=["album/honorary/image029.jpg", "http://www.watsonline.org/album/honorary/image029.jpg",""];
honoraree[29]=["album/honorary/image030.jpg", "http://www.watsonline.org/album/honorary/image030.jpg",""];
honoraree[30]=["album/honorary/image031.jpg", "http://www.watsonline.org/album/honorary/image031.jpg",""];

// Define slide show segments for each honored guest
var honored1 = new Array();
var honored2 = new Array();
var honored3 = new Array();
var honored4 = new Array();
var honored5 = new Array();
var honored6 = new Array();
var honored7 = new Array();

// General Teidi
honored1[0]=["album/honorary/image001.jpg", "http://www.watsonline.org/album/honorary/image001.jpg",""];
honored1[1]=["album/honorary/image002.jpg", "http://www.watsonline.org/album/honorary/image002.jpg",""];
honored1[2]=["album/honorary/image003.jpg", "http://www.watsonline.org/album/honorary/image003.jpg",""];
honored1[3]=["album/honorary/image004.jpg", "http://www.watsonline.org/album/honorary/image004.jpg",""];
honored1[4]=["album/honorary/image005.jpg", "http://www.watsonline.org/album/honorary/image005.jpg",""];

// Chidozie Nwangwu
honored2[0]=["album/honorary/image014.jpg", "http://www.watsonline.org/album/honorary/image014.jpg",""];
honored2[1]=["album/honorary/image006.jpg", "http://www.watsonline.org/album/honorary/image006.jpg",""];
honored2[2]=["album/honorary/image007.jpg", "http://www.watsonline.org/album/honorary/image007.jpg",""];
honored2[3]=["album/honorary/image008.jpg", "http://www.watsonline.org/album/honorary/image008.jpg",""];

// Kofi Obiako
honored3[0]=["album/honorary/image014.jpg", "http://www.watsonline.org/album/honorary/image014.jpg",""];
honored3[1]=["album/honorary/image009.jpg", "http://www.watsonline.org/album/honorary/image009.jpg",""];
honored3[2]=["album/honorary/image010.jpg", "http://www.watsonline.org/album/honorary/image010.jpg",""];
honored3[3]=["album/honorary/image011.jpg", "http://www.watsonline.org/album/honorary/image011.jpg",""];
honored3[4]=["album/honorary/image012.jpg", "http://www.watsonline.org/album/honorary/image012.jpg",""];

// Leroy Adams
honored4[0]=["album/honorary/image014.jpg", "http://www.watsonline.org/album/honorary/image014.jpg",""];
honored4[1]=["album/honorary/image013.jpg", "http://www.watsonline.org/album/honorary/image013.jpg",""];
honored4[2]=["album/honorary/image015.jpg", "http://www.watsonline.org/album/honorary/image015.jpg",""];
honored4[3]=["album/honorary/image016.jpg", "http://www.watsonline.org/album/honorary/image016.jpg",""];
honored4[4]=["album/honorary/image017.jpg", "http://www.watsonline.org/album/honorary/image017.jpg",""];
honored4[5]=["album/honorary/image018.jpg", "http://www.watsonline.org/album/honorary/image018.jpg",""];

// Donald R. Plemons
honored5[0]=["album/honorary/image014.jpg", "http://www.watsonline.org/album/honorary/image014.jpg",""];
honored5[1]=["album/honorary/image019.jpg", "http://www.watsonline.org/album/honorary/image019.jpg",""];
honored5[2]=["album/honorary/image020.jpg", "http://www.watsonline.org/album/honorary/image020.jpg",""];
honored5[3]=["album/honorary/image021.jpg", "http://www.watsonline.org/album/honorary/image021.jpg",""];
honored5[4]=["album/honorary/image022.jpg", "http://www.watsonline.org/album/honorary/image022.jpg",""];

// Bernard Dawson
honored6[0]=["album/honorary/image014.jpg", "http://www.watsonline.org/album/honorary/image014.jpg",""];
honored6[1]=["album/honorary/image023.jpg", "http://www.watsonline.org/album/honorary/image023.jpg",""];
honored6[2]=["album/honorary/image024.jpg", "http://www.watsonline.org/album/honorary/image024.jpg",""];
honored6[3]=["album/honorary/image025.jpg", "http://www.watsonline.org/album/honorary/image025.jpg",""];

// Alan Bullock
honored7[0]=["album/honorary/image014.jpg", "http://www.watsonline.org/album/honorary/image014.jpg",""];
honored7[1]=["album/honorary/image026.jpg", "http://www.watsonline.org/album/honorary/image026.jpg",""];
honored7[2]=["album/honorary/image027.jpg", "http://www.watsonline.org/album/honorary/image027.jpg",""];
honored7[3]=["album/honorary/image028.jpg", "http://www.watsonline.org/album/honorary/image028.jpg",""];
honored7[4]=["album/honorary/image029.jpg", "http://www.watsonline.org/album/honorary/image029.jpg",""];
honored7[5]=["album/honorary/image031.jpg", "http://www.watsonline.org/album/honorary/image031.jpg",""];


// construction Slideshow:
var construction = new Array();

construction[0]=["album/construction/image001.jpg", "http://www.watsonline.org/album/construction/image001.jpg",""];
construction[1]=["album/construction/image002.jpg", "http://www.watsonline.org/album/construction/image002.jpg",""];
construction[2]=["album/construction/image003.jpg", "http://www.watsonline.org/album/construction/image003.jpg",""];
construction[3]=["album/construction/image004.jpg", "http://www.watsonline.org/album/construction/image004.jpg",""];
construction[4]=["album/construction/image005.jpg", "http://www.watsonline.org/album/construction/image005.jpg",""];
construction[5]=["album/construction/image006.jpg", "http://www.watsonline.org/album/construction/image006.jpg",""];
construction[6]=["album/construction/image007.jpg", "http://www.watsonline.org/album/construction/image007.jpg",""];
construction[7]=["album/construction/image008.jpg", "http://www.watsonline.org/album/construction/image008.jpg",""];
construction[8]=["album/construction/image009.jpg", "http://www.watsonline.org/album/construction/image009.jpg",""];
construction[9]=["album/construction/image010.jpg", "http://www.watsonline.org/album/construction/image010.jpg",""];
construction[10]=["album/construction/image011.jpg", "http://www.watsonline.org/album/construction/image011.jpg",""];
construction[11]=["album/construction/image012.jpg", "http://www.watsonline.org/album/construction/image012.jpg",""];
construction[12]=["album/construction/image013.jpg", "http://www.watsonline.org/album/construction/image013.jpg",""];
construction[13]=["album/construction/image014.jpg", "http://www.watsonline.org/album/construction/image014.jpg",""];
construction[14]=["album/construction/image015.jpg", "http://www.watsonline.org/album/construction/image015.jpg",""];
construction[15]=["album/construction/image016.jpg", "http://www.watsonline.org/album/construction/image016.jpg",""];
construction[16]=["album/construction/image017.jpg", "http://www.watsonline.org/album/construction/image017.jpg",""];


// TIP: new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)

// Now define main function for multiple slideshows

/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION: fadeshow()
// GOAL:     To show the slide show using 
// EG:       © 2008 Darby Consulting
// USE:      Just call this as follows where needed:
//              <script language="javascript" type="text/javascript"><!-- Hidden from some browsers
//              				new fadeshow($SHOW, 480, 360, 0, 3000, 1, "R");
//              // End --></script>
// SOURCE:   The Ultimate Fade-In Slideshow v1.51 from Dynamic Drive www.dynamicdrive.com
/////////////////////////////////////////////////////////////////////////////////////////////
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder)
{
	this.pausecheck=pause;
	this.mouseovercheck=0;
	this.delay=delay;
	this.degree=10; //initial opacity degree (10%)
	this.curimageindex=0;
	this.nextimageindex=1;
	fadearray[fadearray.length]=this;
	this.slideshowid=fadearray.length-1;
	this.canvasbase="canvas"+this.slideshowid;
	this.curcanvas=this.canvasbase+"_0";
	if (typeof displayorder!="undefined");
	theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
	this.theimages=theimages;
	this.imageborder=parseInt(borderwidth);
	this.postimages=new Array(); //preload images
	for (p=0;p<theimages.length;p++)
	{
		this.postimages[p]=new Image();
		this.postimages[p].src=theimages[p][0];
	}
 
	var fadewidth=fadewidth+this.imageborder*2;
	var fadeheight=fadeheight+this.imageborder*2;
	 
	if (iebrowser&&dom||dom) // If IE5+ or modern browsers (ie: Firefox)
		document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
	else
		document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
	 
	if (iebrowser&&dom||dom) // If IE5+ or modern browsers such as Firefox
		this.startit()
	else
	{
		this.curimageindex++
		setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
	}
}


/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION: fadepic($OBJECT)
// GOAL:     To produce a fade-in effect for the picture object 
// SOURCE:   The Ultimate Fade-In Slideshow v1.51 from Dynamic Drive www.dynamicdrive.com
/////////////////////////////////////////////////////////////////////////////////////////////
function fadepic(obj){
	if (obj.degree<100){
		obj.degree+=10
	if (obj.tempobj.filters&&obj.tempobj.filters[0]){
	if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
		obj.tempobj.filters[0].opacity=obj.degree
	else //else if IE5.5-
		obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
	}
	else if (obj.tempobj.style.MozOpacity)
		obj.tempobj.style.MozOpacity=obj.degree/101
	else if (obj.tempobj.style.KhtmlOpacity)
		obj.tempobj.style.KhtmlOpacity=obj.degree/100
	else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
		obj.tempobj.style.opacity=obj.degree/101
	}
	else{
		clearInterval(fadeclear[obj.slideshowid])
		obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
		obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
		obj.populateslide(obj.tempobj, obj.nextimageindex)
		obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
		setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
	}
}
 

/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION: populateslide($OBJECT)
// GOAL:     To populate the slide with an object
// SOURCE:   The Ultimate Fade-In Slideshow v1.51 from Dynamic Drive www.dynamicdrive.com
/////////////////////////////////////////////////////////////////////////////////////////////
fadeshow.prototype.populateslide=function(picobj, picindex)
{
	var slideHTML=""
	if (this.theimages[picindex][1]!="") //if associated link exists for image
	slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
	slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
	if (this.theimages[picindex][1]!="") //if associated link exists for image
	slideHTML+='</a>'
	picobj.innerHTML=slideHTML
}
 


/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION: rotateimage()
// GOAL:     To rotate the image if needed
// SOURCE:   The Ultimate Fade-In Slideshow v1.51 from Dynamic Drive www.dynamicdrive.com
/////////////////////////////////////////////////////////////////////////////////////////////
fadeshow.prototype.rotateimage=function(){
	if (this.pausecheck==1) //if pause onMouseover enabled, cache object
	var cacheobj=this
	if (this.mouseovercheck==1)
		setTimeout(function(){cacheobj.rotateimage()}, 100)
	else if (iebrowser&&dom||dom){
		this.resetit()
		var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
		crossobj.style.zIndex++
		fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
		this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
	}
	else{
		var ns4imgobj=document.images['defaultslide'+this.slideshowid]
		ns4imgobj.src=this.postimages[this.curimageindex].src
	}
	this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 

/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION: resetit()
// GOAL:     To reset the image if needed
// SOURCE:   The Ultimate Fade-In Slideshow v1.51 from Dynamic Drive www.dynamicdrive.com
/////////////////////////////////////////////////////////////////////////////////////////////
fadeshow.prototype.resetit=function(){
	this.degree=10
	var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
	if (crossobj.filters&&crossobj.filters[0]){
		if (typeof crossobj.filters[0].opacity=="number") //if IE6+
			crossobj.filters(0).opacity=this.degree
		else //else if IE5.5-
			crossobj.style.filter="alpha(opacity="+this.degree+")"
	}
	else if (crossobj.style.MozOpacity)
		crossobj.style.MozOpacity=this.degree/101
	else if (crossobj.style.KhtmlOpacity)
		crossobj.style.KhtmlOpacity=this.degree/100
	else if (crossobj.style.opacity&&!crossobj.filters)
		crossobj.style.opacity=this.degree/101
}
 
 
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION: startit()
// GOAL:     To start the slideshow as needed
// SOURCE:   The Ultimate Fade-In Slideshow v1.51 from Dynamic Drive www.dynamicdrive.com
/////////////////////////////////////////////////////////////////////////////////////////////
fadeshow.prototype.startit=function(){
	var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
	this.populateslide(crossobj, this.curimageindex)
	if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
		var cacheobj=this
		var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
		crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
		crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
	}
	this.rotateimage()
}


// End of functions

