I am checking username by using jquey,php.I am getting error like this:

Uncaught ReferenceError: finishAjax is not defined
I added the code below.

index.php

<?php ob_start();?>
<?php include('includes/inner-header.php');?>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#login-form').hide();
$('#Loading').hide();
$('#Loading1').hide();
$('#login').click(function(){

$('#login-form').toggle();
});

$('#username').blur(validateUsername);
$('#username').keyup(validateUsername);



function validateUsername(){
var filter = /^[A-Za-z0-9._ ]+$/;
if($('#username').val()==''){
$('#username').addClass("error");
$('#usernameInfo').text("Enter User Name");
$('#usernameInfo').addClass("error");
return false;
}
else if($('#username').val().length < 4){
$('#username').addClass("error");
$('#usernameInfo').text("Name should be more than 3 letters!");
$('#usernameInfo').addClass("error");
return false;
}

else if(!($("#username").val()).match(filter))
{
$("#username").addClass("error");
$("#usernameInfo").text("Enter Valid Name");
$("#usernameInfo").addClass("error");
$("#username").val(($("#username").val()).replace(/[^a-zA-Z0-9._]+/, ""));
return false;


}
else
{
$('#username').removeClass("error");
$('#usernameInfo').text("");
$('#usernameInfo').removeClass("error");
check_username();
return true;

}
}


});

</script>
<script type="text/javascript">
function check_username(){

var username = $("#username").val();

$('#Loading').show();
$.post("checkusername.php", {
username: $('#username').val(),
}, function(response){
$('#Info').fadeOut();
$('#Loading').hide();
setTimeout("finishAjax('Info', '"+escape(response)+"')", 450);
});
return false;

}
/*function check_email(){

var email = $("#email").val();

if(email.length > 6){
$('#Loading1').show();
$.post("checkemail.php", {
email: $('#email').val(),
}, function(response){
$('#Info1').fadeOut();
$('#Loading1').hide();
setTimeout("finishAjax('Info1', '"+escape(response)+"')", 450);
});
return false;
}
}*/




</script>

<div id="right-content">
<a href="javascript:void(0)" id="login" style="float: right;margin-top:20px;text-align: center;color:#fff;font-famil:georgia;padding-top: 10px;" class="button" >Enroll Here</a>
<!--<p style="float: left;margin-left: 200px;margin-top:100px;">
<a href='PlanASignUp.php' style="float: left;margin-left: 100px;padding-top: 10px;height: 30px;text-decoration: none;background: #33ccff;width:150px;border-radius:5px;text-align: center;color:#fff;font-size: 18px;font-family: georgia;">Plan A</a>
<a href='PlanBSignUp.php' style="float: left;padding-top: 10px;height: 30px;margin-left:20px;text-decoration: none;background: #33ccff;width:150px;border-radius:5px;text-align: center;color:#fff;font-size: 18px;font-family: georgia">Plan B</a>
</p>-->
<div id="login-form" style="display: none;">
<form action="Get_User_Information.php" method="post" id="signup" enctype="multipart/form-data">
<p class="p">
<label class="label">Username</label>
<label class="label1"><input type="text" name="username" class="txtfld" id="username" ></label>
<label class="label2" id="usernameInfo">&nbsp;</label>
<label id="Info">&nbsp;</label>
<label><span id="Loading"><img src="images/loader.gif" alt="" /></span></label>
</p>
<p><input type="hidden" name="plan" value="Plan A"></p>
<p class="p">

<button type="submit" class="button" name="submit" style="margin-left: 20px;" value="Register">Register</button>
<!--<span style="float: right;color:#272727;margin-right: 145px;margin-top: 10px;">Not a member Yet? <a href="#" style="text-decoration: none;color: red;">Sign Up</a></span>-->
</p>

</form>
</div>
</div> <!--Right Content-->
</div> <!-- body-->
</div><!--body bg-->
<?php include('includes/footer.php');?>
<?php ob_flush();?>

checkusername.php

<?php
include('administration/includes/Db_Config.php');
/*$query=mysql_query("select * from userdetails where username='".$_REQUEST['username']."'") or die(mysql_error());
if(mysql_num_rows($query)==0)
echo "Username Available";
else
echo mysql_num_rows($query);*/

if($_REQUEST)
{
$username = $_REQUEST['username'];
$query = "select * from userdetails where username = '".$username."'";
$results = mysql_query( $query) or die('ok');

if(mysql_num_rows($results) > 0) // not available
{
echo '<span id="Error">Already Taken</span>';
}
else
{
echo '<span id="Success">Available</span>';
}

}

?>