//var oldwebformsubmit = WebForm_OnSubmit; var oldwebformsubmit = (typeof WebForm_OnSubmit == "undefined") ? 0 : WebForm_OnSubmit; var oldformsubmit = form.onsubmit;