var qilroy=qilroy?qilroy:new Object();qilroy.popup=new function(){var a={internalPopup:null,getInternalPopup:function(){if(qilroy.popup.internalPopup==null){var b='<div class="qilroyBlackout"></div><div class="qilroyPopup"><div class="qilroyPopupClose" onclick="qilroy.popup.closePopup();"></div><div class="busyDiv"><img src="images/wait.gif" style="margin:60px 0px;"/></div><div class="popupContent"></div></div>';var c=$j("body");c.append(b);qilroy.popup.internalPopup=$j(".qilroyPopup")}return qilroy.popup.internalPopup},setBusyState:function(b){if(b==true){$j(".qilroyPopup .popupContent").hide();$j(".qilroyPopup .busyDiv").show()}else{$j(".qilroyPopup .busyDiv").hide();$j(".qilroyPopup .popupContent").show()}},setPopupSize:function(c){if(c==undefined){c=250}$j(".qilroyPopup").css("width",c+"px");var b=$j("body").width();var e=$j("body").height();var d=(b-c)/2;$j(".qilroyPopup").css("left",d+"px")},setPopupState:function(b){if(b==true){$j(".qilroyPopup").show();$j(".qilroyBlackout").show()}else{$j(".qilroyPopup").hide();$j(".qilroyBlackout").hide()}},setPopupContent:function(b){if(b==undefined){b=""}$j(".qilroyPopup .popupContent").html(b)},openPopup:function(b,d,c){var e=qilroy.popup.getInternalPopup();qilroy.popup.setPopupSize(b);qilroy.popup.setPopupContent(d);qilroy.popup.setBusyState(c);qilroy.popup.setPopupState(true)},openPopupRemote:function(c,b){qilroy.popup.openPopup(b,"",true);$j.ajax({type:"GET",url:c,cache:false,dataType:"html",success:function(d){qilroy.popup.openPopup(b,d,false)},error:function(d){}})},openPopupPost:function(d,f,c){var b=$j(f);var e=b.formSerialize();qilroy.popup.openPopupPostData(d,e,c)},openPopupPostData:function(c,d,b){qilroy.popup.openPopup(b,"",true);$j.post(c,d,function(e){qilroy.popup.openPopup(b,e,false)})},openPopupError:function(c){debugOut("opening popup error");var b='<div><div class="popupTitle">An Error Occured</div><div class="popupBody"><div class="popupError">'+c+'<br><a href="javascript:void(0);" class="popupClose" onclick="qilroy.popup.closePopup(false, null, null);">close</a></div></div></div>';qilroy.popup.openPopup(300,b,false)},closePopup:function(b,c,e){var d=qilroy.popup.getInternalPopup();qilroy.popup.setPopupContent("");qilroy.popup.setBusyState(true);qilroy.popup.setPopupState(false);if(b&&b==true){window.location.reload()}if(c){window.location.href=c}if(e){e()}}};return a};
