/**
 * Masque / affiche un objet
 */
function toggle_display(idname)
{
    obj = fetch_object(idname);
    if (obj)
    {
        if (obj.style.display == "none")
        {
            obj.style.display = "";
        }
        else
        {
            obj.style.display = "none";
        }
    }
    return false;
}

/**
 *
 */
var jol_bbcodepopup_cache = new Array();
var jol_bbcodepopup_ajax = null;
function jol_bbcodepopup(id)
{   
    if (jol_bbcodepopup_ajax == null) {
        jol_bbcodepopup_ajax = new vB_AJAX_Handler();
    }

    if (jol_bbcodepopup_cache[id]) {
        item = jol_bbcodepopup_cache[id];
    } else {
        jol_bbcodepopup_ajax.send('/jol/bbcodepopups/ajax.php', 'id=' + id);
        var item = jol_bbcodepopup_ajax.fetch_data(fetch_tags(jol_bbcodepopup_ajax.handler.responseXML, 'item')[0]);
        jol_bbcodepopup_cache[id] = item;
    }

    obj = fetch_object('overDiv');
    if (obj)
    {
        obj.innerHTML = item;
    }

    return false;
}

function jol_masquer_habillage(x) {
    var expires = new Date();
    expires.setTime(expires.getTime() + (1000 * 20 * 3600));
    set_cookie("forums_habi", x, expires);
    location.reload();
}
