if(!window.ScnUtil) {
    window.ScnUtil = {};
}

ScnUtil.formSubmitInProgress = false;
ScnUtil.formSubmitTimeout = 10;

ScnUtil.resetFormSubmitInProgress = function() {
    if(this.formSubmitInProgress = true)
    {
        this.formSubmitInProgress = false;
        /* alert("Form submit ended, you can continue to work on this screen now.");*/
    }
}

ScnUtil.formSubmit = function() {
    if(this.formSubmitInProgress)
    {
        /*alert("Form submit in progress, please wait for " +
            this.formSubmitTimeout + " seconds.");*/
        alert("Form submit in progress.");
        return false;
    }
    else
    {
        this.formSubmitInProgress = true;
        /*window.setTimeout("ScnUtil.resetFormSubmitInProgress()",
            this.formSubmitTimeout * 1000);*/
        return true;
    }
}

ScnUtil.keyPressSearchTextarea = function (e) {
    var intKeyCode = (e.keyCode ? e.keyCode : (e.which ? e.which : e.charCode));
    if (intKeyCode == 13) {
        e.cancelBubble = true;
    }
    return true;
}

