How to return id of a submitted form using Prototype?

I have a page that has several ajax submission forms. Each form has a dynamic id assigned to it when it's written to the page. Does anyone know if there is an easy way to return the id of the form that is being submitted? I'm basically looking to click "submit" and alert the id of the submitted form. From there I can use it in the ajax onSuccess function.