function tab_activate (name, current, total) {
    for (var i = 1; i <= total; i++) {
        obj = document.getElementById(name + '-' + i);

        if (i % 2) {
            if (i == current - 1) {
                obj.className = 'fin-tab-on-left';
            } else if (i == current + 1) {
                obj.className = 'fin-tab-on-right';
            } else if (i == 1) {
                obj.className = 'fin-tab-off-left';
            } else if (i == total) {
                obj.className = 'fin-tab-off-right';
            } else {
                obj.className = 'fin-tab-separator';
            }
        } else {
            if (i == current) {
                obj.className = 'fin-tab-on-center';
                if (document.getElementById(name + '-' + i + '-content')) {
                    document.getElementById(name + '-' + i + '-content').style.display = '';
                }
            } else {
                obj.className = 'fin-tab-off-center';
                if (document.getElementById(name + '-' + i + '-content')) {
                    document.getElementById(name + '-' + i + '-content').style.display = 'none';
                }
            }
        }
    }
}

