
var products = getElementObject( "prodlist" );
products.style.width = "5730px";
// Width was 1035px
//products.style.left = "5px";

var vwrap = products.cloneNode( true );
vwrap.id = "vprods";		
vwrap.style.left = ( parseInt( products.style.width ) * - 1  + 20 ) + "px";
getElementObject( "con" ).appendChild( vwrap );


var timerLeftScroll = 0;
var timerRightScroll = 0;
var scrollspeed = 6;
var scrollwait = 25;

getElementObject( "goleft" ).onmouseover = scrollRight;
getElementObject( "goleft" ).onmouseout = function(){ window.clearTimeout(timerRightScroll); };
getElementObject( "goright" ).onmouseover = scrollLeft;
getElementObject( "goright" ).onmouseout = function(){ window.clearTimeout(timerLeftScroll); };

function scrollLeft(){
	prodleft = parseInt( products.style.left );
	prodwidth = parseInt( products.style.width );
	
	if( prodleft <= ( - (prodwidth - 498) -prodwidth ) ){
		products.style.left = "448px";
	} else {
		products.style.left = ( prodleft - scrollspeed ) + "px";
	}
	
	if( parseInt( vwrap.style.left ) <= ( - (prodwidth - 498) -prodwidth ) ){
		vwrap.style.left = "448px";
	} else {
		vwrap.style.left = ( parseInt( vwrap.style.left ) - scrollspeed ) + "px";
	}
	
	timerLeftScroll = window.setTimeout( scrollLeft, scrollwait );
}

function scrollRight(){
	prodleft = parseInt( products.style.left );
	prodwidth = parseInt( products.style.width );
	
	if( prodleft >= (prodwidth) ){
		products.style.left = ( parseInt( products.style.width ) * -1  + 50 ) + "px";
	} else {
		products.style.left = ( prodleft + scrollspeed ) + "px";
	}
	
	if( parseInt( vwrap.style.left ) >= (prodwidth) ){
		vwrap.style.left = ( parseInt( products.style.width ) * -1  + 50 ) + "px";
	} else {
		vwrap.style.left = ( parseInt( vwrap.style.left ) + scrollspeed ) + "px";
	}
	
	timerRightScroll = window.setTimeout( scrollRight, scrollwait );
}
