updated script.js

added inital functions for input and validation