
      
/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © 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()
//SET IMAGE PATHS. Extend or contract array as needed
//fadeimages[1]=["seals/ad_best_value_seal.gif", "BestValue.html", "_top"] //image with link syntax
fadeimages[0]=["images/banner/0.jpg", "", "","Art student painting with palette knife"] 
fadeimages[1]=["images/banner/1.jpg", "", "","Baseball player makes off-balance throw"]
fadeimages[2]=["images/banner/2.jpg", "", "","Student reads under skylight in the Demergasso-Bava Hall lounge"]
fadeimages[3]=["images/banner/3.jpg", "", "","Vasche Library building on a cloudy day"]
fadeimages[4]=["images/banner/4.jpg", "", "","Naraghi Hall Observatory on a cloudy day"]
fadeimages[5]=["images/banner/5.jpg", "", "","Students studying in Vasche Library"]
fadeimages[6]=["images/banner/6.jpg", "", "","Faculty Development Center reflecting in Warrior Lake"]
fadeimages[7]=["images/banner/7.jpg", "", "","Student walking by red berry trees near the Vasche Library"]
fadeimages[8]=["images/banner/8.jpg", "", "","Student takes notes during government class"]
fadeimages[9]=["images/banner/9.jpg", "", "","Students walking to class"]
fadeimages[10]=["images/banner/10.jpg", "", "","University sign at the corner of Monte Vista and Geer"]
fadeimages[11]=["images/banner/11.jpg", "", "","Student walking on autumn leaves"]
fadeimages[12]=["images/banner/12.jpg", "", "","Rainbow over Naraghi Hall"]
fadeimages[13]=["images/banner/13.jpg", "", "","Pitcher winds up on the mound"]
fadeimages[14]=["images/banner/14.jpg", "", "","Willow Lake and Bio Ag Center on a cloudy day"]
fadeimages[15]=["images/banner/15.jpg", "", "","Students outside of Demergasso-Bava Hall between classes"]
fadeimages[16]=["images/banner/16.jpg", "", "","Student strolling across campus"]
fadeimages[17]=["images/banner/17.jpg", "", "","Faculty Development  Center under the stars"]
fadeimages[18]=["images/banner/18.jpg", "", "","Students outside the Vasche Library"]
fadeimages[19]=["images/banner/19.jpg", "", "","Student stroll by structure in front of Vasche Library"]
fadeimages[20]=["images/banner/20.jpg", "", "","Student takes a break from the textbook"]
fadeimages[21]=["images/banner/21.jpg", "", "","Rainbow over Main Dining Hall"]
fadeimages[22]=["images/banner/22.jpg", "", "","Runner crossing Warrior Bridge"]
fadeimages[23]=["images/banner/23.jpg", "", "","Spring blossoms in full bloom near Main Dining Hall"]
fadeimages[24]=["images/banner/24.jpg", "", "","Students having a good laugh"]
fadeimages[25]=["images/banner/25.jpg", "", "","President Shirvani shakes graduate's hand at commencement"]
fadeimages[26]=["images/banner/26.jpg", "", "","Cal State Stanislaus softball team captures West Region crown!"]
fadeimages[27]=["images/banner/27.jpg", "", "","Beautiful game of soccer"]
fadeimages[28]=["images/banner/28.jpg", "", "","Flowers on campus"]
fadeimages[29]=["images/banner/29.jpg", "", "","Students studying near Sequoia Lake"]
fadeimages[30]=["images/banner/30.jpg", "", "","Graduates wait to walk-the-walk to their commencement ceremony"]
fadeimages[31]=["images/banner/31.jpg", "", "","Students canoe on Willow Lake"]
fadeimages[32]=["images/banner/32.jpg", "", "","Demergasso-Bava Hall at night"]
fadeimages[33]=["images/banner/33.jpg", "", "","Students strolling across campus"]
fadeimages[34]=["images/banner/34.jpg", "", "","New University Bookstore under a rainbow"]
fadeimages[35]=["images/banner/35.jpg", "", "","Graduates playing a quick game of cards at the stairs of Bizzini Hall while waiting for commencement"]
fadeimages[36]=["images/banner/36.jpg", "", "","Students strolling across campus"]
fadeimages[37]=["images/banner/37.jpg", "", "","Tennis player doing what she does best"]
fadeimages[38]=["images/banner/38.jpg", "", "","Student works on his laptop near Sequoia Lake"]
fadeimages[39]=["images/banner/39.jpg", "", "","Students hurrying past the University Bookstore"]
fadeimages[40]=["images/banner/40.jpg", "", "","Old Science Observatory under a rainbow"]
fadeimages[41]=["images/banner/41.jpg", "", "","Physical education class in session"]
fadeimages[42]=["images/banner/42.jpg", "", "","Art students work on their paintings outdoors"]
fadeimages[43]=["images/banner/43.jpg", "", "","Looking up at the MSR Building at night"]
fadeimages[44]=["images/banner/44.jpg", "", "","Warriors Basketball game in the Warrior Arena"]
fadeimages[45]=["images/banner/45.jpg", "", "","Students on campus on a beautiful autumn day"]
fadeimages[46]=["images/banner/46.jpg", "", "","Outdoor class in session with Naraghi Hall of Science in the background"]
fadeimages[47]=["images/banner/47.jpg", "", "","Students on a field trip"]
fadeimages[48]=["images/banner/48.jpg", "", "","Students strolling across campus"]
fadeimages[49]=["images/banner/49.jpg", "", "","Dr. Marjorie Sanchez-Walker in the classroom"]
fadeimages[50]=["images/banner/50.jpg", "", "","Demergasso-Bava Hall courtyard in the spring"]
fadeimages[51]=["images/banner/51.jpg", "", "","Students strolling past the Main Dining Hall"]
fadeimages[52]=["images/banner/52.jpg", "", "","Students on a field trip"]
fadeimages[53]=["images/banner/53.jpg", "", "","Students on a field trip"]
fadeimages[54]=["images/banner/54.jpg", "", "","Bio Ag garden with Naraghi Hall of Science in the background"]
fadeimages[55]=["images/banner/55.jpg", "", "","Students on a field trip"]
fadeimages[56]=["images/banner/56.jpg", "", "","The New Student Recreation Complex shines on a beautiful cloudy night"]
fadeimages[57]=["images/banner/57.jpg", "", "","Soccer practice in session at the new SRC Stadium"]
fadeimages[58]=["images/banner/58.jpg", "", "","CSU Stanislaus golfer"]
fadeimages[59]=["images/banner/59.jpg", "", "","Outdoor class in session behind the Bizzini Hall classroom building"]
fadeimages[60]=["images/banner/60.jpg", "", "","Reflection of student walking past water feature near Demergasso-Bava Hall"]
fadeimages[61]=["images/banner/61.jpg", "", "","Summer 2010 Shakespeare play, A Midsummer’s Night Dream"]
fadeimages[62]=["images/banner/62.jpg", "", "","Students on a field trip"]
fadeimages[63]=["images/banner/63.jpg", "", "","Student admires painting in the University Art Gallery"]
fadeimages[64]=["images/banner/64.jpg", "", "","Women's Soccer match in session at the SRC Stadium"]

 
var bannerads=new Array()
bannerads[0]=["images/ads/shc101mag.gif", "http://readsh101.com/csustan.html", "_blank","Student Health 101 Magazine. Read it Online Today!"]
bannerads[1]=["images/ads/tcp.jpg", "http://www.csustan.edu/TCP/", "_top","Trans-California Pathway Project. Learn more >"]
//bannerads[1]=["images/ads/sustainablefutures.gif", "http://www.csustan.edu/events/sustainablefutures/", "_top","The Annual Conference for Sustainable Futures. October 13-16, 2011"]
//bannerads[2]=["images/ads/winter2012.jpg", "http://www.csustan.edu/winter/", "_top","Winter Intersession 2012"]
 
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, 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(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)
}
}
 
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+'" '+(this.theimages[picindex][3]? 'title="'+this.theimages[picindex][3]+'" ' : '')+'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+"])",100)
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
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
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()
}


