var timeoutSearch="";Ext.define("triggerComobo",{extend:"Ext.form.field.ComboBox",alias:"widget.triggercomobo",initComponent:function(){var a=this;a.callParent();},createPicker:function(){var c=this,b,a=Ext.apply({xtype:"boundlist",pickerField:c,alignTo:function(e,d,f){this.setPagePosition(this.el.getAlignToXY(e.el||e,"tl-bl?",[0,0]));
return this;},selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);b=c.picker=Ext.widget(a);if(c.pageSize){b.pagingToolbar.on("beforechange",c.onPageChange,c);
}c.mon(b,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(b.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return b;}});Ext.define("egindex.view.LogoTabset",{extend:"Ext.panel.Panel",alias:"widget.logotabset",requires:["egindex.view.Tabset","egindex.view.QuicklinkProfile","egindex.view.QuicklinkMenuItem","egindex.view.QuickAlarm","egindex.view.SwitchUserProfileCombo","egindex.view.UtilityReport"],height:38,id:"logotabset",bodyPadding:"0",bodyStyle:"overflow:visible",style:{"overflow":"visible"},border:false,frame:false,layout:{type:"hbox",align:"center",pack:"start"},items:[{xtype:"container",width:650,layout:{type:"hbox",pack:"start"},items:[{xtype:"container",html:'<img id="logoImg" src="'+logoImageName+"?_dc="+new Date()+'" border="0" />',margin:0,padding:"2 12 2 12",height:38,frame:false,width:129,style:{"border":"0px solid red"}},{xtype:"tabset",margin:0,height:38,bodyStyle:"overflow:visible",frame:false,bodyPadding:"0",layout:{type:"hbox",align:"left",pack:"start"}}]},{xtype:"container",flex:1,margin:"6 0 0 0",layout:{type:"hbox",align:"middle",pack:"center"},items:[{xtype:"trigger",flex:1,minWidth:50,maxWidth:500,ui:"eg-newsearch-combo inputSearchIcon",id:"egcommonsearch",name:"egcommonsearch",emptyText:searchLbl,hidden:hideSearch,enableKeyEvents:true,onTrigger1Click:function(){this.reset();
}}]},{xtype:"container",border:true,layout:{type:"hbox",align:"center",pack:"end"},width:240,margin:"7 0 0 0",items:[{xtype:"container",border:true,margin:"1 8 0 0",parentContainer:false,width:230,style:{"overflow":"hidden !important"},id:"searchcontainer",style:{"display":"none"},layout:{type:"table"},items:[{xtype:"triggercomobo",ui:"eg-new-combo",cls:"inputSearchIcon",id:"searchCombo",name:"searchCombo",width:115,defaultListConfig:{loadingHeight:70,minWidth:110,maxHeight:300,shadow:"sides"},hidden:hideSearch,editable:false,value:selectedSearchCombo.toLowerCase(),store:Ext.create("Ext.data.Store",{fields:["value","name"],data:userSearchCombo,}),displayField:"name",valueField:"value",listeners:{change:function(){if(!Ext.isEmpty(Ext.getCmp("egsearches"))&&Ext.getCmp("egsearches")!=null&&Ext.getCmp("egsearches")!=undefined){Ext.getCmp("egsearches").setValue("");
}Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:false});Ext.getCmp("egsearches").focus(true,10);this.fireEvent("blur",this);},expand:function(){Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:false});clearTimeout(timeoutSearch);},collapse:function(){Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:false});
clearTimeout(timeoutSearch);Ext.getCmp("egsearches").focus(true,10);},focus:function(){clearTimeout(timeoutSearch);Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:false});},blur:function(){clearTimeout(timeoutSearch);Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:false});}}},{xtype:"tbseparator",cls:"topnavigation_seperator for_switch",margin:"-6px 0 0 -2",},{xtype:"trigger",labelAlign:"top",width:115,flex:1,id:"egsearches",hideTrigger:false,name:"egsearches",enableKeyEvents:true,emptyText:searchLbl,ui:"eg-new-combo-search",padding:"0 8 0 0",hideTrigger:false,hidden:hideSearch,listeners:{specialkey:function(b,a){if(a.getKey()==a.ESC){this.fireEvent("blur",this);
}},focus:function(a){Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:false});clearTimeout(timeoutSearch);Ext.getCmp("searchCombo").fireEvent("blur",Ext.getCmp("searchCombo"));Ext.getCmp("searchcontainer").el.stopAnimation();if(Ext.getCmp("searchcontainer").parentContainer==false){Ext.getCmp("searchcontainer").show();
}},blur:function(a){Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:true});if(Ext.getCmp("searchcontainer").parentContainer==true){timeoutSearch=Ext.defer(function(){a.onTriggerClick(a);Ext.getCmp("searchcontainer").el.setStyle({"display":"none"});Ext.getCmp("iconsContainer").show();if(!Ext.isEmpty(a.triggerEl)){Ext.fly(a.triggerEl.elements[0].dom).setStyle("background-image","none");
}},250);Ext.apply(Ext.getCmp("searchcontainer"),{parentContainer:false});}a.setValue("");Ext.getCmp("searchcontainer").el.stopAnimation();},closeSearch:function(b){var a=this;b.onTriggerClick(b);Ext.getCmp("searchcontainer").el.setStyle({"display":"none"});Ext.getCmp("iconsContainer").show();Ext.getCmp("iconsContainer").doComponentLayout();
Ext.getCmp("searchcontainer").el.stopAnimation();},afterrender:function(a){Ext.fly(a.triggerEl.elements[0].dom).setStyle("background-image","none");}},onTriggerClick:function(a){Ext.getCmp("egsearches").setValue("");Ext.getCmp("egsearches").focus(true,10);}}]},{xtype:"container",id:"renderHereToolTip",cls:"for_switch",hidden:hiddenUserProfile},{xtype:"container",border:true,padding:"0 8 0 0",id:"iconsContainer",layout:{type:"table",align:"stretch"},items:[{xtype:"container",margin:"4 0 0 0",cls:"for_switch",id:"userprofile",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,id:"userprofile_tooltip",cls:"new_yellowTip",html:"User"});
}},bodyPadding:"0",frame:false},{xtype:"tbseparator",cls:"topnavigation_seperator for_switch",margin:"5 3 0 3",hidden:false,},{xtype:"container",margin:"4 0 0 0",padding:"0",id:"quicklinks",cls:"for_switch",hidden:(hideInAv_SuperManager)?true:hideQuickLink,listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,id:"quicklinks_tooltip",cls:"new_yellowTip",html:"Quick Links"});
}},bodyPadding:"0",frame:false},{xtype:"tbseparator",cls:"topnavigation_seperator for_switch",margin:"5 3 0 3",hidden:(hideInAv_SuperManager)?true:hideQuickLink,},{xtype:"container",margin:"4 0 0 0",id:"notifications",cls:"for_switch",hidden:hideInAv_SuperManager,bodyPadding:"0",frame:false},{xtype:"tbseparator",cls:"topnavigation_seperator for_switch",margin:"5 3 0 3",hidden:hideInAv_SuperManager},{xtype:"container",margin:"4 0 0 0",id:"quickalarms",cls:"for_switch",style:{"position":"relative"},hidden:(hideInAv_SuperManager)?true:hideQuickAlert,items:[{xtype:"box",id:"quickalarms_pop",style:{"position":"absolute","top":"20px","left":"8px;"}}],bodyPadding:"0",frame:false},{xtype:"tbseparator",cls:"topnavigation_seperator for_switch",margin:"5 3 0 3",hidden:(hideInAv_SuperManager)?true:hideQuickAlert},{xtype:"container",margin:"4 0 0 0",html:'<a href="javascript:void(0)" class="indexTopLink"><div  class="topnavigation_downloadagents"  style="float:left"></div></a>',padding:"0",id:"downloadagent",cls:"for_switch",hidden:(hideInAv_SuperManager)?true:hideDownloadAgent,listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,id:"downloadagent_tooltip",cls:"new_yellowTip",html:downloadAgentMsg});
}},bodyPadding:"0",frame:false},{xtype:"tbseparator",cls:"topnavigation_seperator for_switch",margin:"5 3 0 3",hidden:(hideInAv_SuperManager)?true:hideDownloadAgent},{xtype:"container",html:'<a href="javascript:void(0)" class="indexTopLink"><div  class="topnavigation_userswitch"  style="float:left"></div></a>',margin:"4 0 0 0",id:"switchUser",cls:"for_switch",hidden:(hideInAv_SuperManager)?true:hideSwitchUser,listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,id:"switchUser_tooltip",cls:"new_yellowTip",trackMouse:true,html:switchProfileMsg});
}},bodyPadding:"0",frame:false},{xtype:"switchuserprofilecombo",width:310,margin:"0 3 0 3",cls:"x-hidden"},{xtype:"tbseparator",cls:"topnavigation_seperator ",margin:"5 3 0 3",id:"switchuserseparator",hidden:(hideInAv_SuperManager)?true:hideSwitchUser,},{xtype:"container",margin:"4 0 0 0",cls:"for_switch",id:"utilities",style:{"position":"relative"},items:[{xtype:"box",id:"utilities_popup",style:{"position":"absolute","top":"20px","left":"8px;"}}],hidden:(hideInAv_SuperManager)?true:hideManagerUtilities,bodyPadding:"0",frame:false},{xtype:"tbseparator",cls:"topnavigation_seperator for_switch",margin:"5 3 0 3",hidden:(hideInAv_SuperManager)?true:hideManagerUtilities},{xtype:"container",html:'<a href="javascript:void(0)" class="indexTopLink"><div class="topnavigation_egHelp" style="float:left"></div></a>',id:"help",cls:"for_switch",helpUrl:null,margin:"4 0 0 0",bodyPadding:"0",frame:false},{xtype:"tbseparator",id:"monitortbseparatorId",cls:"topnavigation_seperator for_switch",margin:"5 3 0 3"},{xtype:"container",html:'<a href="javascript:void(0)" class="indexTopLink" ><div class="topnavigation_logout" style="float:left"></div></a>',margin:"4 0 0 0",id:"signout",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,id:"signout_tooltip",cls:"new_yellowTip",trackMouse:true,html:"Signout"});
}},bodyPadding:"0",frame:false},{xtype:"tbseparator",cls:"topnavigation_seperator",hidden:switchback,id:"switchBackseperator",margin:"5 3 0 3"},{xtype:"container",html:'<a href="javascript:void(0)" class="indexTopLink" ><div class="topnavigation_userswitchback" style="float:left"></div></a>',id:"switchBack",hidden:switchback,listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,id:"switchBack_tooltip",cls:"new_yellowTip",trackMouse:true,html:"Switch Back"});
}},margin:"4 7 0 0",bodyPadding:"0",frame:false}]},{xtype:"container",bodyPadding:"0",frame:false,cls:"tabsetRightBorder",width:2}]}],loadLogoTabSetComponents:function(k){var f=k.userprofile_name;if(f!=null&&f.indexOf("samlsso/")!=-1){f=f.substring(f.indexOf("/")+1);f=f+" (SAML)";}appLogoTabSet=this;
if(!Ext.isEmpty(orgName)&&orgName.toLowerCase()!="egenterprise"){Ext.getCmp("userprofile_tooltip").update(userTooltipMsg+" '"+f+"' and "+userTooltipMsg1+" '"+orgName+"'");}else{Ext.getCmp("userprofile_tooltip").update(userTooltipMsg+" '"+f+"'");}var g=Ext.getCmp("body");var l='<div id="updatehere"></div><a href="javascript:void(0)" class="indexTopLink"><div  id="uprofile" class="topnavigation_user" style="float:left;position:relative"></div></a>';
Ext.getCmp("userprofile").update(l);var e='<a href="javascript:void(0)" class="indexTopLink" data-qtip="'+managerNotifyMsg+'"  data-qclass="new_yellowTip"><div  class="topnavigation_notifications" style="float:left;position:relative"></div></a>';Ext.getCmp("notifications").update(e);Ext.get("userprofile").on("click",function(q){closemenu();
if(!show_user_profile){return;}userproclicked=true;Ext.get("userprofile").addCls("selected_navigation");var o=148;if(hideInAv_SuperManager){o=258;}var p=this;var s=Ext.getCmp("configModUserProfile");if(Ext.isEmpty(s)||s=="null"||s=="undefined"){var r=Ext.create("Ext.tip.ToolTip",{target:"uprofile",constrainPosition:false,renderTo:Ext.getBody(),anchor:"top",anchorToTarget:true,anchorOffset:hideInAv_SuperManager?(Ext.get("userprofile").getY()+(252-25)):(Ext.get("userprofile").getY()+(140-25)),width:290,margin:"5 0 0 0",ui:"themes",layout:"fit",doClose:function(){Ext.get("userprofile").removeCls("selected_navigation");
this.fireEvent("close",this);this[this.closeAction]();},autoHide:false,closable:true,listeners:{show:function(w){var v;var u=false;w.getEl().on("mouseout",function(x){v=window.setTimeout(function(){if(u==false){Ext.isIE?x.returnValue=false:x.preventDefault();w.hide();Ext.get("userprofile").removeCls("selected_navigation");
}},900);});var t=Ext.getCmp("reportType2");t.on("expand",function(x){u=true;});t.on("collapse",function(){u=false;});w.getEl().on("mouseover",function(){window.clearTimeout(v);});w.on("mouseout",function(){v=window.setTimeout(function(){w.hide();Ext.get("userprofile").removeCls("selected_navigation");
},900);});},hide:function(){userproclicked=false;Ext.get("userprofile").removeCls("selected_navigation");this.destroy();}},title:userProfTitle,id:"configModUserProfile",items:[{xtype:"container",cls:"round-container",items:[{xtype:"quicklinkprofile",parent:p}]}],dockedItems:[{xtype:"container",dock:"bottom",ui:"dummy",margin:"8px 0px 0px 0px",items:[{border:false,padding:"0px 0px 0px 90px",buttons:[{text:submitLbl,width:"40px",id:"SubmitBtn",cls:"quickMenuWhiteButton",},"->",{xtype:"container",style:{"border":"0px solid red","margin":"4px -4px 0px 0px !important",},padding:0,items:[{xtype:"button",text:editProfLbl,id:"EditBtn",padding:0,cls:"quickMenuTextButton",style:{"background":"transparent !important","border":"0px"}}]}]}]}]}).showAt([Ext.get(q.target).getX()-o,Ext.get(q.target).getY()+28]);
}});if(!Ext.isEmpty(Ext.get("notifications"))){Ext.get("notifications").on("click",function(q){closemenu();managernofclicked=true;Ext.get("notifications").addCls("selected_navigation");var p=this;isWindowClosable=false;var o=Ext.getCmp("mangerNotificationWindow");if(Ext.isEmpty(o)||o=="null"||o==undefined){showNotificationDialogBox(true,true);
}});}if(!Ext.isEmpty(clicked)&&clicked=="true"){showQuickLinkPopUp();}if(!Ext.isEmpty(Ext.getCmp("quicklinks_tooltip"))){Ext.getCmp("quicklinks_tooltip").update(k.quiclmenu_text);var a='<a href="javascript:void(0)" class="indexTopLink" ><div id="quicklinkpopup" class="topnavigation_qlinks" style="float:left"></div></a>';
Ext.getCmp("quicklinks").update(a);Ext.get("quicklinks").on("click",function(r){closemenu();quicklinkclicked=true;clicked="true";Ext.get("quicklinks").addCls("selected_navigation");var q=this;var p=Ext.getCmp("configModQuickLink");if(Ext.isEmpty(p)||p=="null"||p=="undefined"){var o=Ext.create("Ext.tip.ToolTip",{target:"quicklinks",anchor:"top",constrainPosition:false,renderTo:Ext.getBody(),height:400,width:320,anchor:"top",anchorOffset:(320/2)-Ext.get("quicklinks").getY(),ui:"themes",margin:"5 0 0 0",layout:"fit",doClose:function(){Ext.get("quicklinks").removeCls("selected_navigation");
this.fireEvent("close",this);this[this.closeAction]();},autoHide:false,closable:true,listeners:{show:function(v){var u;var s=false;v.getEl().on("mouseout",function(w){u=window.setTimeout(function(){if(s==false){Ext.isIE?w.returnValue=false:w.preventDefault();v.hide();Ext.get("quicklinks").removeCls("selected_navigation");
}},500);});var t=Ext.getCmp("reportType");t.on("expand",function(){s=true;});t.on("collapse",function(){s=false;});v.getEl().on("mouseover",function(){window.clearTimeout(u);});v.on("mouseout",function(){u=window.setTimeout(function(){v.hide();Ext.get("quicklinks").removeCls("selected_navigation");},500);
});},hide:function(){quicklinkclicked=false;clicked="false";Ext.get("quicklinks").removeCls("selected_navigation");this.destroy();}},title:"QUICK LINKS",id:"configModQuickLink",items:[{xtype:"container",cls:"round-container",items:[{xtype:"quicklinkmenuitem",parent:q}]}]}).showAt([Ext.get(r.target).getX()-152,Ext.get(r.target).getY()+28]);
}});}if(!Ext.isEmpty(Ext.get("utilities"))){var b='<a href="javascript:void(0)" class="indexTopLink" data-qtip="'+k.utilities_text+'" data-qclass="new_yellowTip"><div id="util" class="topnavigation_utilities" style="float:left"></div></a>';var c=Ext.getCmp("utilities");c.update(b);var n="";Ext.get("utilities").on("click",function(o){if(n){n.destroy();
n=null;}utilityclicked=true;n=window.Ext.create("Ext.tip.ToolTip",{target:"utilities",constrainPosition:false,renderTo:"utilities_popup",anchor:"top",anchorOffset:73,bodyPadding:0,padding:0,width:160,cls:"whitethemestip",ui:"whitethemes",margin:"5 0 0 0",layout:"fit",listeners:{show:function(q){var p;
q.getEl().on("mouseout",function(r){p=window.setTimeout(function(){Ext.isIE?r.returnValue=false:r.preventDefault();q.destroy();q=null;},500);});q.getEl().on("mouseover",function(){window.clearTimeout(p);});q.on("mouseout",function(){p=window.setTimeout(function(){q.destroy();q=null;},500);});},hide:function(){n.destroy();
n=null;}},closeAction:"destroy",autoHide:false,title:utilitiesTitle,id:"utilconfig",items:[{xtype:"component",cls:"round-container helpmenu",html:'<ul class="updatemenu"><li id="checkforupdates"><img style="vertical-align:middle;margin-right: 5px;" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="checkupdate"><span class="normal">'+checkforUpdateTitle+'</span></li><li id="reportissue"><img  style="vertical-align:middle;margin-right: 5px;" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="reportissues"><span class="normal">'+reportIncidentTitle+'</span></li><li id="suggestfeature"><img  style="vertical-align:middle;margin-right: 5px;" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="feature-like"><span class="normal">'+suggestaFeatureTitle+'</span></li><li id="helpcenter"><img  style="vertical-align:middle;margin-right: 5px;" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="helpcenter"><span class="normal">'+helpCenterTitle+"</span></li></ul>"}]});
n.show();Ext.get("checkforupdates").on("click",function(q){var p=Ext.dom.Query.select(".iconUserIndex");var r=Ext.fly(p[0]);Ext.get("checkforupdates").removeCls("selected_navigation");utilityclicked=false;document.getElementById("main").src="/final/admin/CheckForUpdates.jsp?appType=checkforupdates";});
Ext.get("reportissue").on("click",function(p){getReportIssue("issue");});Ext.get("suggestfeature").on("click",function(p){getReportIssue("feature");});Ext.get("helpcenter").on("click",function(p){Ext.get("checkforupdates").removeCls("selected_navigation");utilityclicked=false;document.getElementById("main").src="/final/admin/CheckForUpdates.jsp?appType=helpcenter";
});});}if(!Ext.isEmpty(Ext.get("downloadagent"))){Ext.get("downloadagent").on("click",function(o){var p=document.getElementById("main");p.src="/final/admin/EgDownloadAgentPack.jsp";});}if(!Ext.isEmpty(Ext.get("help"))){var m='<a href="javascript:void(0)" class="indexTopLink" id="help" data-qtip="'+k.help_text+'" data-qclass="new_yellowTip"><div class="topnavigation_egHelp" style="float:left"></div></a>';
var i=Ext.getCmp("help");i.update(m);i.helpUrl=k.help_url;Ext.get("help").on("click",function(){var q=i.helpUrl;var s="";var p="";if(!Ext.isEmpty(q)){if(q.indexOf("?")>-1){s=q.substring(0,q.indexOf("?"));p=q.substring(q.indexOf("?")+1);}else{s=q;}}if(Ext.getBody().getViewSize().width<1100){var x=Ext.getBody().getViewSize().width-64;
var t=25;var o=(Ext.getBody().getViewSize().width/2)-(x/2);}else{var x=Ext.getBody().getViewSize().width-154;var t=78;var o=(Ext.getBody().getViewSize().width/2)-(x/2);}var w=(x/2);var u=Ext.getBody().getViewSize().height-240;var v=(Ext.getBody().getViewSize().height/2)-(u/2);var r=window.open("/final/eghelp/EgHelpApp.jsp?forwardPage="+s+"&params="+p,+"HelpWindow","toolbar=no,location=no,status=no,menubar=no,width="+x+",height="+(u+20)+",left="+o+",top="+v+",screenx="+o+",screeny="+v+",resizable=yes");
r.focus();});}if(!Ext.isEmpty(Ext.get("quickalarms"))){var j='<a href="javascript:void(0)" class="indexTopLink" data-qtip="'+k.alarm_text+'" data-qclass="new_yellowTip"><div class="topnavigation_alarms" id="quickalarmspopup" style="float:left" ></div></a><span id="quickalarmspopup_holder"><span>';Ext.getCmp("quickalarms").update(j);
Ext.get("quickalarms").on("click",function(q){closemenu();quickalarmclicked=true;var p=this;Ext.get("quickalarms").addCls("selected_navigation");var o=Ext.getCmp("configModQuickAlarm");Ext.create("Ext.tip.ToolTip",{target:"quickalarms",height:505,width:450,maxWidth:550,constrainPosition:false,renderTo:"quickalarms_pop",anchor:"top",anchorOffset:364,constrainPosition:false,ui:"themes",doClose:function(){Ext.get("quickalarms").removeCls("selected_navigation");
Ext.destroy(this);this.fireEvent("close",this);this[this.closeAction]();},layout:"fit",autoHide:false,autoShow:false,listeners:{show:function(s){var r;s.getEl().on("mouseout",function(t){r=window.setTimeout(function(){Ext.isIE?t.returnValue=false:t.preventDefault();s.hide();Ext.get("quickalarms").removeCls("selected_navigation");
},500);});s.getEl().on("mouseover",function(){window.clearTimeout(r);});s.on("mouseout",function(){r=window.setTimeout(function(){s.hide();Ext.get("quickalarms").removeCls("selected_navigation");},500);});},hide:function(){Ext.get("quickalarms").removeCls("selected_navigation");this.destroy();}},closable:true,title:"QUICK ALERTS",id:"configModQuickAlarm",name:"configModQuickAlarm",items:[{xtype:"panel",scroll:false,autoScroll:false,layout:{type:"vbox",align:"stretch"},cls:"round-container",items:[{xtype:"quickalarm",parent:p}]}]}).show();
});}if(!Ext.isEmpty(Ext.get("switchUser"))){Ext.get("switchUser").on("click",function(q){closemenu();Ext.get("switchUser").addCls("selected_navigation");var p=this;isWindowClosable=false;var o=Ext.getCmp("switchUserWindow");if(Ext.isEmpty(o)||o=="null"||o==undefined){showSwitchUserBox();}});}Ext.getCmp("signout_tooltip").update(k.signout_text);
var h='<a href="javascript:void(0)" id="close" class="indexTopLink" ><div class="topnavigation_logout" style="float:left"></div></a>';Ext.getCmp("signout").update(h);var h='<a href="javascript:void(0)" id="switch" class="indexTopLink" ><div class="topnavigation_userswitchback" style="float:left"></div></a>';
Ext.getCmp("switchBack").update(h);if(isNewBrowWin==null||isNewBrowWin=="null"||isNewBrowWin=="no"){Ext.get("close").on("click",function(){var o=k.userprofile_name;var p=document.getElementById("main");p.src="/final/admin/EgLogoutA.jsp?userid="+isAdminModule+"&fromPage=proceedingSignout&cache="+new Date().getTime();
});}if(!Ext.isEmpty(Ext.get("switchBack"))){var d=Ext.Date.format(new Date(),"m/d/Y H:i:s");Ext.get("switchBack").on("click",function(){Ext.Ajax.request({url:"/final/scripts/EgIndexApp/data/EgSwitchUsersJson.jsp",method:"post",timeout:120000,params:{"kpe":kpe,"dp":d},scope:this,success:function(o){var q=o.responseText;
switchUserJSON=Ext.decode(q);var p=switchUserJSON.rpe;var r=switchUserJSON.dpe;Ext.Ajax.request({url:"/final/servlet/com.egurkha.EgSwitchUserServlet",method:"POST",params:{"uname":demoUser,"ape":ape,"switchBack":"true","reqFrom":reqFrom,"spe":spe,"kpe":kpe,"dpe":r,"rpe":p},scope:this,timeout:120000,success:function(t){var s=t.responseText;
window.location.href="/final"+s;},failure:function(s){console.log("failure");}});}});});}if(this.hasNotificationAlerts()){if(hasNotificationWindow=="yes"){showNotificationDialogBox(false,false);}}setTimeout('closeNotificationWindow("mangerNotificationWindow")',15000);},hasNotificationAlerts:function(){managerWarnings="";
var b=false;if(hasAllComponentAccess==true&&isUsersLimitCrossed!="true"&&(alertUserAbtUserCert==true||alertUserAbtUserCert=="true")){b=true;managerWarnings=managerWarnings+"<div class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+messageOne+"</div><div style='clear:both'></div></div></div>";
}if(hasAllComponentAccess==true&&(isUsersLimitCrossed==true||isUsersLimitCrossed=="true")){b=true;managerWarnings=managerWarnings+"<div class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+messageTwo+"</div><div style='clear:both'></div></div></div>";
}if(isUserExpired!=""){b=true;managerWarnings=managerWarnings+"<div class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+isUserExpired+"</div><div style='clear:both'></div></div></div>";
}if(hasAllComponentAccess==true&&isLicenceValid!=undefined&&isLicenceValid!=null&&isLicenceValid!=""){if(isLicenseEnabled=="True"){if(isMonitorModule==true||isMonitorModule=="true"||isConfigModule==true||isConfigModule=="true"||isRepModule=="true"||isRepModule==true){b=true;managerWarnings=managerWarnings+"<div class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+isLicenceValid+"</div><div style='clear:both'></div></div></div>";
}}if(isAdminModule==true||isAdminModule=="true"){b=true;managerWarnings=managerWarnings+"<div class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+isLicenceValid+"</div><div style='clear:both'></div></div></div>";
}}if(isAdminModule==true||isAdminModule=="true"){var a=initializeAdminDashboardAlerts();if(a.length>0){b=true;}}return b;}});function showSwitchUserBox(){Ext.get("switchUser").addCls("selected_navigation");var a=Ext.getCmp("enabledUserContainer");if(!Ext.isEmpty(a)){a.removeCls("x-hidden");a.el.slideIn("r",{duration:200});
Ext.Function.defer(function(){a.expand();},500);$(".for_switch").each(function(b){Ext.fly(this).hide();});Ext.getCmp("iconsContainer").doComponentLayout();}}function showQuickLinkPopUp(){clicked="true";var b=this;Ext.get("quicklinks").addCls("selected_navigation");var a=Ext.getCmp("configModQuickLink");
if(Ext.isEmpty(a)||a=="null"||a=="undefined"){Ext.create("Ext.tip.ToolTip",{target:"quicklinks",anchor:"top",constrainPosition:false,renderTo:"renderHereToolTip",height:400,width:320,anchor:"top",anchorOffset:(340/2)-Ext.get("quicklinks").getY(),ui:"themes",layout:"fit",autoHide:false,doClose:function(){Ext.get("quicklinks").removeCls("selected_navigation");
this.fireEvent("close",this);this[this.closeAction]();},closable:true,listeners:{show:function(d){var c;d.getEl().on("mouseout",function(e){c=window.setTimeout(function(){Ext.isIE?e.returnValue=false:e.preventDefault();d.hide();Ext.get("quicklinks").removeCls("selected_navigation");},500);});d.getEl().on("mouseover",function(){window.clearTimeout(c);
});d.on("mouseout",function(){c=window.setTimeout(function(){d.hide();Ext.get("quicklinks").removeCls("selected_navigation");},500);});},hide:function(){clicked="false";Ext.get("quicklinks").removeCls("selected_navigation");quicklinkclicked=false;this.destroy();}},title:"QUICK LINKS",id:"configModQuickLink",items:[{xtype:"container",cls:"round-container",items:[{xtype:"quicklinkmenuitem",parent:b}]}]}).showAt([Ext.get("quicklinks").getX()-152,Ext.get("quicklinks").getY()+28]);
}}function showNotificationDialogBox(b,c){if(hideInAv_SuperManager){return;}var a=Ext.getCmp("mangerNotificationWindow");Ext.get("notifications").addCls("selected_navigation");if(Ext.isEmpty(a)||a=="null"||a==undefined){Ext.create("Ext.tip.ToolTip",{target:"notifications",requires:["utilities.CommonPanel"],constrainPosition:false,renderTo:Ext.getBody(),anchorOffset:203,anchor:"top",bodyPadding:0,height:400,width:450,margin:"5 0 0 0",ui:"themes",layout:"fit",autoHide:false,doClose:function(){Ext.get("notifications").removeCls("selected_navigation");
this.fireEvent("close",this);this[this.closeAction]();},closable:true,title:"MANAGER NOTIFICATION",id:"mangerNotificationWindow",listeners:{show:function(e){var d;e.getEl().on("mouseout",function(f){d=window.setTimeout(function(){Ext.isIE?f.returnValue=false:f.preventDefault();e.hide();Ext.get("notifications").removeCls("selected_navigation");
},500);});e.getEl().on("mouseover",function(){window.clearTimeout(d);});e.on("mouseout",function(){d=window.setTimeout(function(){e.hide();Ext.get("notifications").removeCls("selected_navigation");},500);});},hide:function(){managernofclicked=false;Ext.get("notifications").removeCls("selected_navigation");
this.destroy();},click:{element:"el",fn:function(){isWindowClosable=false;}},"afterrender":function(){if(c==true){appLogoTabSet.hasNotificationAlerts();}if(b&&(isAdminModule==true||isAdminModule=="true")){initializeAdminDashboardAlerts();}}},items:[{xtype:"panel",id:"userWarningMessages",autoScroll:true,cls:"round-container msgBody",margin:"0px 0px 0px 0px",border:false,html:"<table border='0' height='281px' width='100%'><tr><td align=center vlaign=top><div class='iconInformation' style='margin:5px'></div><div>No recent notifications found.</div></td></tr></table>"}]}).showAt([Ext.get("notifications").getX()-215,Ext.get("notifications").getY()+28]);
}if(isAdminModule==true||isAdminModule=="true"){if(managerWarnings.length>0||adminAlertConfig.length>0||adminWarnings.length>0){Ext.getCmp("userWarningMessages").update(managerWarnings+adminAlertConfig+adminWarnings);showAutoDiscoveryManagerState();}}else{if(managerWarnings.length>0){Ext.getCmp("userWarningMessages").update(managerWarnings);
}}Ext.getCmp("userWarningMessages").doLayout();}function showAutoDiscoveryManagerState(){var a=Ext.getCmp("mangerNotificationWindow");if(a==null||a==undefined){return;}Ext.Ajax.request({url:"/final/scripts/EgIndexApp/data/EgNotificationManagerJson.jsp?doAction=1",method:"POST",async:false,success:function(b){jsonDataArchive=Ext.decode(b.responseText);
if(jsonDataArchive.isDiscRunning==true){isAutoDiscRunning=true;Ext.getCmp("userWarningMessages").update(managerWarnings+adminAlertConfig+adminWarnings+"<div id='discoveryError' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float: left;width:35px;margin:5px'></div><div class='msgContainer'>Manager discovery is in progress. Components will be auto managed once discovery is complete.</div><div style='clear:both'></div></div></div>");
setTimeout("showAutoDiscoveryManagerState()",5000);}else{var d=jsonDataArchive.errorMessage;if(d!=undefined&&d.length>0){var c="<div id='discoveryError' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float: left;width:35px;margin:5px'></div><div class='msgContainer'>The operation auto-manage during discovery has failed.<br><b>Reason : </b>"+d.substring(d.indexOf("::")+2)+".<br><b>Discovery last ran at : </b>"+jsonDataArchive.discoveryLastRun+"</div><div style='clear:both'></div></div></div>";
Ext.getCmp("userWarningMessages").update(managerWarnings+adminAlertConfig+adminWarnings+c);}else{if(isAutoDiscRunning==true){var e="<div id='discoveryError' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float: left;width:35px;margin:5px'></div><div class='msgContainer'>Manager discovery has finished and the discovered components have been auto managed successfully.</div><div style='clear:both'></div></div></div>";
Ext.getCmp("userWarningMessages").update(managerWarnings+adminAlertConfig+adminWarnings+e);}}isAutoDiscRunning=false;}},failure:function(){}});}function initializeAdminDashboardAlerts(){var a=false;var b="";Ext.Ajax.request({url:"/final/admin/EgAdminHome/data/EgDashboardAlertsJson.jsp",method:"POST",async:false,success:function(c){var e=Ext.decode(c.responseText);
if(e.isAgentAlertEnabled==true&&e.hasNotRunningAgentsList==true){var g=parseInt(e.NotRunningAgentsList);var f="";if(g>1){f=e.NotRunningAgentsList+" "+e.agentsAreNotRunning;}else{f=e.NotRunningAgentsList+" "+e.agentsIsNotRunning;}b=b+"<div errorType='etype1' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+f+"&nbsp;<a class='eg_monlink manager_notification' href='/final/admin/EgViewManagerNotificationDetails.jsp?type=1' onclick='javascript:destroyNotificationWindow()' target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline'>"+e.clickHere+" "+"</span></a>"+e.knowMore+"</div><div style='clear:both'></div></div></div>";
a=true;}if(e.isAgentAlertEnabled==true&&e.hasNotInstalledAgentsList==true){var g=parseInt(e.NotInstalledAgentsList);var f="";if(g>1){f=e.NotInstalledAgentsList+" "+e.agentsAreNotInstalled;}else{f=e.NotInstalledAgentsList+" "+e.agentsIsNotInstalled;}b=b+"<div errorType='etype1' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+f+"&nbsp;<a class='eg_monlink manager_notification' href='/final/admin/EgViewManagerNotificationDetails.jsp?type=6' onclick='javascript:destroyNotificationWindow()' target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline'>"+e.clickHere+" "+"</span></a>"+e.knowMore+"</div><div style='clear:both'></div></div></div>";
a=true;}if(hasAllComponentAccess==true&&e.isDiscoveredCompsPopupEnabled&&e.hasDiscoveredComponents==true){var g=parseInt(e.count);var f="";if(g>1){f=e.count+" "+e.componentsHaveDiscovered;}else{f=e.count+" "+e.componentsHasDiscovered;}b=b+"<div errorType='etype2' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float: left;width:35px;margin:5px'></div><div class='msgContainer'>"+f+"&nbsp;<a class='eg_monlink manager_notification' onclick='javascript:destroyNotificationWindow()'  href='/final/admin/EgViewManagerNotificationDetails.jsp?type=2' target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline'>"+e.clickHere+" "+"</span></a> "+e.knowMore+"</div><div style='clear:both'></div></div></div>";
a=true;}if(hasAllComponentAccess==true&&e.UIAlertForUnconfiguredAgents==true&&e.isUnconfiguredAgentsDetected==true){var g=parseInt(e.UnconfiguredAgentsCount);var f="";if(g>1){f=e.UnconfiguredAgentsCount+" "+e.agentsHaveInstalled;}else{f=e.UnconfiguredAgentsCount+" "+e.agentsHasInstalled;}b=b+"<div errorType='etype3' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float: left;width:35px;margin:5px'></div><div class='msgContainer'>"+f+"&nbsp;<a class='eg_monlink manager_notification' href='/final/admin/EgViewManagerNotificationDetails.jsp?type=3' onclick='javascript:destroyNotificationWindow()' target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline'>"+e.clickHere+" "+"</span></a> "+e.knowMore+"</div><div style='clear:both'></div></div></div>";
a=true;}if(e.hasManagedComponents==true&&e.hasUnConfiguredComponents==true&&e.hasTestConfigAccess==true){var g=parseInt(e.UnconfiguredComponentCount);var d="";if(g>1){d=e.UnconfiguredComponentCount+" "+e.managecomponentsHaveConfigured;}else{d=e.UnconfiguredComponentCount+" "+e.managecomponentsHasConfigured;
}if(reqFrom!=null&&reqFrom=="clsTrial"){b=b+"<div errorType='etype3' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float: left;width:35px;margin:5px'></div><div class='msgContainer'>"+d+"&nbsp;<br><a class='eg_monlink manager_notification' href='/final/portal/LogonSimulator.jsp?from=login&tab=configure' onclick='javascript:destroyNotificationWindow()'  target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline'>"+e.clickHere+" "+"</span></a> "+e.knowMore+"</div><div style='clear:both'></div></div></div>";
}else{b=b+"<div errorType='etype3' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float: left;width:35px;margin:5px'></div><div class='msgContainer'>"+d+"&nbsp;<br><a class='eg_monlink manager_notification' href='/final/admin/EgUnconfiguredTestsSummary.jsp?fromPage=limitedCompAccess&showBackButton=true' onclick='javascript:destroyNotificationWindow()'  target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline'>"+e.clickHere+" "+"</span></a> "+e.knowMore+"</div><div style='clear:both'></div></div></div>";
}}if(e.isUpgradeTestsAvailable==true&&e.UIAlertForUpgradeTests==true){var f=e.testFoundForUpgrade;b=b+"<div errorType='etype1' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconInformation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+f+"&nbsp;<a class='eg_monlink manager_notification' href='/final/admin/EgUpgradeEnableDeleteTests.jsp?type=1' onclick='javascript:destroyNotificationWindow()' target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline;'>"+e.clickHere+" "+"</span></a> "+e.knowMore+"</div><div style='clear:both'></div></div></div>";
a=true;}},failure:function(){}});adminAlertConfig=b;return adminAlertConfig;}function closeMessage(){Ext.Ajax.request({url:"/final/scripts/EgIndexApp/data/EgNotificationManagerJson.jsp?doAction=2",method:"POST",success:function(a){Ext.getCmp("userWarningMessages").update(managerWarnings+adminAlertConfig+adminWarnings);
if(managerWarnings.length==0&&adminAlertConfig.length==0&&adminWarnings.length==0){Ext.getCmp("userWarningMessages").update("<table border='0' height='281px' width='100%'><tr><td align=center vlaign=top><div class='iconInformation' style='margin:5px'></div><div>No recent notifications found.</div></td></tr></table>");
}}});}function closemenu(){if(userproclicked){Ext.getCmp("configModUserProfile").close();clicked="false";userproclicked=false;}else{if(managernofclicked){Ext.getCmp("mangerNotificationWindow").close();managernofclicked=false;}else{if(quickalarmclicked){if(!Ext.isEmpty(Ext.getCmp("configModQuickAlarm"))){Ext.getCmp("configModQuickAlarm").close();
quickalarmclicked=false;}}else{if(quicklinkclicked){Ext.getCmp("configModQuickLink").close();quicklinkclicked=false;}}}}}function closeNotificationWindow(a){var b=Ext.getCmp(a);if(b!=null&&b!=undefined){if(isWindowClosable==true){b.destroy();Ext.get("notifications").removeCls("selected_navigation");}}}