Hi, i'm new to javascript and I'm just wondering why this isnt displaying the alert messages.. can anyone shed some light?

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {


$("#username").keyup(function(e) {
var usr = $("#username").val();
var allready= 0;
if(usr.length > 3) 
{
         allready= 1;
         $('input[type="submit"]').removeAttr('disabled'); 
} else 
    $('input[type="submit"]').attr('disabled', true);
      allready = 0;
        })

function checkdone() {

if (allready == 1)
{ $('input[type="submit"]').removeAttr('disabled'); 
alert('All ready is true');
}
else 
alert('All ready is false');
$('input[type="submit"]').attr('disabled', true);
}


window.setInterval(checkdone(), 1000);
    });
</script>

Since you are using JQuery in your code are you referencing the jquery library in your code somewhere: for example: <script type="text/javascript" src="jquery-1.6.1.js"></script>