A JavaScript enhancement for implementing HTML5-like form elements and validation in non-compliant browsers