Creating and Reusing JavaScript Functions