added machine form javascript validation