/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */
var browser=navigator.appName;
if (browser=="Microsoft Internet Explorer"){scrollStep=10;}
else{scrollStep=5;}


var timerLeft="";
var timerRight="";

function toLeft(id){
  document.getElementById(id).scrollLeft=0;
}

function scrollDivLeft(id){
  clearTimeout(timerRight);
  document.getElementById(id).scrollLeft+=scrollStep;
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10);
  clearTimeout(bannerScroll);
}

function scrollDivRight(id){
  clearTimeout(timerLeft);
  document.getElementById(id).scrollLeft-=scrollStep;
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10);
  clearTimeout(bannerScroll);
}

function toRight(id){
  document.getElementById(id).scrollLeft = document.getElementById(id).scrollWidth;
}

function stopMe(){
  clearTimeout(timerRight); 
  clearTimeout(timerLeft);
  /*if(rotateBanner == 1){
	bannerScroll=setTimeout("autoScroll('"+bannerx+"')",banspeed[bannerShowing]);
  }*/
}


	
	var bannerTimer=0;
	var bannerScroll;
	function autoScroll(banx){
		if(bannerShowing == banx - 1){
			document.getElementById('Vcontainer').scrollLeft=0;
			bannerShowing = 0;
			viewBanner(bannerShowing);
		}else{
			document.getElementById('Vcontainer').scrollLeft=bannerShowing*110;
			bannerShowing++;
			viewBanner(bannerShowing);
			
		}
		$("img[name|=scrollthumb]").removeClass('banSelected');
		$('#img'+bannerShowing).addClass('banSelected');
		bannerScroll=setTimeout("autoScroll('"+bannerx+"')",banspeed[bannerShowing]);
	}

