/***********************************************
* 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: "image-gallery", //ID of main gallery container,
	dimensions: [420, 260], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
	imagearray: [
		["images/ticker/image-01.jpg", "", {alt:"",title:""}],
		["images/ticker/image-02.jpg", "", {alt:"",title:""}],
		["images/ticker/image-03.jpg", "", {alt:"",title:""}],
		["images/ticker/image-04.jpg", "", {alt:"",title:""}],
		["images/ticker/image-05.jpg", "", {alt:"",title:""}],
		["images/ticker/image-06.jpg", "", {alt:"",title:""}]
	],
	defaultattr: {alt:"",title:""},
	autoplay: true,
	persist: false,
	pause: 6000, //pause between slides (milliseconds)
	fadeduration: 1000, //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;
}