(function(e){var f=new function(){this.BootOptions=function(){this.category="Device";this.name="Boot Opt.";this.subnavigationicon="sec-nav-equipment.png";var b=void 0;this.Init=function(){b=this;if(void 0==b||null==b)return!1;b.setCycleTime(2E3);b.setCommunicationObj(e.DevMan.getCommunicationModule(e.DevMan.CommunicationType.mdp));b.addParameter("Misc_Properties_StartupNumlockState",!0);b.addParameter("Misc_Properties_CERemoteDisplayEnabled",!0);b.setOnInitStaticPage(f);b.setOnDisplayValues(h);b.setOnWriteFailed(k);
b.setOnWriteResult(l);b.setOnServiceTransferFailed(m);b.setOnServiceTransferResult(n);return!0};var f=function(c){var a="";winxp||(c[0].getHasValues()&&(a+='<table style="margin-bottom: 5px"><tr><td class="td_trans"><h3>Startup Numlock State</h3></td>',a+='<td class="td_Action_trans">'+(new ControlLib.SmallButton).Create("btnWriteStartupNumlockStateSettings","save","Save Startup Numlock State")+(new ControlLib.SmallButton).Create("btnWriteStartupNumlockStateSettings_Cancel","delete")+"</td>",a+="</tr></table>",
a+='<table><tr><td class="td_FirstColumn">Startup Numlock State</td><td>'+(new ControlLib.Combobox).Create(c[0].parameterName,["Off","On"])+"</td></tr></table>",a+="<br>",a+="<br>"),c[1].getHasValues()&&(a+='<table style="margin-bottom: 5px"><tr>',a+='<td class="td_trans"><h3>Remote Display</h3></td>',a+='<td class="td_Action_trans">'+(new ControlLib.SmallButton).Create("btnWriteRemoteDisplayEnabledSettings","save","Save Remote Display Setting")+(new ControlLib.SmallButton).Create("btnWriteRemoteDisplayEnabledSettings_Cancel",
"delete")+"</td>",a+="</tr></table>",a+='<table><tr><td class="td_FirstColumn">Remote Display</td><td>'+(new ControlLib.Combobox).Create(c[1].parameterName,["Off","On"])+"</td></tr></table>",a+="<br>",a+="<br>"),a+='<table><tr><td class="td_trans"><h3>Restore Factory Settings</h3></td></tr></table>',a+="<table>",a+='<tr><td class="td_FirstColumn_Important">Warning</td><td>You may have to clear your browsers cache before you are able to reconnect.</td></tr>',a+='<tr><td class="td_trans">'+(new ControlLib.Button).Create("btnRestoreFactorySettings",
"Restore Settings...")+"</td></tr>",a+="</table>",a+="<br>",a+="<br>");a+="<table>";a+='<tr><td class="td_trans"><h3>Reboot Machine</h3></td></tr>';a+='<tr><td class="td_trans">'+(new ControlLib.Button).Create("btnRebootMachine","Reboot...")+"</td></tr>";a+="</table>";a+="<br>";a+="<br>";a+='<div id="status"></div>';b.writeActivePage(a);winxp||(b.setElementOnClick("btnWriteStartupNumlockStateSettings",function(a){return function(){var a=[],c=[],d=[],e=b.getRequestParamIDs();if(b.isLocked(e[0].parameterName)){var f=
b.getElementValue(e[0].parameterName);a.push(e[0].parameterName);c.push(0);d.push(f)}0<a.length&&(b.Write(a,c,d),Helper.ShowLoading())}}(0)),b.setElementOnClick("btnWriteStartupNumlockStateSettings_Cancel",function(a){return function(){var a=b.getRequestParamIDs();b.removeLock(a[0].parameterName)}}(0)),b.addLockListener(c[0].parameterName),b.setElementOnClick("btnWriteRemoteDisplayEnabledSettings",function(a){return function(){var a=[],c=[],d=[],e=b.getRequestParamIDs();if(b.isLocked(e[1].parameterName)){var f=
b.getElementValue(e[1].parameterName);a.push(e[1].parameterName);c.push(0);d.push(f)}0<a.length&&(b.Write(a,c,d),Helper.ShowLoading())}}(0)),b.setElementOnClick("btnWriteRemoteDisplayEnabledSettings_Cancel",function(a){return function(){var a=b.getRequestParamIDs();b.removeLock(a[1].parameterName)}}(0)),b.addLockListener(c[1].parameterName),b.setElementOnClick("btnRestoreFactorySettings",function(a){return function(){if(confirm("Do you really want to restore factory settings and reboot the computer?")){var a=
b.getCommunicationObj().getServiceTransferParameterSize("MISC_Function_RestoreFactorySettings"),c=[];c.push(a);c.push(0);b.executeCommand("MISC_Function_RestoreFactorySettings",0,c);Helper.ShowLoading()}}}(0)));b.setElementOnClick("btnRebootMachine",function(a,b){return function(){g(a,b)}}(0,!0));return!0},h=function(c){c[0].getHasValues()&&b.setElementValue(c[0].parameterName,c[0].values[0].data);c[1].getHasValues()&&b.setElementValue(c[1].parameterName,c[1].values[0].data)},k=function(c){Helper.HideLoading();
e.DevMan.getErrorQueue().AddError(c.requestStatus,c.requestStatusText);b.clearLocks()},l=function(c,a){Helper.HideLoading();for(var d=0;d<c.length;d++)0<a[d]&&e.DevMan.getErrorQueue().AddError(a[d]);for(d=0;d<c.length;d++)b.removeLock(c[d].name);for(d=0;d<c.length;d++)if(0==a[d]&&("Misc_Properties_StartupNumlockState"==c[d].name||"Misc_Properties_CERemoteDisplayEnabled"==c[d].name)){if(confirm("You must restart your computer to apply these changes.\nDo you really want to reboot the computer?")){var d=
b.getCommunicationObj().getServiceTransferParameterSize("MISC_Function_Reboot"),f=[];f.push(d);f.push(0);Helper.RebootActive();b.executeCommand("MISC_Function_Reboot",0,f)}break}},m=function(b){Helper.HideLoading();e.DevMan.getErrorQueue().AddError(b.requestStatus,b.requestStatusText)},n=function(b){Helper.HideLoading();b.hasError?e.DevMan.getErrorQueue().AddError(b.errCode):"MISC_Function_RestoreFactorySettings"==b.moduleItem.name&&g(0,!1)},g=function(c,a){if(!a||confirm("Do you really want to reboot the computer?")){var d=
b.getCommunicationObj().getServiceTransferParameterSize("MISC_Function_Reboot"),e=[];e.push(d);e.push(0);Helper.RebootActive();b.executeCommand("MISC_Function_Reboot",0,e)}}};this.BootOptions.prototype=new e.Page_Template.Template};e.DevMan.RegisterModule(new f.BootOptions,e.DevMan.ModuleType.Website)})(window);
