A thought occurs that you could try to load the page in a hidden iframe, using onload to try to reference an element on the page, even document.body, and if this fails redirect to another page. But I don't know without a little googling whether onload fires if the page is not found(?).
[I think there might be another way to do this using ajax or some other similar technology.]
But given that this is not secure at all.. you could store the passwords in an array and check if the one they've entered exists in the array.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity
." Me Myself & Irene
Validate your HTML