Changing generated INPUT fields, checkout pages

We would like to change the HTML created for some but not all of out fields in the checkout pages. Is this possible, and if it is, where do I start? I have looked at many TPL files and it seems all the HTML is generated and so I can't see how I could change a single field.



(We want to do this to add some friendly validation on some fields, particularly those used for credit card processing. At the moment, we can accept a surname which is too long for the credit card processor).



Thanks, Mike