function getBrowser() { let chromeCheck = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); let firefoxCheck = /Firefox/.test(navigator.userAgent); let ieCheck = /Edg/.test(navigator.userAgent); if (chromeCheck && !ieCheck) { //alert("Chrome"); return true; } else if (firefoxCheck) { //alert("Firefox"); return false; } else if (ieCheck) { //alert("Edge."); return false; } else { //alert("None"); return false; } } //ADMIN function Admin() { var GetMac = LAN_MAC.split(":"); var Mac = GetMac[3] + GetMac[4] + GetMac[5]; window.open("/admin/aindex.asp",Mac,"width=910,height=700,top=0,left=0,status=yes,resizable"); } //PTZ $(function() { $("#id_PtzSpeedSlider").slider({ value:10, min: 1, max: 16, step: 1, slide: function( event, ui ) { $( "#id_PtzSpeed" ).val( ui.value ); } }); $( "#id_PtzSpeed" ).val( $( "#id_PtzSpeedSlider" ).slider( "value" ) ); }); $(function() { $("#PtzModeCont").mouseover(function() { $("#PtzModeCont").attr("src", "/img/websocket/ContinuousOver.gif"); }); $("#PtzModeCont").mouseout(function() { if (PTZ_MOVE_MODE == 1) { $("#PtzModeCont").attr("src", "/img/websocket/ContinuousClick.gif"); } else { $("#PtzModeCont").attr("src", "/img/websocket/Continuous.gif"); } }); $("#PtzModeCont").mousedown(function() { $("#PtzModeCont").attr("src", "/img/websocket/ContinuousClick.gif"); }); $("#PtzModeCont").click(function() { if (PTZ_MOVE_MODE == 0) { PTZ_MOVE_MODE = 1; $("#PtzModeCont").attr("src", "/img/websocket/ContinuousClick.gif"); $("#PtzModeStep").attr("src", "/img/websocket/Step.gif"); } }); }); $(function() { $("#PtzModeStep").mouseover(function() { $("#PtzModeStep").attr("src", "/img/websocket/StepOver.gif"); }); $("#PtzModeStep").mouseout(function() { if (PTZ_MOVE_MODE == 0) { $("#PtzModeStep").attr("src", "/img/websocket/StepClick.gif"); } else { $("#PtzModeStep").attr("src", "/img/websocket/Step.gif"); } }); $("#PtzModeStep").mousedown(function() { $("#PtzModeStep").attr("src", "/img/websocket/StepClick.gif"); }); $("#PtzModeStep").click(function() { if (PTZ_MOVE_MODE == 1) { PTZ_MOVE_MODE = 0; $("#PtzModeStep").attr("src", "/img/websocket/StepClick.gif"); $("#PtzModeCont").attr("src", "/img/websocket/Continuous.gif"); } }); }); function ChgPtzFuncExpand() { with( document.all ) { if (PtzSelectNum.style.display == "none") { PtzSelectNum.style.display = ""; PtzFuncMenu.style.display = ""; toPtzFuncExpand.value = "\u25B2"; } else { PtzSelectNum.style.display = "none"; PtzFuncMenu.style.display = "none"; toPtzFuncExpand.value = "\u25BC"; } } } $(function() { $("#PtzOnClose").mouseover(function() { $("#PtzOnClose").attr("src", "/img/websocket/MainToolbarImage_ptz_O.gif"); }); $("#PtzOnClose").mouseout(function() { if ($("#PtzOnClose").val() == "0") { $("#PtzOnClose").attr("src", "/img/websocket/MainToolbarImage_ptz.gif"); } else { $("#PtzOnClose").attr("src", "/img/websocket/MainToolbarImage_ptz_C.gif"); } }); $("#PtzOnClose").mousedown(function() { $("#PtzOnClose").attr("src", "/img/websocket/MainToolbarImage_ptz_C.gif"); }); $("#PtzOnClose").click(function() { if ($("#PtzOnClose").val() == "0") { $("#PtzOnClose").val(1); $("#PtzOnClose").attr("src", "/img/websocket/MainToolbarImage_ptz_C.gif"); $("#ControlMenu").css("display", ""); } else { $("#PtzOnClose").val(0); $("#PtzOnClose").attr("src", "/img/websocket/MainToolbarImage_ptz.gif"); $("#ControlMenu").css("display", "none"); } ViewerResize(); }); });