function noOp() {}
function imageButtonDefaultMouseOver() {
    MM_swapImage(this.id, '', this.onSrc, 1);
}
function imageButtonDefaultMouseOut() {
    MM_swapImgRestore();
}
function setupImageButton(imageButton, buttonState, defaultSrc, onSrc, disabledSrc) {
    if (!imageButton.buttonState) {
        imageButton.buttonState = buttonState;
        if (defaultSrc && defaultSrc != null) {
            imageButton.defaultSrc = defaultSrc;
            if (buttonState != "default") {
                MM_preloadImages(defaultSrc);
            }
        }
        if (onSrc && onSrc != null) {
            imageButton.onSrc = onSrc;
            if (buttonState != "on") {
                MM_preloadImages(onSrc);
            }
        }
        if (disabledSrc && disabledSrc != null) {
            imageButton.disabledSrc = disabledSrc;
            if (buttonState != "disabled") {
                MM_preloadImages(disabledSrc);
            }
        }
        if (buttonState == "default") {
            imageButton.onmouseover = imageButtonDefaultMouseOver;
            imageButton.onmouseout = imageButtonDefaultMouseOut;
        }
    }
}
function setImageButtonState(imageButton, buttonState, resetIfDefault) {
    if (imageButton.buttonState == buttonState) {
        return;
    }
    if (!resetIfDefault) {
        resetIfDefault = false;
    }
    imageButton.onmouseover = noOp;
    imageButton.onmouseout = noOp;
    if (imageButton.buttonState == "default") {
        MM_swapImgRestore();
    }
    if (buttonState == "default") {
        imageButton.onmouseover = imageButtonDefaultMouseOver
        imageButton.onmouseout = imageButtonDefaultMouseOut
        imageButton.src = imageButton.defaultSrc;
        if (!resetIfDefault) {
            imageButton.onmouseover();
        }
    } else if (buttonState == "on") {
        imageButton.src = imageButton.onSrc;
    } else if (buttonState == "disabled") {
        imageButton.src = imageButton.disabledSrc;
    }
    imageButton.buttonState = buttonState;
}
