// JavaScript Document
	var img=new Array();
	function banner(name,width,link,type,color){
		this.name=name;
		this.width=width;
		this.link=link;
		this.type=type;
		this.color=color;
	}

	img[0]=new banner('images/products/thumb/product01.jpg',150+10,'images/products/thumb/product01.jpg','Visibility Vests','#FFCC00');
	img[1]=new banner('images/products/thumb/product02.jpg',150+10,'images/products/thumb/product02.jpg','Safety Cone','#FFCC00');
	img[2]=new banner('images/products/thumb/product03.jpg',150+10,'images/products/thumb/product03.jpg','Safety Parking Triangle','#FFCC00');
	img[3]=new banner('images/products/thumb/product04.jpg',150+10,'images/products/thumb/product04.jpg','Emergency Baton','#FFCC00');
	
	var kk=img.length;
	var ii;
	var hhh;
	var nnn;
	var x=0;
	var y=0;
	var xx=0;
	
	var imgArray=new Array(kk);
	var imgLeft=new Array(kk);
	var imgX=new Array(kk);
	
	for (ii=0;ii<kk;ii++){
		imgArray[ii]=new Image();
		imgArray[ii].src=img[ii].name;
		imgArray[ii].width=img[ii].width;
	
		hhh=0;
		
		for(nnn=0;nnn<ii;nnn++){
			hhh=hhh+img[nnn].width;
		}
		imgLeft[ii]=hhh;
		imgX[ii]=1;
	}

	function rightMove() {
		for (ii=xx;ii<kk;ii++){
			imgLeft[ii]=imgLeft[ii]-1;
			
			//if image is not visible
			if (parseInt(imgLeft[ii])==parseInt(-(img[ii].width))){
				hhh=0;
				//this will add all image width except this
				//and put it on the last image
				for (nnn=0;nnn<kk;nnn++){ 
					if (nnn!=ii){
						hhh+=img[nnn].width; //get all image width
					}			
				}
				imgLeft[ii]=hhh;// this will be the new position of the image
			}

			document.getElementById("imge"+ii).style.left=imgLeft[ii]+"px";
		}
	}
	
	function gogogo(w){
		i=setInterval("rightMove()",1);
		document.getElementById("imig"+w).style.MozOpacity=1;
		document.getElementById("imig"+w).style.filter="alpha(opacity=100)";
		document.getElementById("type"+w).style.visibility='hidden';
	}
	function stopstopstop(w){
		clearInterval(i);
		document.getElementById("imig"+w).style.MozOpacity=.5;
		document.getElementById("imig"+w).style.filter="alpha(opacity=50)";
		document.getElementById("type"+w).style.visibility='visible';
		document.getElementById("type"+w).style.font='bolder 20px tahoma';
	}
	
	i=setInterval("rightMove()",1);//start scrolling when page loads
