
function TeacherDialog_OnOpen_Callback(dialog) {
  $instid = $("#instid").text();
  $.get("fetchteacher.php?id=" + $instid, {}, function(data){
      $('instructor',data).each(function(i) {
          firstName = $(this).find("firstName").text();
          lastName = $(this).find("lastName").text();
          bio = $(this).find("biography").text();
          photourl = $(this).find("photourl").text();

          html = "";
          if (photourl.length != "") { html = "<img src='" + photourl + "' />" };
          html = html + "<h2>" + firstName + " " + lastName + "</h2>";
          html = html + "<p>" + bio + "</p>";
//          $('#teacher-dialog').data.replaceWith(html);
          dialog.data.find('#teacher-dialog').html(html);
//          dialog.data.replaceWith(html);
          dialog.overlay.show();
          dialog.container.show();
          dialog.data.show();
      });
  });
}

function TeacherDialog_OnSuccess_Callback(data, textStatus) {

}

