// Home page - Slideshow Last updated 22/9/2011

//home page - large banner slide show
var slideimages00=new Array()
slideimages00[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/gap.png", "http://www.swtafe.vic.edu.au/coursefinder/enrol-2012-01.aspx", ""]

slideimages00[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2012/ad-0001.png", "http://www.swtafe.vic.edu.au/coursefinder/enrol-2012-01.aspx", ""]


var slideimages=new Array()


//Home page banner rotations
slideimages[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2012/ad-0007.jpg", "http://www.swtafe.vic.edu.au/coursefinder/infosessions.aspx",""]
slideimages[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2012/ad-0007.jpg", "http://www.swtafe.vic.edu.au/coursefinder/infosessions.aspx",""]



var slideimages02=new Array()
slideimages02[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0001.jpg", "http://www.swtafe.vic.edu.au/campuses/glenormiston/talentcamp.aspx", ""]
slideimages02[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2012/ad-0009.jpg", "http://www.swtafe.vic.edu.au/coursefinder/displaybrochure.aspx?id=107", ""]
slideimages02[2]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0084.jpg", "http://www.swtafe.vic.edu.au/Coursefinder/search.aspx?studyarea=10", ""]
slideimages02[3]=["http://www.swtafe.vic.edu.au/images/Index_images/2012/ad-0008.jpg", "http://www.swtafe.vic.edu.au/aboutus/pdf/engage/engage-feb-2012.pdf",target="_blank"]
slideimages02[4]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0047.jpg", "http://www.swtafe.vic.edu.au/coursefinder/doorstep.aspx", ""]
slideimages02[5]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0085.jpg", "http://www.swtafe.vic.edu.au/Coursefinder/Apprentice_trainee/preapp.aspx", ""]







//Home page banner rotations (TESTING AREA FOR ROTATIONS - HOME PAGE)
var slideimages12=new Array()
slideimages12[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0049.jpg", "", ""]
slideimages12[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0049.jpg", "", ""]

var slideimages11=new Array()
slideimages11[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0037.jpg", "http://www.swtafe.vic.edu.au/coursefinder/displaybrochure.aspx?id=578", ""]
slideimages11[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0038.jpg", "http://www.swtafe.vic.edu.au/Coursefinder/Apprentice_trainee/preapp.aspx", ""]
slideimages11[2]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0044.jpg", "http://www.swtafe.vic.edu.au/coursefinder/displaybrochure.aspx?id=704", ""]
slideimages11[3]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0047.jpg", "http://www.swtafe.vic.edu.au/coursefinder/doorstep.aspx", ""]
slideimages11[4]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0045.jpg", "http://www.swtafe.vic.edu.au/coursefinder/displaybrochure.aspx?id=642", ""]
slideimages11[5]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/ad-0046.jpg", "http://www.swtafe.vic.edu.au/coursefinder/search.aspx?studyarea=22", ""]


//OEA Banner rotations
var slideimages03=new Array()
slideimages03[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/oea-lead-with-confidence.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]
slideimages03[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/oea_grow_business.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]
slideimages03[2]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/oea_meeting.jpg", "http://www.swtafe.vic.edu.au/oea/conference_meeting.aspx", ""]
slideimages03[3]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/oea_navigate.jpg", "http://www.swtafe.vic.edu.au/oea/customised.aspx", ""]
slideimages03[4]=["http://www.swtafe.vic.edu.au/images/Index_images/2011/oea_standout.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]

var slideimages04=new Array()
slideimages04[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0005.jpg", "http://www.swtafe.vic.edu.au/oea/conference_meeting.aspx", ""]
slideimages04[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0006.jpg", "http://www.swtafe.vic.edu.au/oea/accredited_management.aspx", ""]
slideimages04[2]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0007.jpg", "http://www.swtafe.vic.edu.au/oea/news.aspx", ""]
slideimages04[3]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0009.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]
slideimages04[4]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0010.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]


var slideimages05=new Array()
slideimages05[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0006.jpg", "http://www.swtafe.vic.edu.au/oea/accredited_management.aspx", ""]
slideimages05[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0007.jpg", "http://www.swtafe.vic.edu.au/oea/news.aspx", ""]
slideimages05[2]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0009.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]
slideimages05[3]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0005.jpg", "http://www.swtafe.vic.edu.au/oea/conference_meeting.aspx", ""]
slideimages05[4]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0010.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]

var slideimages06=new Array()
slideimages06[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0007.jpg", "http://www.swtafe.vic.edu.au/oea/news.aspx", ""]
slideimages06[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0009.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]
slideimages06[2]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0005.jpg", "http://www.swtafe.vic.edu.au/oea/conference_meeting.aspx", ""]
slideimages06[3]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0006.jpg", "http://www.swtafe.vic.edu.au/oea/accredited_management.aspx", ""]
slideimages06[4]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0010.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]


var slideimages07=new Array()
slideimages07[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0009.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]
slideimages07[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0005.jpg", "http://www.swtafe.vic.edu.au/oea/conference_meeting.aspx", ""]
slideimages07[2]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0006.jpg", "http://www.swtafe.vic.edu.au/oea/accredited_management.aspx", ""]
slideimages07[3]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0007.jpg", "http://www.swtafe.vic.edu.au/oea/news.aspx", ""]
slideimages07[4]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/adv_0010.jpg", "http://www.swtafe.vic.edu.au/oea/short_courses.aspx", ""]

//Portand Home page
var slideimages08=new Array()
slideimages08[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/mis_0002.jpg", "http://www.swtafe.vic.edu.au/Coursefinder/doorstep.aspx", ""]
slideimages08[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/ads_0014.jpg", "http://www.swtafe.vic.edu.au/Campuses/Portland/maritime-calendar-2011.htm", target="_blank"]


//Library Banner rotations
var slideimages09=new Array()
slideimages09[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/ads_0015.jpg", "http://www.swtafe.vic.edu.au/Library/bookshop.aspx", ""]
slideimages09[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/ads_0016.jpg", "http://www.swtafe.vic.edu.au/Library/Copyright/index.aspx", ""]

var slideimages10=new Array()
slideimages10[0]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/ads_0017.jpg", "http://www.swtafe.vic.edu.au/Library/contacts.aspx", ""]
slideimages10[1]=["http://www.swtafe.vic.edu.au/images/Index_images/2010/ads_0017.jpg", "http://www.swtafe.vic.edu.au/Library/contacts.aspx", ""]


var transbgcolor="white"


var transarray=new Array() 
var transclear=new Array() 
 
var dom=(document.getElementById) //newer dom browsers
var iebrowser=document.all
 
function transshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //outset opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
transarray[transarray.length]=this
this.slideshowid=transarray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) 
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() 
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 newer 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:'+transbgcolor+'"></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:'+transbgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or newer browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("transarray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function transpic(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(transclear[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("transarray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
transshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") 
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]!="") 
slideHTML+='</a>'
picobj.innerHTML=slideHTML
} 
 
transshow.prototype.rotateimage=function(){
if (this.pausecheck==1)
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++
transclear[this.slideshowid]=setInterval("transpic(transarray["+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
}
 
transshow.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
} 
 
transshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ 
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()
}
