var popupStatus = 0;
var popupName = '';
function loadPopup(currentpopup) {
$("#backgroundPopup").css({
"opacity": "0.7"
});
$("#backgroundPopup").fadeIn();
$(currentpopup).css({"z-index": "2" });
$(currentpopup).fadeIn();
}
function disablePopup(currentpopup) {
$(currentpopup).fadeOut("slow");
$("#backgroundPopup").fadeOut();
}
function centerPopup(currentpopup) {
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var popupHeight = $(currentpopup).height();
var popupWidth = $(currentpopup).width();
$(currentpopup).css({
"position": "absolute",
"top": windowHeight / 2 - popupHeight / 2,
"left": windowWidth / 2 - popupWidth / 2
});
$("#backgroundPopup").css({
"height": windowHeight
});
}
Link this jquery on your Master Page and Call these Functions on Ur Web Form