// JavaScript Document
var mygallery=new fadeSlideShow({
	wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
	dimensions: [950, 223], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["images/viaLanguageHeader3.jpg", "", "", ""],
		["images/viaLanguageHeader2.jpg", "http://www.vialanguage.com/Healthcare/healthcare_segment.php", "_self", ""],
		["images/viaLanguageHeader1.jpg"],
		["images/viaLanguageHeader4.jpg", "http://www.vialanguage.com/Marketing/marketing_segment.php", "_self", ""],
		["images/viaLanguageHeader5.jpg", "http://www.vialanguage.com/Global_eLearning/elearning_segment.php","_self"] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'auto', pause:8000, cycles:0, wraparound:true},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "ondemand",
	togglerid: "fadeshow2toggler",
	oninit: function(){
			var dm = this.setting.displaymode, ufObj = this, defaultMode = dm.type;
			this.nav = function(num){
				this.navigate(num);
				if(typeof dm.timer !== 'undefined'){
					clearTimeout(dm.timer);
					}
				dm.timer = setTimeout(function(){
					if(defaultMode === 'auto' && dm.type !== 'auto'){
						dm.type = 'auto';
						ufObj.showslide('next');
						}
					}, dm.pause);
			};
			this.stop = function(){
				this.navigate(this.setting.imgindex);
				defaultMode = 'manual';
			};
			this.resume = function(){
				if(dm.type!=='auto'){
					dm.type='auto';
					this.showslide('next');
				}
				defaultMode = 'auto';
			};
		}
});
