IMplemented complete javascript validation for 'new' page