Field validation and Drop down value filtering using javascript