var conteiner_width=0;
var div_count=0;
var active_div="scroll_div";
var pasiv_div="scroll_div2";

function Go_scroll()
{
    obj=document.getElementById(active_div);
    div=obj.getElementsByTagName("div");
    div_count=div.length;
    conteiner_width=(parseInt(div.length)-4)*173;
    t=setInterval('Start_scroll()',20);
}


function Start_scroll()
{
  obj=document.getElementById(active_div);
  obj.style.right=parseInt(obj.style.right)-1;
  if(conteiner_width+parseInt(obj.style.right)==0)
  {
    obj2=document.getElementById(pasiv_div);
    d_left=173*((div_count/2)-4);
    obj2.style.right=0-d_left;
    obj.style.display="none";
    obj2.style.display="block";
    Stop_scroll();
    active_div=obj2.id;
    pasiv_div=obj.id;
    obj.style.right=0-d_left;
    Go_scroll();
  }
}

function Stop_scroll()
{
   clearInterval(t);
}

function Show_span(name,obj)
{
  document.getElementById(name+obj.id).style.display="block";
}

function Hide_span(name,obj)
{
  document.getElementById(name+obj.id).style.display="none";
}