Event.observe(window, 'load', function() {
    attaches = $$("#attacheds .attached").size();
    if(attaches > 1){
        setInterval("changeAttached()", 10000);
    }
});

var current_attached = 0;
function changeAttached(){
    $("attached_" + current_attached).hide();
    current_attached++;
    if($("attached_" + current_attached)){
        $("attached_" + current_attached).show();
    }
    else{
        current_attached = 0;
        $("attached_" + current_attached).show();
    }
}
