html basic layout and most of the javascript validation