function update_slider(index, prepare, offset){

    //console.log("update_slider", prepare, offset);

    if(prepare){

        prepareStyle(slider, function(){

            update_slider(index, false, offset);
        });
    }
    else{

        setStyle(slider, "transform", "translateX(" + (-index * 100 + (offset || 0)) + "%)");
    }
}
@param {number} index
@param {boolean=} prepare
@param {number=} offset