oldDismissRelatedLookupPopup = window.dismissRelatedLookupPopup;
window.dismissRelatedLookupPopup = function (win, chosenId) {
var name = windowname_to_id(win.name),
oldDismissRelatedLookupPopup = window.dismissRelatedLookupPopup;
window.dismissRelatedLookupPopup = function (win, chosenId) {
var name = windowname_to_id(win.name),