// JavaScript Hero Slideshow

var num=0;
var t;
var timer_is_on=0;

function timedCount() {
	nextArrow();
	t=setTimeout("timedCount()",4000);
}

function cycleSlideshow() {
	
	if (!timer_is_on) {
		timer_is_on=1;
		timedCount();
  	}

}

function stopCount() {
	clearTimeout(t);
	timer_is_on=0;
}


imgArray = [
	[
		'<a href="#evacuation_chairs" onMouseOver="showProductProfile(\'sports-evacuation-chair\')" id="caption" style="margin:60px 0px 0px 270px;"><span>Sports Chair</span>Safely transporting an injured athlete using this chair reducing the risk of aggravating an injury.</a><a href="#evacuation_chairs" onMouseOver="showProductProfile(\'sports-evacuation-chair\')"><img src="evacuation-chairs/images/product-1430-sports-chair-hero.png" title="Sports Chair - Model 1430" alt="Sports Chair - Model 1430" id="pic" style="margin:100px 0px 0px 30px;"></a>'
	],
	[
		'<a href="#evacuation_chairs" onMouseOver="showProductProfile(\'glider-evacuation-chair\')" id="caption" style="margin:90px 0px 0px 290px;"><span>The Glider</span>The Glider is designed to evacuate a mobility impaired or injured person down stairs with only one assistant.</a><a href="#evacuation_chairs" onMouseOver="showProductProfile(\'glider-evacuation-chair\')"><img src="evacuation-chairs/images/product-1300-glider-hero.png" title="The Glider - Model 1300" alt="The Glider - Model 1300" id="pic" style="margin:0px 0px 0px 0px;"></a>'
	],
	[
		'<a href="#evacuation_chairs" onMouseOver="showProductProfile(\'emergency-evacuation-chair\')" id="caption" style="margin:60px 0px 0px 290px;"><span>Emergency Chair</span>The Emergency Evacuation Chair has been our #1 selling evacuation chair for over 23 years.</a><a href="#evacuation_chairs" onMouseOver="showProductProfile(\'emergency-evacuation-chair\')"><img src="evacuation-chairs/images/product-1400-emergency-chair-hero.png" title="Emergency Chair - Model 1400" alt="Emergency Chair - Model 1400" id="pic" style="margin:80px 0px 0px 40px;"></a>'
	],
	[
		'<a href="#evacuation_chairs" onMouseOver="showProductProfile(\'first-response-evacuation-chair\')" id="caption" style="margin:60px 0px 0px 270px;"><span>First Response Chair</span>Rescue injured persons quickly with the First Response Chair. Immobilize an injury with the leg sling/rest and additional restraints.</a><a href="#evacuation_chairs" onMouseOver="showProductProfile(\'first-response-evacuation-chair\')"><img src="evacuation-chairs/images/product-1440-first-response-chair-hero.png" title="First Response Chair - Model 1440" alt="First Response Chair - Model 1440" id="pic" style="margin:60px 0px 0px 40px;"></a>'
	],
	[
		'<a href="#evacuation_chairs" onMouseOver="showProductProfile(\'babyscatt-evacuation-device\')" id="caption" style="margin:40px 0px 0px 340px;"><span>BabyScatt</span>An evacuation device for <br>up to 6 babies!</a><a href="#evacuation_chairs" onMouseOver="showProductProfile(\'babyscatt-evacuation-device\')"><img src="evacuation-chairs/images/product-1460-baby-scatt-hero.png" title="Baby Scatt - Model 1460" alt="Baby Scatt - Model 1460" id="pic" style="margin:80px 0px 0px 90px;"></a>'
	],
	[
		'<a href="#evacuation_chairs" onMouseOver="showProductProfile(\'freedom-chair\')" id="caption" style="margin:60px 0px 0px 290px;"><span>Freedom Chair</span>Allows wheelchair users to overcome the difficulties of stairways and rough terrain.</a><a href="#evacuation_chairs" onMouseOver="showProductProfile(\'freedom-chair\')"><img src="evacuation-chairs/images/product-1550-freedom-chair-hero.png" title="Freedom Chair - Model 1550" alt="Freedom Chair - Model 1550" id="pic" style="margin:80px 0px 0px 40px;"></a>'
	],
]
		

function heroSlideshow(slide_num) {
	document.getElementById("heroPic").innerHTML=imgArray[slide_num][0];
}


function nextArrow() {
	stopCount();
	document.getElementById("heroPic").style.display="none";
	Effect.Appear("heroPic", { duration:1.0 });
	num++;
	num = num % imgArray.length;
	heroSlideshow(num);
}


function previousArrow() {
	stopCount();
	document.getElementById("heroPic").style.display="none";
	Effect.Appear("heroPic", { duration:1.0 });
	num--;
	if (num < 0) {num=imgArray.length-1;}
	num = num % imgArray.length;
	heroSlideshow(num);
}



	

