function pageLoad(sender, args) {
$find('ModalPopupBehavior').add_shown(Shown);
$find('ModalPopupBehavior').add_showing(Showing);
$find('ModalPopupBehavior').add_hidden(Hidden);
}
function Shown(sender, args) {
modalId = sender.get_id();
}
function Showing(sender, args) {
if (modalId == 'ModalPopupBehavior') {
args.set_cancel(true);
}
}
function Hidden(sender, args) {
modalId = '';
}