/**
 * Checks/unchecks all tables
 *
 * @param   string   the form name
 * @param   boolean  whether to check or to uncheck the element
 *
 * @return  boolean  always true
 */
function setCheckboxes(the_form, the_field, do_check)
{
    var elts      = document.forms[the_form].elements[the_field]
    var elts_cnt  = (typeof(elts.length) != 'undefined')
                  ? elts.length
                  : 0;

    if (elts_cnt) {
        for (var i = 0; i < elts_cnt; i++) {
            elts[i].checked = do_check;
        } // end for
    } else {
        elts.checked        = do_check;
    } // end if... else

    return true;
} // end of the 'setCheckboxes()' function

function popup( url, width, height, name ) {

        var mylink = url;
        var windowname = name = null ? 'Popup_Window' : name;
        if (! window.focus) return true;
                var href;
        if (typeof(mylink) == "string")
                href = mylink;
        else
                href = mylink.href;
        window.open(href, windowname, "width="+width+",height="+height+",scrollbars=yes");
        return false;

}

