// JavaScript Document

/***********************************************
* 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 rotImages=new Array()
rotImages[0]=["fileadmin/img/BANNER1_web.jpg", "", ""]
rotImages[1]=["fileadmin/img/BANNER2_web.jpg", "", ""]
rotImages[2]=["fileadmin/img/BANNER3_web.jpg", "", ""]
rotImages[3]=["fileadmin/img/BANNER4_web.jpg", "", ""]
rotImages[4]=["fileadmin/img/BANNER5_web.jpg", "", ""]


var rotImages_nsw=new Array()
rotImages_nsw[0]=["fileadmin/nsw_site/img/rotate_1.jpg", "", ""]
rotImages_nsw[1]=["fileadmin/nsw_site/img/rotate_2.jpg", "", ""]
rotImages_nsw[2]=["fileadmin/nsw_site/img/rotate_3.jpg", "", ""]
rotImages_nsw[3]=["fileadmin/nsw_site/img/rotate_4.jpg", "", ""]
rotImages_nsw[4]=["fileadmin/nsw_site/img/rotate_5.jpg", "", ""]
rotImages_nsw[5]=["fileadmin/nsw_site/img/rotate_6.jpg", "", ""]


var rotImages_2008conf=new Array()
rotImages_2008conf[0]=["fileadmin/conf_2008/img/BANNER1_WEB.jpg", "", ""]
rotImages_2008conf[1]=["fileadmin/conf_2008/img/BANNER2_WEB.jpg", "", ""]



var rotImages_2009conf=new Array()
rotImages_2009conf[0]=["fileadmin/conf_2009/img/BANNER1_WEB.jpg", "", ""]
rotImages_2009conf[1]=["fileadmin/conf_2009/img/BANNER2_WEB.jpg", "", ""]


var icseiImages=new Array()
icseiImages[0]=["fileadmin/ICSEI/img/rotate_1.jpg", "", ""]
icseiImages[1]=["fileadmin/ICSEI/img/rotate_2.jpg", "", ""]
icseiImages[2]=["fileadmin/ICSEI/img/rotate_3.jpg", "", ""]
icseiImages[3]=["fileadmin/ICSEI/img/rotate_4.jpg", "", ""]
icseiImages[4]=["fileadmin/ICSEI/img/rotate_5.jpg", "", ""]
icseiImages[5]=["fileadmin/ICSEI/img/rotate_6.jpg", "", ""]
icseiImages[6]=["fileadmin/ICSEI/img/rotate_7.jpg", "", ""]
icseiImages[7]=["fileadmin/ICSEI/img/rotate_8.jpg", "", ""]


var icseiImages2010=new Array()
icseiImages2010[0]=["fileadmin/ICSEI/icsei_2010/header_1.jpg", "", ""]
icseiImages2010[1]=["fileadmin/ICSEI/icsei_2010/header_2.jpg", "", ""]
icseiImages2010[2]=["fileadmin/ICSEI/icsei_2010/header_3.jpg", "", ""]
icseiImages2010[3]=["fileadmin/ICSEI/icsei_2010/header_4.jpg", "", ""]
icseiImages2010[4]=["fileadmin/ICSEI/icsei_2010/header_5.jpg", "", ""]
icseiImages2010[5]=["fileadmin/ICSEI/icsei_2010/header_6.jpg", "", ""]
icseiImages2010[6]=["fileadmin/ICSEI/icsei_2010/header_7.jpg", "", ""]
icseiImages2010[7]=["fileadmin/ICSEI/icsei_2010/header_8.jpg", "", ""]
icseiImages2010[8]=["fileadmin/ICSEI/icsei_2010/header_9.jpg", "", ""]
icseiImages2010[9]=["fileadmin/ICSEI/icsei_2010/header_10.jpg", "", ""]
icseiImages2010[10]=["fileadmin/ICSEI/icsei_2010/header_11.jpg", "", ""]
icseiImages2010[11]=["fileadmin/ICSEI/icsei_2010/header_12.jpg", "", ""]


var acelImages2009=new Array()
acelImages2009[0]=["fileadmin/acel_2009/img/rotate_1.jpg", "", ""]
acelImages2009[1]=["fileadmin/acel_2009/img/rotate_2.jpg", "", ""]
acelImages2009[2]=["fileadmin/acel_2009/img/rotate_3.jpg", "", ""]
acelImages2009[3]=["fileadmin/acel_2009/img/rotate_4.jpg", "", ""]
acelImages2009[4]=["fileadmin/acel_2009/img/rotate_5.jpg", "", ""]
acelImages2009[5]=["fileadmin/acel_2009/img/rotate_6.jpg", "", ""]
acelImages2009[6]=["fileadmin/acel_2009/img/rotate_7.jpg", "", ""]


var acelConf2010=new Array()
acelConf2010[0]=["fileadmin/conf2010/img/rotate1.jpg", "", ""]
acelConf2010[1]=["fileadmin/conf2010/img/rotate2.jpg", "", ""]


var fadebgcolor="white"
 
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()
}







/***********************************************
* Universal Countdown script- © 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.
***********************************************/
/*http://www.dynamicdrive.com/dynamicindex6/universalcountdown.htm*/

function cdLocalTime(container, servermode, offsetMinutes, targetdate, debugmode){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
var servertimestring=(servermode=="server-php")? '<? print date("F d, Y H:i:s", time())?>' : (servermode=="server-ssi")? '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' : '<%= Now() %>'
this.localtime=this.serverdate=new Date(servertimestring)
this.targetdate=new Date(targetdate)
this.debugmode=(typeof debugmode!="undefined")? 1 : 0
this.timesup=false
this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000) //add user offset to server time
this.updateTime()
}

cdLocalTime.prototype.updateTime=function(){
var thisobj=this
this.localtime.setSeconds(this.localtime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdLocalTime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdLocalTime.prototype.showresults=function(){
var thisobj=this
var debugstring=(this.debugmode)? "<p style=\"background-color: #FCD6D6; color: black; padding: 5px\"><big>Debug Mode on!</big><br /><b>Current Local time:</b> "+this.localtime.toLocaleString()+"<br />Verify this is the correct current local time, in other words, time zone of count down date.<br /><br /><b>Target Time:</b> "+this.targetdate.toLocaleString()+"<br />Verify this is the date/time you wish to count down to (should be a future date).</p>" : ""

var timediff=(this.targetdate-this.localtime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=debugstring+this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=debugstring+this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}

/////CUSTOM FORMAT OUTPUT FUNCTIONS BELOW//////////////////////////////

//Create your own custom format function to pass into cdLocalTime.displaycountdown()
//Use arguments[0] to access "Days" left
//Use arguments[1] to access "Hours" left
//Use arguments[2] to access "Minutes" left
//Use arguments[3] to access "Seconds" left

//The values of these arguments may change depending on the "baseunit" parameter of cdLocalTime.displaycountdown()
//For example, if "baseunit" is set to "hours", arguments[0] becomes meaningless and contains "n/a"
//For example, if "baseunit" is set to "minutes", arguments[0] and arguments[1] become meaningless etc

//1) Display countdown using plain text
function formatresults(){
if (this.timesup==false){//if target date/time not yet met
var displaystring="<span style='background-color: #CFEAFE'>"+arguments[1]+" hours "+arguments[2]+" minutes "+arguments[3]+" seconds</span> until conference starts"
}
else{ //else if target date/time met
var displaystring="The conference has started!"
}
return displaystring
}

//2) Display countdown with a stylish LCD look, and display an alert on target date/time
function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>days</sup> "+arguments[1]+" <sup>hours</sup> "+arguments[2]+" <sup>minutes</sup> "+arguments[3]+" <sup>seconds</sup></span>"
}
else{ //else if target date/time met
var displaystring="The conference has started, refresh this page to participate." //Don't display any text
//alert("Launch time!") //Instead, perform a custom alert
}
return displaystring
}