It's probably the same as a .js file to keep your javascript concealed.
At any rate, what they're doing is really simple - they have an array of "magic eight ball" type answers, and onClick() generates a number from zero to the length of the array, and then displays that answer in the text box. It was probably their homework in Scripting 101.