  window.addEvent ('domready', function(){
    $('leftmov').addEvent('click', function() {			
      if ($arrow_left == true) {
        $arrow_left = false;
        leftx = document.getElementById('insideFlow');
        x = leftx.style.left.toInt();
        if(x == "" || isNaN(x)){x = 0;}
        new Fx.Tween(leftx, {property : 'left', duration: 200, transition: Fx.Transitions.Cubic.easeInOut, wait:true }).start(x, x + 104);
        $current_img--;
        window.setTimeout('checkArrows()', 200);
      }
    })
    $('rightmov').addEvent('click',function(){
      if ($arrow_right == true) {
        $arrow_right = false;				
        rightx = $('insideFlow');				
        x = rightx.style.left.toInt();
        if(x == "" || isNaN(x)){ x = 0; }							
        new Fx.Tween(rightx, {property : 'left', duration: 200, transition: Fx.Transitions.Cubic.easeInOut, wait:true }).start(x, x - 104);
        $current_img++;
        window.setTimeout('checkArrows()', 200);
      }
    })
  })

function checkArrows(){
  $arrow_left = $current_img > 1;
  elImg = $('leftmov').getElementsByTagName("IMG")[0];
	parts = elImg.src.split("/");
	parts[parts.length - 1] = "prev2" + ($arrow_left ? "_a" : "") + ".gif";
	elImg.src = parts.join("/");

	$arrow_right = $img_count - $current_img + 1 > 2 && $img_count > 2;
	elImg = $('rightmov').getElementsByTagName("IMG")[0];
	parts = elImg.src.split("/");
	parts[parts.length - 1] = "next2" + ($arrow_right ? "_a" : "") + ".gif";
	elImg.src = parts.join("/");
}  
