Here is my goal: I want to have my login form appear on the screen, after the link is clicked. It should then bounce on the screen ( the entire form ). The form is appearing, but the javascript function to bounce it is not working. Any help would be appreciated, im really only creating this so I can learn, but I don't understand why its not working.

The main file:
HTML Code:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<script type="text/javascript" src=""></script>
<script type="text/javascript">
 $(document).ready(function() {
function bounceLoginScreen()
      var $=jQuery();
      alert("should have bounced");

var xmlhttp;
function showUser(str)
if (xmlhttp==null)
  alert ("Browser does not support HTTP Request");
var url="getLoginBox.php";

function stateChanged()
if (xmlhttp.readyState==4)
spillTheBeans2('finalDivBouncer', xmlhttp.responseText);


function GetXmlHttpObject()
if (window.XMLHttpRequest)
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
if (window.ActiveXObject)
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
return null;

function spillTheBeans2(cont, textToChange)
  var newdiv = document.createElement("div");
  newdiv.innerHTML = textToChange; = "finalDivBouncer";
  var container = document.getElementById(cont);
  var parentDiv = container.parentNode;
  parentDiv.replaceChild(newdiv, container); 



  <div id = "finalDivBouncer">
  <b>Old div text.</b>
<a href = "#" onClick = "showUser('');"> link</a>


The form file:

HTML Code:
User Name : <input name="username" type="text" id="username" value="" maxlength="20" />
<div style="margin-top:5px" >
Password :
<input name="password" type="password" id="password" value="" maxlength="20" />
<input name="Submit" type="submit" id="submit" value="Login" style="margin-left:-10px; height:23px"  /> <span id="msgbox" style="display:none"></span>
The backend:

HTML Code:
$myFile = "loginBox.html";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
echo $theData;