1. What is the first part of the script doing (before the functions)?
a. It's setting the variables for the mouse on and off images and giving their url.

2. Why is the eval() function necessary?
a. First, eval determines if the argument is a valid string and then parses the string looking for JavaScript code. If there are JavaScript statements in the code, they will be executed and eval will return the value of the last statement (if there is a value). If there is a JavaScript expression, it will be evaluated and its value will be returned.

3. Adding more images would involve what steps?
a. You'd have to add additional variables (both mouse_on and mouse_off) for each new set and also add the link for each in the body.


1.What does the parameter this refer to in the validate_data(this) function call?
a. this refers to the form.

2. What is the reason of having the strip_spaces() function?
a. It removes any spaces in the name and email address as there shouldn't be any.

3. What is the loop used for? Would there be a better or just an alternative to this?
a. The loop is checking if it is a number. I think this would be an easier way:
if (isNaN(form.grade.value) {
confirm_message += "Grade is not a number" + "\n";
}