/***********************************************
* 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 slideshowimages=new Array()
var commencehimages=new Array()
var commencevimages=new Array()
var globalinit=new Array()
var internatstud=new Array()
var wesleyphotobook=new Array()
var intcampus=new Array()
var gislide=new Array()
var whywesley = new Array()

//SET IMAGE PATHS. Extend or contract array as needed
gislide[0]=["/images/international/study_abroad/christie.jpg", "#", ""]
gislide[1]=["/images/international/study_abroad/justin.jpg", "#", ""]
gislide[2]=["/images/international/study_abroad/warrington.jpg", "#", ""]

//SET IMAGE PATHS. Extend or contract array as needed
internatstud[0]=["/images/international/Arnold_Ormondi.jpg", "index.cfm?fuseaction=admissions.intstudprofile&iid=113", ""]
internatstud[1]=["/images/international/isabel_quiroz.png", "#", ""]
internatstud[2]=["/images/international/adrian_parkes.png", "#", ""]
internatstud[3]=["/images/international/FumiKoyoshi.jpg", "index.cfm?fuseaction=admissions.intstudprofile&iid=102", ""]

//SET IMAGE PATHS. Extend or contract array as needed
intcampus[0]=["/images/international/campuses/antilles_guiana_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=243", ""]
intcampus[1]=["/images/international/campuses/argentina_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=60", ""]
intcampus[2]=["/images/international/campuses/australia_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=61", ""]
intcampus[3]=["/images/international/campuses/austria_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=62", ""]
intcampus[4]=["/images/international/campuses/brazil_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=64", ""]
intcampus[5]=["/images/international/campuses/bulgaria_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=98", ""]
intcampus[6]=["/images/international/campuses/canada_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=65", ""]
intcampus[7]=["/images/international/campuses/chile_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=67", ""]
intcampus[8]=["/images/international/campuses/china_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=66", ""]
intcampus[9]=["/images/international/campuses/costa_rica_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=69", ""]
intcampus[10]=["/images/international/campuses/czech_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=108", ""]
intcampus[11]=["/images/international/campuses/denmark_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=104", ""]
intcampus[12]=["/images/international/campuses/estonia_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=73", ""]
intcampus[13]=["/images/international/campuses/fiji_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=76", ""]
intcampus[14]=["/images/international/campuses/finland_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=75", ""]
intcampus[15]=["/images/international/campuses/france_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=77", ""]
intcampus[16]=["/images/international/campuses/germany_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=79", ""]
intcampus[17]=["/images/international/campuses/ghana_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=78", ""]
intcampus[18]=["/images/international/campuses/hungary_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=82", ""]
intcampus[19]=["/images/international/campuses/iceland_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=89", ""]
intcampus[20]=["/images/international/campuses/india_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=249", ""]
intcampus[21]=["/images/international/campuses/italy_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=85", ""]
intcampus[22]=["/images/international/campuses/japan_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=86", ""]
intcampus[23]=["/images/international/campuses/latvia_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=99", ""]
intcampus[24]=["/images/international/campuses/malta_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=192", ""]
intcampus[25]=["/images/international/campuses/mexico_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=195", ""]
intcampus[26]=["/images/international/campuses/netherlands_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=227", ""]
intcampus[27]=["/images/international/campuses/new_zealand_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=201", ""]
intcampus[28]=["/images/international/campuses/nicaragua_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=202", ""]
intcampus[29]=["/images/international/campuses/norway_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=203", ""]
intcampus[30]=["/images/international/campuses/poland_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=207", ""]
intcampus[31]=["/images/international/campuses/reunion_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=245", ""]
intcampus[32]=["/images/international/campuses/south_africa_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=217", ""]
intcampus[33]=["/images/international/campuses/spain_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=218", ""]
intcampus[34]=["/images/international/campuses/sweden_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=220", ""]
intcampus[35]=["/images/international/campuses/swiss_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=221", ""]
intcampus[36]=["/images/international/campuses/thailand_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=226", ""]
intcampus[37]=["/images/international/campuses/uk_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=235", ""]
intcampus[38]=["/images/international/campuses/uruguay_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=237", ""]
intcampus[39]=["/images/international/campuses/korea_map.jpg", "http://www.isep.org/students/Directory/member_site.asp?CSID=88", ""]

//SET IMAGE PATHS. Extend or contract array as needed
wesleyphotobook[0]=["/images/photobook/wesley_center.jpg", "#", ""]
wesleyphotobook[1]=["/images/photobook/020_flag.jpg", "#", ""]
wesleyphotobook[2]=["/images/photobook/082_flower.jpg", "#", ""]
wesleyphotobook[3]=["/images/photobook/budd_hall.jpg", "#", ""]
wesleyphotobook[4]=["/images/photobook/leigh_ann_051.jpg", "#", ""]
wesleyphotobook[5]=["/images/photobook/014_bldg.jpg", "#", ""]
wesleyphotobook[6]=["/images/photobook/grad_082.jpg", "#", ""]
wesleyphotobook[7]=["/images/photobook/HIT1.jpg", "#", ""]
wesleyphotobook[8]=["/images/photobook/CCS1.jpg", "#", ""]
wesleyphotobook[9]=["/images/photobook/leigh_ann_038.jpg", "#", ""]
wesleyphotobook[10]=["/images/photobook/033_sign.jpg", "#", ""]
wesleyphotobook[11]=["/images/photobook/leigh_ann_007.jpg", "#", ""]
wesleyphotobook[12]=["/images/photobook/alumhouse.jpg", "#", ""]
wesleyphotobook[13]=["/images/photobook/leigh_ann_051.jpg", "#", ""]
wesleyphotobook[14]=["/images/photobook/grad_sign.jpg", "#", ""]
wesleyphotobook[15]=["/images/photobook/grad_081.jpg", "#", ""]
wesleyphotobook[16]=["/images/photobook/leigh_ann_036.jpg", "#", ""]
//wesleyphotobook[17]=["/images/photobook/wesley.jpg", "#", ""]

//SET IMAGE PATHS. Extend or contract array as needed
globalinit[0]=["/images/international/Bangor.jpg", "#", ""]
globalinit[1]=["/images/international/Belfast.jpg", "#", ""]
globalinit[2]=["/images/international/italy.jpg", "#", ""]
globalinit[3]=["/images/international/italy_2.jpg", "#", ""]
globalinit[4]=["/images/international/queens.jpg", "#", ""]
globalinit[5]=["/images/international/somewhere.jpg", "#", ""]
globalinit[6]=["/images/international/Stranmillis.jpg", "#", ""]

commencevimages[0]=["/images/commencement/_MG_5960.jpg", "#", ""]
commencevimages[1]=["/images/commencement/_MG_5985.jpg", "#", ""]
commencevimages[2]=["/images/commencement/_MG_6033.jpg", "#", ""]
commencevimages[3]=["/images/commencement/_MG_6168.jpg", "#", ""]
commencevimages[4]=["/images/commencement/_MG_6230.jpg", "#", ""]
commencevimages[5]=["/images/commencement/_MG_6258.jpg", "#", ""]
commencevimages[6]=["/images/commencement/IMG_0827.jpg", "#", ""]
commencevimages[7]=["/images/commencement/IMG_5926.jpg", "#", ""]

commencehimages[0]=["/images/commencement/_MG_6087.jpg", "#", ""]
commencehimages[1]=["/images/commencement/_MG_6164.jpg", "#", ""]
commencehimages[2]=["/images/commencement/_MG_6412.jpg", "#", ""]
commencehimages[3]=["/images/commencement/_MG_6473.jpg", "#", ""]
commencehimages[4]=["/images/commencement/IMG_0646.jpg", "#", ""]
commencehimages[5]=["/images/commencement/IMG_0730.jpg", "#", ""]
commencehimages[6]=["/images/commencement/IMG_0884.jpg", "#", ""]
commencehimages[7]=["/images/commencement/IMG_0949.jpg", "#", ""]
commencehimages[8]=["/images/commencement/IMG_0950.jpg", "#", ""]
commencehimages[9]=["/images/commencement/IMG_0955.jpg", "#", ""]
commencehimages[10]=["/images/commencement/IMG_5945.jpg", "#", ""]

//Main homepage image rotation array
slideshowimages[0]=["/images/slides/collegecenter.jpg", "#", ""]
slideshowimages[1]=["/images/slides/football.jpg", "#", ""]
slideshowimages[2]=["/images/slides/sciencelab.jpg", "#", ""]
slideshowimages[3]=["/images/slides/cheer.jpg", "#", ""]
slideshowimages[4]=["/images/slides/schwartzcenter.jpg", "#", ""]
slideshowimages[5]=["/images/slides/anchor.jpg", "#", ""]
slideshowimages[6]=["/images/slides/msoccer.jpg", "#", ""]
slideshowimages[7]=["/images/slides/femalestudent.jpg", "#", ""]
slideshowimages[8]=["/images/slides/wesleysign.jpg", "#", ""]
slideshowimages[9]=["/images/slides/footballfans.jpg", "#", ""]
slideshowimages[10]=["/images/slides/physicaled.jpg", "#", ""]
slideshowimages[11]=["/images/slides/crosscountry.jpg", "#", ""]
slideshowimages[12]=["/images/slides/malestudent.jpg", "#", ""]
slideshowimages[13]=["/images/slides/historyclass.jpg", "#", ""]
slideshowimages[14]=["/images/slides/basketball.jpg", "#", ""]
slideshowimages[15]=["/images/slides/nursing.jpg", "#", ""]
slideshowimages[16]=["/images/slides/wsoccer.jpg", "#", ""]
slideshowimages[17]=["/images/slides/greenhouse.jpg", "#", ""]
slideshowimages[18]=["/images/slides/childreading.jpg", "#", ""]
slideshowimages[19]=["/images/slides/grads.jpg", "#", ""]
//slideshowimages[14]=["/images/slides/<new>", "#", ""]


fadeimages[0]=["/images/iammovieimages/iam_StefanieMichael.jpg", "index.cfm?fuseaction=home.iamprofile&iid=101", ""]
fadeimages[1]=["/images/iammovieimages/iam_AmberlynOldham.jpg", "index.cfm?fuseaction=home.iamprofile&iid=102", ""]
fadeimages[2]=["/images/iammovieimages/iam_JarrhinThomas.jpg", "index.cfm?fuseaction=home.iamprofile&iid=104", ""]
fadeimages[3]=["/images/iammovieimages/iam_JohnClarke.jpg", "index.cfm?fuseaction=home.iamprofile&iid=105", ""]
fadeimages[4]=["/images/iammovieimages/iam_DaneenTucker.jpg", "index.cfm?fuseaction=home.iamprofile&iid=106", ""]
fadeimages[5]=["/images/iammovieimages/iam_BrandonHoskins.jpg", "index.cfm?fuseaction=home.iamprofile&iid=107", ""]
fadeimages[6]=["/images/iammovieimages/iam_MatthewRobertson.jpg", "index.cfm?fuseaction=home.iamprofile&iid=108", ""]
fadeimages[7]=["/images/iammovieimages/iam_NoelleJacob.jpg", "index.cfm?fuseaction=home.iamprofile&iid=109", ""]
fadeimages[8]=["/images/iammovieimages/iam_ShannonReed.jpg", "index.cfm?fuseaction=home.iamprofile&iid=110", ""]
//fadeimages[10]=["/images/iammovieimages/iam_comingsoon.jpg", "index.cfm?fuseaction=home.iamprofile&iid=111", ""]

whywesley[0]=["/images/whywesley/amphitheater.jpg", "http://www.elocallink.tv/vp2/vp3_show.php?cid=6275", ""]
whywesley[1]=["/images/whywesley/bench.jpg", "http://www.elocallink.tv/vp2/vp3_show.php?cid=6275", ""]
whywesley[2]=["/images/whywesley/cafe.jpg", "http://www.elocallink.tv/vp2/vp3_show.php?cid=6275", ""]
whywesley[3]=["/images/whywesley/greenhouse.jpg", "http://www.elocallink.tv/vp2/vp3_show.php?cid=6275", ""]
whywesley[4]=["/images/whywesley/porch.jpg", "http://www.elocallink.tv/vp2/vp3_show.php?cid=6275", ""]
whywesley[5]=["/images/whywesley/school.jpg", "http://www.elocallink.tv/vp2/vp3_show.php?cid=6275", ""]
whywesley[6]=["/images/whywesley/stairs.jpg", "http://www.elocallink.tv/vp2/vp3_show.php?cid=6275", ""]

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);-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=obj.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()
}
