// Change slides when using navigatioion buttons

var slide = 1;
function nextSlide() {
	slide = slide+1;
	if(slide > 5) {
		slide=1;
	}
	swapContent("slide"+slide);
}
function previousSlide() {
	slide = slide-1;
	if(slide < -4) {
		slide=0;
	}
	swapContent("slide"+slide);
}





/*function hideDivs() {
	$('iMethod').hide();
	$('serviceNetwork').hide();	
	$('softwareSolutions').hide();
	$('technology').hide();
	$('application').hide();
}*/
function swapContent() {
	for (var i = 0 ; i < arguments.length ; i++) {
		//alert(arguments[i]);
		var slide = arguments[i];
		
							
		switch (arguments[i])
		{					
			case 'slide1': document.getElementById('title').innerHTML = '<a href=../products/idirect.html>Browse iDirect Products</a>';
				//$('iMethod').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;
			case 'slide2': document.getElementById('title').innerHTML = '<a href=../products/wildblue.html>WildBlue Satellite</a>';
				//$('serviceNetwork').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;
			case 'slide3': document.getElementById('title').innerHTML = '<a href=../products/satSolutions.html>Portable Satellite</a>';
				//$('softwareSolutions').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;
			 case 'slide4': document.getElementById('title').innerHTML = '<a href=../products/iridium.html>Iridium Satellite Phone</a>';
				//$('technology').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;
			 case 'slide5': document.getElementById('title').innerHTML = '<a href=../products/thrane_thrane.html>Thrane & Thrane Products</a>';
				//$('application').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;
			 case 'slide0': document.getElementById('title').innerHTML = '<a href=../products/thrane_thrane.html>Thrane & Thrane Products</a>';
				//$('application').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;	
			 case 'slide-1': document.getElementById('title').innerHTML = '<a href=../products/hughs.html>Hughes Satellite</a>';
				//$('technology').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;  
			 case 'slide-2': document.getElementById('title').innerHTML = '<a href=../products/satSolutions.html>Portable Satellite</a>';
				//$('softwareSolutions').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;
		   	 case 'slide-3': document.getElementById('title').innerHTML = '<a href=../products/wildblue.html>WildBlue Satellite</a>';
				//$('serviceNetwork').show().fade({ duration: 2.0, from: 0, to: 1 });
				break;
			 case 'slide-4': document.getElementById('title').innerHTML = '<a href=../products/idirect.html>Browse iDirect Products</a>';
				//$('iMethod').show().fade({ duration: 2.0, from: 0, to: 1 });
			}							
        }
    }
	document.observe('dom:loaded', function () {
		new Showcase.Horizontal($$('#horizontal ul li'), $$('#horizontal a.controls'), {duration: 0.3});
		//hideDivs();
		//$('iMethod').show().fade({ duration: 2.0, from: 0, to: 1 });
		});
		
	
		