
/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
var newsimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed

  newsimages[0]=["images/slideshow_175.jpg", "news_175.htm", ""]
  newsimages[1]=["images/slideshow_170.jpg", "news_170.htm", ""]
  newsimages[2]=["images/slideshow_168.jpg", "news_168.htm", ""]
  newsimages[3]=["images/slideshow_167.jpg", "news_167.htm", ""]
  newsimages[4]=["images/slideshow_165.jpg", "news_165.htm", ""]
  newsimages[5]=["images/slideshow_163.jpg", "news_163.htm", ""]
  newsimages[6]=["images/slideshow_155.jpg", "news_155.htm", ""]
  newsimages[7]=["images/slideshow_153.jpg", "news_153.htm", ""]

fadeimages[00]=["images/rotation-15-1.jpg", "", ""]
fadeimages[01]=["images/rotation-15-2.jpg", "", ""] 
fadeimages[02]=["images/rotation-15-3.jpg", "", ""] 
fadeimages[03]=["images/rotation-15-4.jpg", "", ""] 
fadeimages[04]=["images/rotation-15-5.jpg", "", ""] 
fadeimages[05]=["images/rotation-15-6.jpg", "", ""] 
fadeimages[06]=["images/rotation-15-7.jpg", "", ""] 
fadeimages[07]=["images/rotation-15-8.jpg", "", ""] 
fadeimages[08]=["images/rotation-15-9.jpg", "", ""] 
fadeimages[09]=["images/rotation-15-10.jpg", "", ""] 
fadeimages[10]=["images/rotation-15-11.jpg", "", ""] 
fadeimages[11]=["images/rotation-15-12.jpg", "", ""] 
fadeimages[12]=["images/rotation-15-13.jpg", "", ""] 
fadeimages[13]=["images/rotation-15-14.jpg", "", ""] 
fadeimages[14]=["images/rotation-15-15.jpg", "", ""] 
fadeimages[15]=["images/rotation-15-16.jpg", "", ""] 
fadeimages[16]=["images/rotation-15-17.jpg", "", ""] 
fadeimages[17]=["images/rotation-16-1.jpg", "", ""] 
fadeimages[18]=["images/rotation-16-2.jpg", "", ""] 
fadeimages[19]=["images/rotation-16-3.jpg", "", ""] 
fadeimages[20]=["images/rotation-16-4.jpg", "", ""] 
fadeimages[21]=["images/rotation-16-5.jpg", "", ""] 
fadeimages[22]=["images/rotation-16-6.jpg", "", ""] 
fadeimages[23]=["images/rotation-16-7.jpg", "", ""] 
fadeimages[24]=["images/rotation-16-8.jpg", "", ""] 
fadeimages[25]=["images/rotation-16-9.jpg", "", ""] 
fadeimages[26]=["images/rotation-16-10.jpg", "", ""] 
fadeimages[27]=["images/rotation-16-11.jpg", "", ""] 
fadeimages[28]=["images/rotation-16-12.jpg", "", ""] 
fadeimages[29]=["images/rotation-16-13.jpg", "", ""] 
fadeimages[30]=["images/rotation-16-14.jpg", "", ""] 
fadeimages[31]=["images/rotation-16-15.jpg", "", ""] 
fadeimages[32]=["images/rotation-18-1.jpg", "", ""] 
fadeimages[33]=["images/rotation-18-3.jpg", "", ""] 
fadeimages[34]=["images/rotation-18-4.jpg", "", ""] 
fadeimages[35]=["images/rotation-18-5.jpg", "", ""] 
fadeimages[36]=["images/rotation-18-6.jpg", "", ""] 
fadeimages[37]=["images/rotation-18-7.jpg", "", ""] 
fadeimages[38]=["images/rotation-18-8.jpg", "", ""] 
fadeimages[39]=["images/rotation-18-9.jpg", "", ""] 
fadeimages[40]=["images/rotation-18-10.jpg", "", ""] 
fadeimages[41]=["images/rotation-18-11.jpg", "", ""] 
fadeimages[42]=["images/rotation-18-12.jpg", "", ""] 
fadeimages[43]=["images/rotation-18-13.jpg", "", ""] 
fadeimages[44]=["images/rotation-18-14.jpg", "", ""] 
fadeimages[45]=["images/rotation-18-15.jpg", "", ""] 
fadeimages[46]=["images/rotation-18-16.jpg", "", ""] 
fadeimages[47]=["images/rotation-18-17.jpg", "", ""] 
fadeimages[48]=["images/rotation-14-1.jpg", "", ""] 
fadeimages[49]=["images/rotation-14-2.jpg", "http://www.nationalcapitals.ca/roster_14U_player_0.htm", ""] 
fadeimages[50]=["images/rotation-14-3.jpg", "http://www.nationalcapitals.ca/roster_14U_player_2.htm", ""] 
fadeimages[51]=["images/rotation-14-4.jpg", "http://www.nationalcapitals.ca/roster_14U_player_3.htm", ""] 
fadeimages[52]=["images/rotation-14-5.jpg", "http://www.nationalcapitals.ca/roster_14U_player_4.htm", ""] 
fadeimages[53]=["images/rotation-14-6.jpg", "http://www.nationalcapitals.ca/roster_14U_player_5.htm", ""] 
fadeimages[54]=["images/rotation-14-7.jpg", "http://www.nationalcapitals.ca/roster_14U_player_6.htm", ""] 
fadeimages[55]=["images/rotation-14-8.jpg", "http://www.nationalcapitals.ca/roster_14U_player_1.htm", ""] 
fadeimages[56]=["images/rotation-14-9.jpg", "http://www.nationalcapitals.ca/roster_14U_player_7.htm", ""] 
fadeimages[57]=["images/rotation-14-10.jpg", "http://www.nationalcapitals.ca/roster_14U_player_8.htm", ""] 
fadeimages[58]=["images/rotation-14-11.jpg", "http://www.nationalcapitals.ca/roster_14U_player_9.htm", ""] 
fadeimages[59]=["images/rotation-14-12.jpg", "http://www.nationalcapitals.ca/roster_14U_player_10.htm", ""] 
fadeimages[60]=["images/rotation-14-13.jpg", "http://www.nationalcapitals.ca/roster_14U_head_coach.htm", ""] 
fadeimages[61]=["images/rotation-14-14.jpg", "http://www.nationalcapitals.ca/roster_14U_coach_0.htm", ""] 
fadeimages[62]=["images/rotation-14-15.jpg", "http://www.nationalcapitals.ca/roster_14U_coach_1.htm", ""] 
fadeimages[63]=["images/rotation-14-16.jpg", "", ""] 
fadeimages[64]=["images/rotation-17-1.jpg", "", ""] 
fadeimages[65]=["images/rotation-17-2.jpg", "", ""] 
fadeimages[66]=["images/rotation-17-3.jpg", "", ""] 
fadeimages[67]=["images/rotation-17-4.jpg", "", ""] 
fadeimages[68]=["images/rotation-17-5.jpg", "", ""] 
fadeimages[69]=["images/rotation-17-6.jpg", "", ""] 
fadeimages[70]=["images/rotation-17-7.jpg", "", ""] 
fadeimages[71]=["images/rotation-17-8.jpg", "", ""] 
fadeimages[72]=["images/rotation-17-9.jpg", "", ""] 
fadeimages[73]=["images/rotation-17-10.jpg", "", ""] 
fadeimages[74]=["images/rotation-17-11.jpg", "", ""] 
fadeimages[75]=["images/rotation-17-12.jpg", "", ""] 
fadeimages[76]=["images/rotation-17-13.jpg", "", ""] 
fadeimages[77]=["images/rotation-17-14.jpg", "", ""] 
fadeimages[78]=["images/rotation-17-15.jpg", "", ""] 
fadeimages[79]=["images/rotation-17-16.jpg", "", ""] 
                
var fadebgcolor="white"
                
////NO need to edit beyond here/////////////
                
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
                
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
                
function fadeshow(theimages, newsimages, 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) :)
theimages = newsimages.concat(theimages)
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);-moz-opacity:10;-khtml-opacity:10;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);-moz-opacity:10;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(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{
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)
}
}
 
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
}
 
 
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
}
 
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
}
 
 
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()
}
