1>document.form1.number2.value , might be you have different text field name.
2>document.form1.number2.value might be empty??
3>Always put check for the value exists or not before to perform arithmetic calculation
If possible put your form code,so that it may help us to figure out problem
Hope this will help you.