var numeroClientes =  27;
var currentCliente = 1;
var effect;

/* largura da imagem = 155px; */

function init()
{
	var width = numeroClientes * 155;
	width += '';
	width += 'px';
	if($('outerBox'))
		$('outerBox').style.width = width;
}

function moveLeft() {
    if (effect)
        return false;
	var width = $('outerBox').style.left;
	width = width.slice(0, width.length);
	if (currentCliente == numeroClientes) {
	    currentCliente = 1
	    new Effect.Move('outerBox', { x: (numeroClientes - 1) * 155, y: 0 });
	    return false;
	}	
	currentCliente++;
	effect = new Effect.Move('outerBox', { x: -155, y: 0 });
	return false;
}

function moveRight() {
    if (effect)
        return false;
	var width = $('outerBox').style.left;
	width = width.slice(0,width.length);
	if (currentCliente == 1) {
	    currentCliente = numeroClientes;
	    new Effect.Move('outerBox', { x: (1 - numeroClientes) * 155, y: 0 });
	    return false;
	}
	currentCliente--;
	effect = new Effect.Move('outerBox', { x: 155, y: 0 });
	return false;
}
