Sorry about the delay. I had to perform a lot of tests before I'm sure everithing is working.
I'm using now HEAD versions of all the files (the whole master stuff and the templating procs) and it seems to be working now. However, I had to manually setup the form id using the html id. It seems to me that ad_form is not parsing the right DOM information to the form. I uses a hidden input named form:id, and firefox doesn't see that as the form id.
Maybe someone need to change the ad_form API to improve DOM integration?
Thank you very much for your help. Everything is working now.