Javascrip test to see if first 4 characters are correct : Here is my issue i am trying to run a script to see if i can verify the first 4  characters in a text box.  The text box works to tell me that the characters are not there but when i put the first 4 number in correctly it still gives me the same error.  Also the text box has a min of 15 characters and a max of 16 characters.

Here is the script:

    var check_card_no = function (event){
    check_digits = card_no.substring(0, 4);
    if(check_digits=="9999"){
    return true;
    }
    else{
    	alert("please enter valid Credit Card Number");
    	patron_card_no.value="";
    	patron_card_no.focus();
    	return false;
    }
    }