/*
 * $Id:$
 * 
 * A class to show and hide a progress bar when appropriate
 * created by FIXIA  2007 -  sales@fixia.com
 */

/*
 * meterId is the CSS id of an element to be showing an hiding as needed
 */
function ProgressMeter(meterId) {
    this.meterId = meterId;
    this.depth   = 0;
}

ProgressMeter.prototype.show = function() {
    this.depth++;
    $(this.meterId).style.display = 'block';
}


ProgressMeter.prototype.hide = function() {
    this.depth--;

    if(this.depth == 0) {
        $(this.meterId).style.display = 'none';
    }
}