var whichone_r = 1;

$(document).ready(function(){
    $('#container-5').show();
});

function rotate_r(direction){
    //alert(whichone);
    var i = 1;
    if(direction == 'next'){
        if(whichone_r == 10){
            i = 1;
            whichone_r = 1;
        }else{
            i = whichone_r + 1;
            whichone_r++;
        }
    }else{
        if(whichone_r == 1){
            i = 10;
            whichone_r = 10;
        }else{
            i = whichone_r - 1;
            whichone_r = whichone_r - 1;
        }
    }

    //alert(direction + whichone);
    for(r = 1;r <= 10; r++){
        document.getElementById('res_' + r).style.visibility = 'hidden';
        document.getElementById('res_' + r).style.display = 'none'
    }

    document.getElementById('res_' + i).style.visibility = 'visible';
    document.getElementById('res_' + i).style.display = 'block';
    document.getElementById('res_' + i).style.width = '193';
}

function rotate_f(direction){
    //alert(whichone);
    var i = 1;
    if(direction == 'next'){
        if(whichone_f == 10){
            i = 1;
            whichone_f = 1;
        }else{
            i = whichone_f + 1;
            whichone_f++;
        }
    }else{
        if(whichone_f == 1){
            i = 10;
            whichone_f = 10;
        }else{
            i = whichone_f - 1;
            whichone_f = whichone_f - 1;
        }
    }

    //alert(direction + whichone);
    for(f = 1;f <= 10; f++){
        document.getElementById('fix_' + f).style.visibility = 'hidden';
        document.getElementById('fix_' + f).style.display = 'none'
    }

    document.getElementById('fix_' + i).style.visibility = 'visible';
    document.getElementById('fix_' + i).style.display = 'block';
    document.getElementById('fix_' + i).style.width = '193';
}
function clearForm() {
	document.kickoff_comp.friend.value = "";
}