// a function to validate a password entry
function validate()
{                                  
  // convert the input to lowercase
  var entry = document.forms.f.pwd1.value.toLowerCase();
  // relocate the browser if the input is correct
  if( entry == "ripley") window.location ="membersonly.html";
 
 else
  {                                              
    // display a message if the input is incorrect
    alert("Password incorrect - Please retry...");
    // clear the password field
    document.forms.f.pwd1.value = ""; 
  }                             
}
