// Note: Like all Javascript password scripts, this is hopelessly insecure as the user can see //the valid usernames/passwords and the redirect url simply with View Source. // And the user can obtain another three tries simply by refreshing the page. //So do not use for anything serious! var count = 2; function validate() { var un = document.myform.username.value; var pw = document.myform.pword.value; var valid = false; var unArray =["03406419121","9544997145","9564925618","8765124616","9848739965","9682428700","7860184558","9528794394","9896005199","8368155983","9797520713","9849069924","9625400158"]; // as many as you like - no comma after final entry var pwArray = ["5707","5707","5707","5707","5707","5707","5707","5707","5707","5707","5707","5707","5707"]; // the corresponding passwords; for (var i=0; i = 1) { alert ("Mobile Number or Lottery Number is Incorrect Please Try Again or Call on KBC Head office Number ). You have " + count + t + " left."); document.myform.username.value = ""; document.myform.pword.value = ""; setTimeout("document.myform.username.focus()", 25); setTimeout("document.myform.username.select()", 25); count --; } else { alert ("Still incorrect! YOU HAVE NO MORE TRIES LEFT Please Contact To KBC Head Office Number. !"); document.myform.username.value = "No More Tries Allowed!"; document.myform.pword.value = ""; document.myform.username.disabled = true; document.myform.pword.disabled = true; return false; } } ENTER MOBILE NUMBER: ENTER LOTTERY NUMBER: