var Messager={notifsInit:!1,currentPageNo:1,totalPages:1,timeout:500,closetimer:null,currentCell:null,isAdmin:!1,launchIconId:"imgNotfications",detailIframeWidth:480,detailIframeHeight:485,widthOffset:450,heightOffset:20,NotifyCount:null,txtPageNo:null,lblTotalPages:null,IcUrl:null,currentRowId:null,currentNewRowId:null,currentRowIndex:-1,currentRow:null,sortOn:"D",descending:!0,readLbl:null,currentPage:null,NotificationImage:null,NotifyMsg:"spanNotifiyMsg",intControls:!1,refreshFlag:!1,Init:function(){this.IcUrl=top.FaWeb.App.Path},NOTIF_IM_COLLECTION:"NOTIF_IM_COLLECTION",ShowNotifsList:function(n){this.launchIconId=n,this.getNotifications(),this.updateLastViewed()},Sort:function(n,t){this.sortOn==n?this.descending=!this.descending:(this.sortOn=n,this.descending=this.sortOn=="D"),$("#tblNotifsHdr").find("th").removeClass("sortDown sortUp"),this.descending?$(t).addClass("sortDown"):$(t).addClass("sortUp"),this.getNotifications(1)},updateLastViewed:function(){NotificationsAjax.setNotifLastViewedDate()},getNotifications:function(n){window.ajax_request&&(Messager.currentRowIndex=null,Messager.currentRow=null,this.InitNotifsList(),(n!=undefined||isNaN(n))&&(n=parseInt(n)),isNaN(n)&&(n=1),this.currentPageNo=n,NotificationsAjax.returnNotifications(n,this.sortOn,this.descending,this.refreshFlag,this.returnNotifications_CallBack),this.refreshFlag&&(this.refreshFlag=!1))},returnNotifications_CallBack:function(response){var JSON_text,json,autoScroll;response.error!=null||(JSON_text=response.value,json=eval(JSON_text),Messager.RenderNotifList(json),Messager.currentNewRowId!=null&&(Messager.currentRowIndex=Messager.GetIndexForRowId(Messager.currentNewRowId),Messager.currentNewRowId=null),Messager.currentRowIndex!=null?json!=null&&json.Messages!=null&&json.Messages[Messager.currentRowIndex]&&json.Messages[Messager.currentRowIndex].Type==Messager.NOTIF_IM_COLLECTION?Messager.Reply(json.Messages[Messager.currentRowIndex].RowId):(autoScroll=!0,Messager.ShowNotificatioDetail(Messager.currentRowIndex,autoScroll)):($("#tblNotifsBody").find("tr:first-child").length>0&&$("#tblNotifsBody").find("tr:first-child").get(0).scrollIntoView(!1),$("#"+Messager.NotificationImage).attr("src")==Messager.IcUrl+"/images/icon_alert3.gif"&&$("#"+Messager.NotificationImage).attr("src",Messager.IcUrl+"/images/icon_alert2.gif")),Messager.mopen("listNotifs"))},GetIndexForRowId:function(n){for(var i=null,t=0;t<Messager.currentPage.length;t++)if(Messager.currentPage[t].RowId==n){i=t;break}return i},RenderNotifList:function(n){var t=new top.cash.StringBuilder,i;if(t.Append("<tbody id='tblNotifsBody'>"),n.ItemCount>0){for(Messager.currentPage=n.Messages,i=0;i<n.ItemCount;i++)t.Append("<tr style='height:18px;cursor:pointer;' class='hover "),t.Append(i%2==0?"even":"odd"),n.Messages[i].Type==Messager.NOTIF_IM_COLLECTION?(t.Append("' onclick='Messager.Reply("),t.Append(n.Messages[i].RowId),t.Append("); return false;'")):(t.Append("' onclick=\"Messager.ShowNotificatioDetail("),t.Append(i),t.Append(');"')),t.Append(" id='"),t.Append(n.Messages[i].RowId),t.Append("_UDATEROW'>"),t.Append("<td onclick=\"Messager.toggleReadFlag('"),t.Append(n.Messages[i].RowId),t.Append("', this);return false;\"> "),n.Messages[i].Read||(t.Append("<img src='"),t.Append(Messager.IcUrl),t.Append("/images/flag_red.gif'/>")),t.Append("<\/td>"),t.Append("<td nowrap='nowrap'>"),t.Append(Convert.DateByString.toClient(n.Messages[i].SentDT,Convert.ValidationTypes.datetime)),t.Append("<\/td>"),t.Append("<td>"),t.Append(n.Messages[i].Subject),t.Append("<\/td>"),t.Append("<\/tr>");Messager.totalPages=n.TotalPages,Messager.currentPageNo=n.PageNo,Messager.currentPageNo>=Messager.totalPages?($("#notifPageRightOne").prop("disabled",!0),$("#notifPageRightOne").attr("title",""),$("#notifPageRightEnd").prop("disabled",!0),$("#notifPageRightEnd").attr("title","")):($("#notifPageRightOne").prop("disabled",!1),$("#notifPageRightOne").attr("title","Move Forward"),$("#notifPageRightEnd").prop("disabled",!1),$("#notifPageRightEnd").attr("title","Move To Last Page")),Messager.currentPageNo==1?($("#notifPageLeftEnd").prop("disabled",!0),$("#notifPageLeftEnd").attr("title",""),$("#notifPageLeftOne").prop("disabled",!0),$("#notifPageLeftOne").attr("title","")):($("#notifPageLeftEnd").prop("disabled",!1),$("#notifPageLeftEnd").attr("title","Move To First Page"),$("#notifPageLeftOne").prop("disabled",!1),$("#notifPageLeftOne").attr("title","Move Back")),Messager.txtPageNo.val(Messager.currentPageNo),Messager.lblTotalPages.text(Messager.totalPages)}t.Append("<\/tbody>"),$("#tblNotifsBody").remove(),$("#tblNotifsHdr").after(t.ToString()),Messager.tempSelectLastRow?(Messager.tempSelectLastRow=!1,Messager.currentRowIndex=Messager.currentPage.length-1):Messager.tempSelectFirstRow&&(Messager.tempSelectFirstRow=!1,Messager.currentRowIndex=0),Messager.NotifyCount.text(n.TotalCount)},refreshList:function(){$("#tableDiv").html("<table align='left'><tr><td>Retreving Messages....<\/td><\/tr><\/table>"),this.getNotifications()},ShowNotificatioRulesDialog:function(n,t){var i=this.IcUrl+"/FANotification/NotificationPortalCfgPopin.aspx?Mid=7&NOTIFY_TYPE="+n;t&&(i=i+"&newRule=Y"),$("#portalBannerDialogFrame").width(840).height(430),$("#portalBannerMsgDialog").dialog("open"),$("#portalBannerDialogFrame").attr("src",i)},toggleReadFlag:function(n,t){t.innerHTML.length==0?this.flagAsUnread(n):this.flagAsRead(n)},ToggleReadVal:function(n){this.readLbl!=null&&this.readLbl.text(n),n=="Y"?$(".local_flag_read_unread").css("visibility","hidden"):$(".local_flag_read_unread").css("visibility","")},flagAsRead:function(n){NotificationsAjax.flagAsRead(n,this.flagAsRead_CallBack)},flagAsRead_CallBack:function(response){if(response.error==null&&!(response.length>0)&&response.value.length>0){var JSON_text=response.value,json=eval(JSON_text);Messager.updateImagesRead(json.rowId),Messager.currentRowId==json.rowId&&Messager.ToggleReadVal("Y"),Messager.changeIconImage(json.index)}},flagAsUnread:function(n){NotificationsAjax.flagAsUnread(n,this.flagAsUnread_CallBack)},flagAsUnread_CallBack:function(response){if(response.error==null&&!(response.length>0)&&response.value.length>0){var JSON_text=response.value,json=eval(JSON_text);if(json.flagChange=="false")return;Messager.updateImagesUnread(json.rowId),Messager.currentRowId==json.rowId&&Messager.ToggleReadVal("N")}try{top.$("#"+Messager.NotificationImage).attr("src")!=Messager.IcUrl+"/images/icon_alert2.gif"&&top.$("#"+Messager.NotificationImage).attr("src",Messager.IcUrl+"/images/icon_alert2.gif")}catch(e){}},Next:function(){if(this.currentRowIndex>-1)if(this.currentRowIndex>=this.currentPage.length-1)this.currentPageNo<this.totalPages&&(this.tempSelectFirstRow=!0,this.currentPageNo++,this.getNotifications(this.currentPageNo));else{var n=!0;this.ShowNotificatioDetail(this.currentRowIndex+1,n)}},Prev:function(){if(this.currentRowIndex>-1){if(this.currentPageNo==1&&this.currentRowIndex==0)return;if(this.currentPageNo>1&&this.currentRowIndex==0)this.tempSelectLastRow=!0,this.currentPageNo--,this.getNotifications(this.currentPageNo);else{var n=!0;this.ShowNotificatioDetail(this.currentRowIndex-1,n)}}},ShowNotificatioDetail:function(n,t){var i=this.currentPage[n].RowId,u,r;this.currentRowId=i,this.currentRowIndex=n,this.setActiveRow(i),u=this.IcUrl+"/FANotification/NotificationMsgPopin.aspx?rid="+i+"&Mid=-101&rowIndex="+(n+1),$("#msgDetailIframe").width(this.detailIframeWidth).height(this.detailIframeHeight),$("#msgDetailIframe").attr("src",u),r=$("#divMsgDetail"),r.dialog("open"),this.InitDetailActions||(r.dialog("option","title",$("#notifActions").html()),this.InitDetailActions=!0),this.currentRowIndex==0&&this.currentPageNo==1?$(".notif_back_nav").attr("src",this.IcUrl+"/images/arrow-up-disabled.gif").css("cursor","").prop("disabled",!0):$(".notif_back_nav").attr("src",this.IcUrl+"/images/arrow-up.gif").css("cursor","pointer").prop("disabled",!1),this.currentRowIndex>=this.currentPage.length-1&&this.currentPageNo==this.totalPages?$(".notif_fwd_nav").attr("src",this.IcUrl+"/images/arrow-down-disabled.gif").css("cursor","").prop("disabled",!0):$(".notif_fwd_nav").attr("src",this.IcUrl+"/images/arrow-down.gif").css("cursor","pointer").prop("disabled",!1),t&&document.getElementById(Messager.currentRowId+"_UDATEROW").scrollIntoView(!1)},OpenSettings:function(){window.location.href=top.cash.applicationPath+"/FANotification/EditNotificationPortalPopin.aspx"},InitNotifsList:function(){var n,i,t;this.notifsInit||(n=jQuery("#"+this.launchIconId).offset(),i=$("#notifTitle").html(),$("#notifTitle").remove(),$("#listNotifs").dialog({autoOpen:!0,bgiframe:!0,closeOnEscape:!0,title:i+(this.isAdmin?"&nbsp;&nbsp;<img src='"+top.cash.applicationPath+"/images/edit.gif' onclick='Messager.OpenSettings();' title='Options' style='cursor:pointer;'/>":""),resizable:!1,modal:!1,width:"auto",height:"auto",draggable:!1,position:[n.left,n.top+this.heightOffset]}).bind("dialogclose",function(){}).parent().mouseout(function(){Messager.mclosetime()}).mouseover(function(){Messager.mcancelclosetime()}),t=$("#divMsgDetail"),t.length==0&&(t=$('<div id="divMsgDetail" style="margin: 0px; padding: 0px;"><iframe id="msgDetailIframe" marginwidth="0" frameborder="0" style="border: 0px; padding: 0px; margin: 0px;"><\/iframe><\/div>').appendTo(document.body)),t.dialog({autoOpen:!1,closeOnEscape:!0,title:"",resizable:!1,modal:!1,width:"auto",height:"auto",draggable:!1,position:[n.left+this.widthOffset+6,n.top+this.heightOffset]}).parent().mouseout(function(){Messager.mclosetime()}).mouseover(function(){Messager.mcancelclosetime()}),InitNotifControls(),$("#portalBannerMsgDialog").dialog({autoOpen:!1,bgiframe:!0,closeOnEscape:!1,title:Messager.btnNotifRules.attr("title"),resizable:!1,modal:!0,width:"855px",height:"auto",draggable:!1}),$("#portalBannerMsgDialog").bind("dialogbeforeclose",function(){}),$("#portalBannerMsgDialog").bind("dialogclose",function(){try{$("#portalBannerDialogFrame")[0].contentWindow.document.body.innerHTML=""}catch(i){}try{$(document)[0].body.focus()}catch(r){}}),$("#NotifySendMsgDialog").dialog({autoOpen:!1,bgiframe:!0,closeOnEscape:!1,title:"Messenger",resizable:!1,modal:!1,width:"auto",height:"auto",draggable:!0}),$("#NotifySendMsgDialog").bind("dialogclose",Messager.CloseSendPopInMsg).bind("dialogbeforeclose",function(){var i=$("#NotifySendMsgDialogFrame")[0].contentWindow;if(i.$&&i.$("#txtDirtyFlag").val().length>0)return window.confirm(top.cash.GetString(top.cash.Strings.LOSE_UNSAVED_CHANGES))}),this.notifsInit=!0)},mopen:function(){try{top.EPBanner.HideMenuFavs()}catch(i){}try{UserProfile.HidePrefs()}catch(r){}try{AdminLink.HideMenu()}catch(u){}this.InitNotifsList(),this.mcancelclosetime(),jQuery("#listNotifs").dialog("open");var t=jQuery("#"+this.launchIconId).offset();jQuery("#listNotifs").dialog("option","position",[t.left,t.top+this.heightOffset])},getposOffset:function(n,t){for(var r=t=="left"?n.offsetLeft:n.offsetTop,i=n.offsetParent;i!=null;)r=t=="left"?r+i.offsetLeft:r+i.offsetTop,i=i.offsetParent;return r},mclose:function(){try{$("#divMsgDetail").dialog("close")}catch(n){}try{$("#listNotifs").dialog("close")}catch(n){}},updateImagesRead:function(n){try{$("#"+n+"_UDATEROW").find("td:first-child").html("")}catch(t){}},updateImagesUnread:function(n){try{$("#"+n+"_UDATEROW").find("td:first-child").html("<img src='"+this.IcUrl+"/images/flag_red.gif' />")}catch(t){}},setActiveRow:function(n){try{this.currentRow=$("#"+n+"_UDATEROW"),this.removeSelectedClass(),this.currentRow.addClass("selectedRow")}catch(t){}},removeSelectedClass:function(){var n=$("#tblNotifsBody").find(".selectedRow").removeClass("selectedRow")},closeDetail:function(n){$("#divMsgDetail").dialog("close"),n&&this.mclosetime(),this.removeSelectedClass()},mclosetime:function(){this.closetimer=window.setTimeout(this.mclose,this.timeout)},mcancelclosetime:function(){this.closetimer!=null&&(window.clearTimeout(this.closetimer),this.closetimer=null)},openInSeparateWindow:function(){var t=this.IcUrl+"/FANotification/NotificationMsgPopin.aspx?rid="+this.currentRowId+"&Mid=-101&openInSeparateWindow=true&page="+this.currentPageNo,i="notifs_window";winObj=window.open(t,i,"width=472,height=666,top=80, left=160,resizable=no"),winObj.focus(),winObj.cash=winObj,this.closeDetail(!0)},displayMsg:function(n,t){var r,u;(Messager.intControls==undefined||Messager.intControls==!1)&&(InitNotifControls(),Messager.intControls=!0);var f="<a href='#' onclick='Messager.currentNewRowId = "+t+';  Messager.ShowNotifsList("imgNotfications"); $("#spanNotifiyMsg").hide(); \' style=\'color:#000;\'>'+n+"<\/a>",e=window.location.protocol+"//"+window.location.host+top.cash.applicationPath,o=e+"/FANotification/NotificationMsgPopin.aspx?rid="+t+"&Mid=-101&rowIndex=1",i=$("#"+Messager.NotifyMsg);i.length==0&&(i=$('<div id="spanNotifiyMsg" class="notificationStyle"><\/div>').appendTo(document.body)),r=document.getElementById(Messager.NotificationImage),i.html(f),i.fadeIn("slow"),u=document.body.scrollTop+12,i[0].style.top=Messager.getposOffset(r,"top")-(r.style.top-r.offsetHeight)-3+u+"px",setTimeout(Messager.hideMsg,6e3)},hideMsg:function(){(Messager.intControls==undefined||Messager.intControls==!1)&&(InitNotifControls(),Messager.intControls=!0),$("#"+Messager.NotifyMsg).fadeOut("slow")},changeIconImage:function(n){(Messager.intControls==undefined||Messager.intControls==!1)&&(InitNotifControls(),Messager.intControls=!0);try{n==1?top.$("#"+Messager.NotificationImage).attr("src",Messager.IcUrl+"/images/icon_alert1.gif"):n==2?top.$("#"+Messager.NotificationImage).attr("src",Messager.IcUrl+"/images/icon_alert2.gif"):n==3&&top.$("#"+Messager.NotificationImage).attr("src",Messager.IcUrl+"/images/icon_alert3.gif")}catch(t){}},Reply:function(n){var t=top.FaWeb.App.Path+"/FANotification/NotificationSendMsgPopin.aspx?MsgRowID="+n;this.flagAsRead(n),$("#NotifySendMsgDialog").dialog("open"),$("#NotifySendMsgDialogFrame").attr("src",t)},NewMessage:function(){var n=top.FaWeb.App.Path+"/FANotification/NotificationSendMsgPopin.aspx";$("#NotifySendMsgDialog").dialog("open"),$("#NotifySendMsgDialogFrame").attr("src",n)},CloseNewMessage:function(){$("#NotifySendMsgDialog").dialog("close")},CloseSendPopInMsg:function(){try{$("#NotifySendMsgDialogFrame")[0].contentWindow.SendMsgPopin.closeIM()}catch(n){}try{$("#NotifySendMsgDialogFrame")[0].contentWindow.document.body.innerHTML=""}catch(t){}try{$(document)[0].body.focus()}catch(i){}},ResetPinger:function(n){top.Pinger&&(top.Pinger.pingIntervalMs=n,top.Pinger.Reset())}};(function(){Messager.Init()})();var PortalBanner={Reporting:{favsInit:!1,heightOffset:20,widthOffset:310,widthOffsetFull:690,launchIconId:"Banner_epstar",isAdmin:!1,closed:!0,refreshMenu:!1,refreshHistory:!1,CrystalImageUrl:"../images/Crystal.gif",QueryImageUrl:"../images/document.png",ExternalReportService:"",ShowReportingMenu:function(n){var i,t,r,u,f;try{top.home.Messager.mclose()}catch(e){}try{top.home.UserProfile.HidePrefs()}catch(o){}try{top.home.AdminLink.HideMenu()}catch(e){}if(i=!1,this.favsInit)i=!0,menuReportFavsFrame&&menuReportFavsFrame.$("#ddSort").val()=="Most Recent"&&menuReportFavsFrame.$("#btnUpdateSort").click(),PortalBanner.Reporting.refreshMenu&&(PortalBanner.Reporting.refreshMenu=!1,PortalBanner.Reporting.ExternalReportService.length>0?$("#menuReportFullFrame").attr("src",PortalBanner.GetAppPath()+"/ReportingExternal/ReportMenuPopIn.aspx"):$("#menuReportFullFrame").attr("src",PortalBanner.GetAppPath()+"/SharedContent/ReportMenuPopIn.aspx")),PortalBanner.Reporting.refreshHistory&&(PortalBanner.Reporting.refreshHistory=!1,PortalBanner.Reporting.ExternalReportService.length>0?$("#menuReportFavsFrame").attr("src",PortalBanner.GetAppPath()+"/ReportingExternal/ReportHistoryPopIn.aspx"):$("#menuReportFavsFrame").attr("src",PortalBanner.GetAppPath()+"/SharedContent/ReportHistoryPopIn.aspx"));else{this.launchIconId=n,$(document.body).append("<div id='menuReportFavs' style='display:none;'><\/div>"),$("#menuReportFavs").html("<div style='display:inline-block;'><iframe id='menuReportFavsFrame' name='menuReportFavsFrame' frameborder='0' style='margin:0; padding:0; border:0; width:350px;height:470px;'><\/iframe><\/div>"),$("#menuReportFavs").append("<div style='display:inline-block;'><iframe scrolling='no' id='menuReportFullFrame' name='menuReportFullFrame' frameborder='0' style='margin: 0; border:0; padding:0;width:370px;height:470px;'><\/iframe><\/div>"),setTimeout(function(){PortalBanner.Reporting.ExternalReportService.length>0?($("#menuReportFavsFrame").attr("src",PortalBanner.GetAppPath()+"/ReportingExternal/ReportHistoryPopIn.aspx"),$("#menuReportFullFrame").attr("src",PortalBanner.GetAppPath()+"/ReportingExternal/ReportMenuPopIn.aspx")):($("#menuReportFavsFrame").attr("src",PortalBanner.GetAppPath()+"/SharedContent/ReportHistoryPopIn.aspx"),$("#menuReportFullFrame").attr("src",PortalBanner.GetAppPath()+"/SharedContent/ReportMenuPopIn.aspx"))},0);try{$("#menuReportFullFrame")[0].contentWindow.$("#txtSearch").focus(),setTimeout(function(){try{$("#menuReportFullFrame")[0].contentWindow.$("#txtSearch").val(top.GetString(top.Strings.SEARCH)).select()}catch(n){}},0)}catch(e){}this.favsInit=!0,t=null,this.launchIconId&&(t=top.home.$("#"+this.launchIconId).offset()),r=!0,u=null,t==null?(t={left:100,top:20},r=!0):u=[10,t.top+PortalBanner.Reporting.heightOffset],f=top.Strings.REPORTS,$("#menuReportFavs").dialog({autoOpen:!1,closeOnEscape:!0,title:f,resizable:!1,modal:r,width:"auto",height:"auto",draggable:!1,position:u}).bind("dialogclose",function(){try{var i=$("#menuReportFullFrame")[0].contentWindow.$("#txtSearch")[0];$("#menuReportFullFrame")[0].contentWindow.document.activeElement==i&&$("#menuReportFullFrame")[0].contentWindow.document.activeElement.blur()}catch(r){}try{top.$("#screen_window_list").remove()}catch(u){}PortalBanner.Reporting.closed=!0})}jQuery("#menuReportFavs").dialog("open"),i&&setTimeout(function(){$("#menuReportFullFrame")[0].contentWindow.$("#txtSearch").trigger("focus",[!0]).trigger("select",[!0])},0),this.closed=!1}},RefreshMenu:function(){PortalBanner.Reporting.ExternalReportService.length>0?$("#menuReportFullFrame").attr("src",PortalBanner.GetAppPath()+"/ReportingExternal/ReportMenuPopIn.aspx"):$("#menuReportFullFrame").attr("src",PortalBanner.GetAppPath()+"/SharedContent/ReportMenuPopIn.aspx")},HideReportDialog:function(){this.closed||jQuery("#menuReportFavs").dialog("close")},HideReportDetailDialog:function(){try{jQuery("#menuReportDetail").dialog("close")}catch(n){}},GetAppPath:function(){return top.applicationPath?top.applicationPath:".."},OpenWindow:function(n){var t=top.cash.applicationPath+"/FAQuery/ReportDesigner.aspx?",i;return t+=n!=""?"rn="+n:"clear=1&tab=Data+Sources",t+="&nohdr=Y",i="toolbar=no, status=no, resizable=yes, scrollbars=1",window.open(t,"_blank",i),PortalBanner.HideReportDialog(),!1},LaunchReportWindow:function(n,t){var i="",u="",r=top.home.PortalBanner.Reporting.ExternalReportService,f,e;return i=r.length>0&&n==="Crystal"?r:top.cash.applicationPath,n==="Crystal"?(i+="/Reporting/ReportViewer.aspx?ReportName="+encodeURIComponent(t),u="status=no, resizable=yes, toolbar=no, scrollbars=1"):(i+="/FAQuery/ReportViewer.aspx?rn="+encodeURIComponent(t)+"&nohdr=Y",u="status=no, resizable=yes, toolbar=no, scrollbars=1"),i+="&useAssetChooser="+PortalBanner.Reporting.UseAssetChooser,r.length>0&&n==="Crystal"?(f=JSON.stringify({UseReportWindow:"true",Url:i,RptCreator:"false"}),Utils.SetAuthToken(f,!0,r,t)):e=top.WindowManager.OpenReport(i,t,u),top.home.PortalBanner.HideReportDialog(),top.home.PortalBanner.Reporting.refreshHistory=!0,!1},LaunchCrystalReport:function(n){var t,i,r;return top.home.PortalBanner.HideReportDialog(),top.home.PortalBanner.HideReportDetailDialog(),t="",PortalBanner.Reporting.ExternalReportService.length>0?(t=PortalBanner.Reporting.ExternalReportService+"/Reporting/ReportViewer.aspx?ReportName="+encodeURIComponent(n),t+=PortalBanner.Reporting.UseAssetChooser,i='{"UseReportWindow": "true", "Url": "'+t+'", "RptCreator": "false"}',Utils.SetAuthToken(i,!0,PortalBanner.Reporting.ExternalReportService)):(t=PortalBanner.GetAppPath()+"/Reporting/ReportViewer.aspx?ReportName="+encodeURIComponent(n),t+=PortalBanner.Reporting.UseAssetChooser,r=top.WindowManager.OpenReport(t,"RptViewer","status=no, resizable=yes,scrollbars=1")),!1},WireUpReportDetailPopin:function(n,t){$(document.body).append("<div id='menuReportDetail' style='display:none;'><\/div>"),$("#menuReportDetail").html("<iframe id='menuReportDetailFrame' name='menuReportDetailFrame' frameborder='0' style='margin:0; padding:0; border:0; width:650px;height:300px;'><\/iframe>"),setTimeout(function(){$("#menuReportDetailFrame").attr("src",(PortalBanner.Reporting.ExternalReportService.length>0?top.home.PortalBanner.Reporting.ExternalReportService+"/Reporting":PortalBanner.GetAppPath()+"/Reporting")+"/ReportInfo.aspx?ReportName="+t+"&mode=dialog")},0),$("#menuReportDetail").append('<div style="margin-left: 27px; margin-bottom: 5px; "><a style="font-weight: bold;color: white;" class="actionbutton fac" href="javascript:;" onclick="top.home.$(\'#menuReportDetail\').dialog(\'close\');">Back<\/a><a style="font-weight: bold;color: white;" class="actionbutton fac" href="javascript:;" onclick="top.home.PortalBanner.LaunchCrystalReport(\''+t+"');top.home.$('#menuReportDetail').dialog('close'); return false;\" >View<\/a><\/div>");var r=!0,u=null,f=top.Strings.EDIT_REPORT_DETAIL;$("#menuReportDetail").dialog({autoOpen:!1,closeOnEscape:!0,title:f,resizable:!1,modal:r,width:"auto",height:"auto",draggable:!1,position:u}).bind("dialogclose",function(){try{var i=$("#menuReportDetailFrame")[0].contentWindow.$("#txtSearch")[0];$("#menuReportDetailFrame")[0].contentWindow.document.activeElement==i&&$("#menuReportDetailFrame")[0].contentWindow.document.activeElement.blur()}catch(r){}try{top.$("#screen_window_list").remove()}catch(u){}PortalBanner.Reporting.closed=!0}),jQuery("#menuReportDetail").dialog("open")}},ChangePassPinLink={launchIconId:null,initialized:!1,hideTimerID:null,suspendTimer:!1,ChangePassword:function(){var n=top.cash.applicationPath+"/desktopmodules/changepassword.aspx";window.location=n},ChangePin:function(){var n=top.cash.applicationPath+"/desktopmodules/changepin.aspx";window.location=n},ShowMenu:function(n){try{Messager.mclose()}catch(i){}try{top.EPBanner.HideMenuFavs()}catch(r){}try{UserProfile.HidePrefs()}catch(u){}if(this.initialized)$("#changePassPinMenu").show();else{var t=$("#"+n).position();$("#changePassPinMenu").mouseout(function(){ChangePassPinLink.StartHideTimer()}).mouseover(function(){ChangePassPinLink.suspendTimer=!1,ChangePassPinLink.hideTimerID>-1&&(clearTimeout(ChangePassPinLink.hideTimerID),ChangePassPinLink.hideTimerID=-1)}).css("top",t.top+22+"px").css("left",t.left+"px").find("li").mouseover(function(){$(this).addClass("changepasspinmenuhover")}).mouseout(function(){$(this).removeClass("changepasspinmenuhover")}),this.initialized=!0,$("#changePassPinMenu").show()}},HideMenu:function(){$("#changePassPinMenu").hide(),clearTimeout(ChangePassPinLink.hideTimerID),ChangePassPinLink.hideTimerID=-1},StartHideTimer:function(n){n==undefined&&(n=501),clearTimeout(this.hideTimerID),this.suspendTimer||(this.hideTimerID=setTimeout(function(){try{ChangePassPinLink.HideMenu()}catch(n){ChangePassPinLink.StartHideTimer()}},n))}},AdminLink={launchIconId:null,initialized:!1,hideTimerID:null,suspendTimer:!1,ViewLogs:function(){var n=top.cash.applicationPath+"/tools/logfileviewer.aspx";window.open(n)},OpenScreenLauncher:function(){top.openEPWindow("Screen Launcher",3031,null,null,null,null)},ConfirmVersion:function(){var n=top.cash.applicationPath+"/tools/faversion.aspx";window.open(n)},HealthCheck:function(){var n=top.cash.applicationPath+"/utils/healthcheck.aspx";window.open(n)},AdminCenter:function(){var n=top.cash.applicationPath+"/utils/InfoCenterAdmin.aspx";window.location=n,top.home.ShowProcessingDialog(!0)},ShowMenu:function(n){try{Messager.mclose()}catch(i){}try{top.EPBanner.HideMenuFavs()}catch(r){}try{UserProfile.HidePrefs()}catch(u){}if(this.initialized)$("#adminMenu").show();else{var t=$("#"+n).position();$("#adminMenu").mouseout(function(){AdminLink.StartHideTimer()}).mouseover(function(){AdminLink.suspendTimer=!1,AdminLink.hideTimerID>-1&&(clearTimeout(AdminLink.hideTimerID),AdminLink.hideTimerID=-1)}).css("top",t.top+22+"px").css("left",t.left+"px").find("li").mouseover(function(){$(this).addClass("adminmenuhover")}).mouseout(function(){$(this).removeClass("adminmenuhover")}),this.initialized=!0,$("#adminMenu").show()}},HideMenu:function(){$("#adminMenu").hide(),clearTimeout(AdminLink.hideTimerID),AdminLink.hideTimerID=-1},StartHideTimer:function(n){n==undefined&&(n=501),clearTimeout(this.hideTimerID),this.suspendTimer||(this.hideTimerID=setTimeout(function(){try{AdminLink.HideMenu()}catch(n){AdminLink.StartHideTimer()}},n))}},ScrollTabs={scrollIntoViewIfOutOfView:function(n){var u=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=0,r=0,t;if(document.layers)i=n.x,r=n.width;else{for(t=n;t&&t.tagName!="BODY";t=t.offsetParent)i+=t.offsetLeft;r=n.offsetWidth}u+f<i+r?n.scrollIntoView(!1):i<u&&n.scrollIntoView(!0);try{document.body.scrollLeft=0,document.documentElement.scrollLeft=0}catch(e){}},ScrollToCurrentTab:function(){setTimeout(function(){var n=$(".selected","#portal_header_tabs");n.length===1&&ScrollTabs.scrollIntoViewIfOutOfView(n[0])},20)},PrepareTabs:function(){$("#portal_header_tabs").children().click(function(){ShowProcessingDialog(!0);try{top.EPBanner.HideMenuFavs()}catch(n){}}),ScrollTabs.ScrollToCurrentTab()}};jQuery(document).ready(function(){$("#spanNotifiyMsg").hide(),$("#processing").dialog({modal:!1,autoOpen:!1,closeOnEscape:!1,title:lblWorkingTitle.text(),zIndex:1e6,resizable:!1,width:"400px",height:"auto",draggable:!1}),ScrollTabs.PrepareTabs(),top.UICtrlMode?EnableShowUiControlMode_Callback():DisableShowUiControlMode_Callback(),(top.FaWeb&&top.FaWeb.User&&top.FaWeb.User.FASessionAuthenticated||top.Environment&&top.Environment.isAuth)&&$("#AW_IC_LOGO").contextMenu({menu:"showUIMenu"},function(n){n=="showUI"?$("#showUIOption").hasClass("checked")||AjaxUtils.EnableShowUiControlMode(EnableShowUiControlMode_Callback):n=="hideUI"&&($("#hideUIOption").hasClass("checked")||AjaxUtils.DisableShowUiControlMode(DisableShowUiControlMode_Callback))})})