/***********************************************
* 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: [375, 300], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
	imagearray: [
		["/special/global/images/gallery/images/1.jpg", "/special/global/short-term-programs/science/", ""],
		["/special/global/images/gallery/images/2.jpg", "/special/global/student-exchange/outgoing/", ""],
		["/special/global/images/gallery/images/3.jpg", "/special/global/student-exchange/outgoing/", ""],
		["/special/global/images/gallery/images/4.jpg", "/special/global/short-term-programs/education/", ""],
		["/special/global/images/gallery/images/5.jpg", "/special/global/student-exchange/incoming/", ""],
		["/special/global/images/gallery/images/6.jpg", "/special/global/student-exchange/outgoing/", ""],
		["/special/global/images/gallery/images/7.jpg", "/special/global/student-exchange/outgoing/", ""],
		["/special/global/images/gallery/images/8.jpg", "/special/global/short-term-programs/external/", ""]

	],
	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;
}

