Validating a textbox in javascript