var Timer;
var temp_containerID; 
var temp_leftB_ID;
var temp_rightB_ID;

function ScrollRight(containerID,leftB_ID,rightB_ID)
{

	temp_containerID=containerID; 
	temp_leftB_ID=leftB_ID
	temp_rightB_ID= rightB_ID
	

	document.getElementById(temp_leftB_ID).src = "/i/layout/home/scroll_left_more.gif" ;
	clearInterval(Timer);
  	Timer = setInterval("ScrollToRight()", 20);
}


function ScrollLeft(containerID,leftB_ID,rightB_ID)
{
	temp_containerID=containerID; 
	temp_leftB_ID=leftB_ID
	temp_rightB_ID= rightB_ID
	

  document.getElementById(temp_rightB_ID).src = "/i/layout/home/scroll_right_more.gif" ;
  clearInterval(Timer);
  Timer = setInterval("ScrollToLeft()", 20);

}

function ScrollToLeft()
{
  document.getElementById(temp_containerID).scrollLeft -= 2;
  if (document.getElementById(temp_containerID).scrollLeft == 1 ){
  document.getElementById(temp_rightB_ID).src = "/i/layout/home/scroll_right.gif" ;
  }
}

function ScrollToRight()
{
	
  document.getElementById(temp_containerID).scrollLeft += 2;
  if (document.getElementById(temp_containerID).scrollLeft == 529 ){  
  document.getElementById(temp_leftB_ID).src = "/i/layout/home/scroll_left.gif" ;
  }
  
}


/*-----------------------up - down-------------------------------------------*/

function ScrollDown() {
    document.getElementById('scroll_up').src = '/i/layout/home/scroll_up.gif' ;
    clearInterval(Timer);
    Timer = setInterval('ScrollToUp()', 20);
}

function ScrollUp() {
    document.getElementById('scroll_down').src = '/i/layout/home/scroll_down.gif' ;
    clearInterval(Timer);
    Timer = setInterval('ScrollToDown()', 20);
}

function ScrollToUp() {
    var e = document.getElementById('ScrollContainer_updown');
    e.scrollTop += 2;

    if (e.scrollTop == e.scrollHeight - e.clientHeight) {
        document.getElementById('scroll_down').src = '/i/layout/home/scroll_down_gray.gif' ;
    }
}

function ScrollToDown() { 
    var e = document.getElementById('ScrollContainer_updown');
    e.scrollTop -= 2;

    if (e.scrollTop == 0) {
        document.getElementById('scroll_up').src = '/i/layout/home/scroll_up_gray.gif' ;
    }
}

