var popupDialog = $('
function() {
var popupDialog;
function closePopup(){
window.parent.page.closeSelfSearchPopup();
}
return {
closeSearchPopup : function() {
closePopup();
},
closeSelfSearchPopup: function(){
popupDialog.close();
}
}
}
//out page can not acess private variable: popupDialog directly.
//so we need to use method to acess it: closeSelfSearchPopup();
//Since we create a new