var gSBMain = null;
var gSBContent = Array();
var active = 1;
var started = false;
function ScoreSwitch( main, content ) {
    gSBMain = main;
    gSBContent = content;
}
function score_next() {
    active++;
    if( active > gSBContent.length ) active = 1;
    display( active );
}
function score_back() {
    active--;
    if( active < 1 ) active = gSBContent.length;
    display( active );
}
function score_play() {
    if( !started ) {
        started = true;
    } else {
        score_next();
    }
    SBTimer = window.setTimeout( "score_play();", 5753 );
}
function display( id ) {
    if( gSBContent.length > 1 ) {
        SBcible = $( gSBContent[ id - 1 ] );
        Element.hide( gSBMain );
        window.setTimeout( "Element.update( gSBMain, SBcible.innerHTML );", 100 );
        if ( navigator.userAgent.search(/^(.*)Safari(.*)$/) == -1 ) {
            window.setTimeout( "new Effect.Appear( gSBMain, { duration: 0.3 } );", 100 );
        } else {
            window.setTimeout( "Element.show( gSBMain );", 200 );
        }
    }
}