function submitNotes() {  var notesEmail = document.getElementById("notesEmail").value;  var CampusNotes = getNotesValue();	var url = "UpdateNotes.asp";  request.open("POST", url, true);  request.onreadystatechange = replaceNotes;  request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");  request.send("notesEmail=" + escape(notesEmail) +               "&CampusNotes=" + escape(CampusNotes));}function replaceNotes() {  if (request.readyState == 4) {    var mainDiv = document.getElementById("notes-email");    var NotesEmailField = document.getElementById("NotesEmailField");    var NotesEmailLabel = document.getElementById("NotesEmailLabel");	sElement = document.createElement("span");		if (request.status == 200) {		var response = request.responseText;      // Replace the form with the confirmation		$("#NotesEmailField").hide();		$("#notes-send-again").show();	} else {      var message = request.getResponseHeader("Status");      if ((message == null) || (message.length <= 0)) {		  textNode = document.createTextNode("unable to send:");		  sElement.appendChild(textNode);			  // Replace the form with the confirmation		  NotesEmailField.replaceChild(sElement, NotesEmailLabel);      } else {      textNode = document.createTextNode("unable to send:");      sElement.appendChild(textNode);      // Replace the form with the confirmation	  NotesEmailField.replaceChild(sElement, NotesEmailLabel);      }    }  }}