/***********************************************
* Simple Controls Gallery- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
* http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm
* http://www.dynamicdrive.com/dynamicindex4/simplegallery_suppliment.htm
***********************************************/

var promotionbox=new simpleGallery({
	wrapperid: "promotion", //ID of main gallery container,
	dimensions: [403, 182], //width/height of gallery in pixels. Should reflect dimensions of the images exactly the images are housed in /images/promotion/ , remember to change the  google tracking source so it is specific to the campaign
	imagearray: [
	
["/images/promotion/37.jpg", "http://www.csu.edu.au/study/change-preference.htm?utm_source=change-preference&utm_medium=animated-button&utm_campaign=homepage-promotions", "", {alt:"Learn about change of preference - Find out more", title:"Learn about change of preference - Find out more"}],

["/images/promotion/35.jpg", "http://www.csu.edu.au/study/five-reasons-business/?utm_source=five&utm_medium=animated-button&utm_campaign=homepage-promotions", "", {alt:"5 reasons to do business at CSU - Find out more", title:"5 reasons to do business at CSU - Find out more"}],

["/images/promotion/36.jpg", "http://www.csu.edu.au/student/studylink?utm_source=studylink&utm_medium=animated-button&utm_campaign=homepage-promotions", "", {alt:"Prepare for University study with STUDYLINK - Find out more", title:"Prepare for University study with STUDYLINK - Find out more"}],

["/images/promotion/9.jpg", "http://www.csu.edu.au/study/campus-tours.htm?utm_source=openday&utm_medium=animated-button&utm_campaign=homepage-promotions", "", {alt:"CSU Open Day Every Day - Find out more", title:"CSU Open Day Every Day - Find out more"}]

		



],
	defaultattr: {alt:"",title:""}, //alt and title for images without a specified alt/title. Required.
	autoplay: true,
	persist: false,
	pause: 3000, //pause between slides (milliseconds)
	fadeduration: 700, //transition duration (milliseconds)
	oninit:function(){ //event that fires when gallery has initialized/ ready to run
	},
	onslide:function(curslide, i){ //event that fires after each slide is shown
		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
	}
})

/***********************************************
Change classname of tabs to active/inactive
***********************************************/

function toggle(linkObj)
{
	var node = linkObj; //start
	while (node && node.nodeName.toUpperCase() != 'UL') //node exists, isn't UL
		node = node.parentNode; //go up
	var tabs = node.getElementsByTagName('a'), //got it, get collection
	tab,
	t = 0;
	while (tab = tabs[t++])
		if (tab == linkObj)
			tab.className = 'active';
		else tab.className = 'inactive';
	return false;
}

