I'm curious why you sometimes use the "document.forms['Form1'].elements['Password1']" form and sometimes use the older "document.Form1.Password1".
But more significantly, you've missed the closing quote on the onsubmit attribute. Also, there's no "SaveChanges" field in the form.
Then there's the missing '}' on the end. If the function has a syntax error, then it doesn't get defined, and calling it is therefore an error (as the JavaScript interpreter is probably reporting in the error console).
And are you sure you want this to fire every time the password field changes?
It will of course validate if both fields are blank, because if both fields are blank then they are equal.