/***********************************************
* 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
	imagearray: [

["img/Ont-B-earl-childhood.jpg", "http://www.csu.edu.au/faculty/educat/ontario/early-childhood.htm", {alt:"Bachelor of Early Childhood Studies - Find out more",title:"Bachelor of Early Childhood Studies - Find out more"}],

["img/Ont-B-primary-ed.jpg", "http://www.csu.edu.au/faculty/educat/ontario/primary-education.htm", {alt:"Bachelor of Primary Education Studies - Find out more",title:"Bachelor of Primary Education Studies - Find out more"}],

["img/Ont-M-Internat-Edu.jpg", "http://www.csu.edu.au/faculty/educat/ontario/international-education.htm", {alt:"Master of International Education - Find out more",title:"Master of International Education - Find out more"}],

["img/Ont-MBA.jpg", "mba.htm", {alt:"Invest in Your Future - Find out more",title:"Invest in Your Future - Find out more"}],

["img/Ont-study-from-home.jpg", "http://www.csu.edu.au/study/distance-education", {alt:"Study from home with distance education - Find out more",title:"Study from home with distance education - Find out more"}],

["img/Ont-study-in-Aus.jpg", "http://www.csu.edu.au/study/oncampus", {alt:"Study on Campus in Australia - Find out more",title:"Study on Campus in Australia - Find out more"}],

["img/22.jpg", "http://www.csu.edu.au/services/green/", "", {alt:"CSU green - Find out more", title:"CSU green - Find out more"}]
		
	],
	defaultattr: {alt:"",title:""},
	autoplay: true,
	persist: false,
	pause: 2500, //pause between slides (milliseconds)
	fadeduration: 500, //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;
}
