
var products = getElementObject( "prodlist" );
products.style.width = "560px";

var vwrap = products.cloneNode( true );
vwrap.id = "vprods";		
vwrap.style.left = ( parseInt( products.style.width ) * -1  + 10 ) + "px";
getElementObject( "con" ).appendChild( vwrap );


var timerLeftScroll = 0;
var timerRightScroll = 0;

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 - 418) -prodwidth ) ){
		products.style.left = "368px";
	} else {
		products.style.left = ( prodleft - 20 ) + "px";
	}
	
	if( parseInt( vwrap.style.left ) <= ( - (prodwidth - 418) -prodwidth ) ){
		vwrap.style.left = "368px";
	} else {
		vwrap.style.left = ( parseInt( vwrap.style.left ) - 20 ) + "px";
	}
	
	timerLeftScroll = window.setTimeout( scrollLeft, 70 );
}

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 + 20 ) + "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 ) + 20 ) + "px";
	}
	
	timerRightScroll = window.setTimeout( scrollRight, 70 );
}