Sorry that was me. I had logged in as another user and forgot to sign out before replying.
Deleting and stripping tags is risky business because the javascript is depends on it. You can find the code on the paymentoptions.js file.
For determining the height it just finds the "Shipping" and "Billing" fieldsets and then finds the parent node and tries to determine its natural height.