function dismissPopupAndReload(win) {
    document.location.reload();
    win.close();
};
function dismissRelatedImageLookupPopup(win, chosenId, chosenThumbnailUrl, chosenDescriptionTxt) {
    var name = windowname_to_id(win.name);
    var img_name = name + '_thumbnail_img';
    var txt_name = name + '_description_txt';
    var elem = document.getElementById(name);
    document.getElementById(name).value = chosenId;
    document.getElementById(img_name).src = chosenThumbnailUrl;
    document.getElementById(txt_name).innerHTML = chosenDescriptionTxt;
    win.close();
};
function dismissRelatedFolderLookupPopup(win, chosenId, chosenName) {
    var id = windowname_to_id(win.name);
    var id_name = id + '_name';
    alert(id_name);
    document.getElementById(id).value = chosenId;
    document.getElementById(id_name).innerHTML = chosenName;
    win.close();
};

@@ -733,29 +733,8 @@
 ';%0D%0A
-    alert(id_name);%0D%0A
     

Remove debug output (cherry picked from commit cc5dcaae49c3e676e5d86cc0f4a78574494d1a13)