var g_isSaveOrCancelButtonDown=!1,g_streamPort=[,"10014","10013","10012","10011"],g_htmlElementId=null; function SetMibVarValues(b,e,c){var a="",a="",d=null;for(i in e.GetListOfIdLinks())if(d=GetMibVarByHtmlId(i,e,b),a=document.getElementById(i),null!=d){switch(a.type){case "checkbox":a=a.checked;break;case "select-one":a=a.value;break;default:a=a.value}var f=d.GetValue();if(a!=f)return DisplayInvalidValue(document.getElementById(i),d),!1}e=b.GetChangedVars();null!=e&&(c.Submit(e),b.MarkVarsAsSubmitted());EnableSaveButton(!1);return!0} function InstantUpdateOfMibVarValues(b,e,c){var a="",d=a="",f=d=null;for(i in e.GetListOfIdLinks()){a=document.getElementById(i);switch(a.type){case "checkbox":a=a.checked;break;default:a=a.value}d=GetMibVarByHtmlId(i,e,b);if(null!=d){f=d.GetType();if(f==MIBVAR_TYPE_INT){if(parseInt(a)parseInt(d.GetMax()))a=parseInt(d.GetMax()),document.getElementById(i).value=a}if(f==MIBVAR_TYPE_FLOAT){if(parseFloat(a)< parseFloat(d.GetMin()))a=parseFloat(d.GetMin()),document.getElementById(i).value=a;if(parseFloat(a)>parseFloat(d.GetMax()))a=parseFloat(d.GetMax()),document.getElementById(i).value=a}d=e.GetAddress(i);b.SetVarValue(d,a)}}e=b.GetChangedVars();null!=e&&(c.Submit(e),b.MarkVarsAsSubmitted())} function FillHtmlPageAndDoNotDisableSaveButton(b,e){var c=null,a=null,d=0,f=b.GetListOfIdLinks();for(id in f)if(c=document.getElementById(id),a=GetMibVarByHtmlId(id,b,e),null!=a){switch(c.type){case "checkbox":c.checked=a.GetValue();break;case "text":c.value=a.GetValue();if(""!=a.GetLength())c.maxLength=a.GetLength();else{var d=a.GetMin().length,g=a.GetMax().length,d=d>g?d:g;a.GetType()==MIBVAR_TYPE_FLOAT&&(d+=1);c.maxLength=d}break;case "select-one":mibvarTemp=a.GetValue();"boolean"==typeof mibvarTemp? (c.value="T",c.value=!0==mibvarTemp?"T":"F"):c.value=a.GetValue();break;default:c.value=a.GetValue()}c.type||(a.GetType()==MIBVAR_TYPE_ENUM?$("#"+id).html(a.GetHtmlFriendlyValue()):$("#"+id).text(a.GetValue()))}else c.value="ERROR!"}function FillHtmlPage(b,e){FillHtmlPageAndDoNotDisableSaveButton(b,e);EnableSaveButton(!1)} function ResetPageValues(b,e){var c=null,a=null;for(i in e.GetListOfIdLinks())if(c=document.getElementById(i),a=GetMibVarByHtmlId(i,e,b),null!=a){switch(c.type){case "checkbox":c.checked=a.GetOriginalValue();break;default:c.value=a.GetOriginalValue()}c.type||(a.GetType()==MIBVAR_TYPE_ENUM?$("#"+i).html(a.GetHtmlFriendlyValue()):$("#"+i).html(a.GetOriginalValue()))}else c.value="ERROR!";b.ResetVarsToOriginalValue();EnableSaveButton(!1)} function DisplayInvalidValue(b,e){g_htmlElementId=b.id;e.GetType()==MIBVAR_TYPE_INT?$.prompt("Error! Invalid Value. \nPlease enter a value in the range ["+e.GetMin()+"..."+e.GetMax()+"]",{callback:CallbackFocus}):$.prompt("Error! Invalid Value: "+g_htmlElementId,{callback:CallbackFocus})}function CallbackFocus(){SetFocus(g_htmlElementId)}function GetMibVarByHtmlId(b,e,c){var a=null,d=null,a=e.GetAddress(b);null!=a&&(d=c.GetVar(a));return d} function IsNumeric(b,e){var c=GetKeyPressed(e),a=String.fromCharCode(c);if(null==c||0==c||8==c||9==c||13==c||27==c||-1<"-0123456789".indexOf(a))return EnableSaveButton(!0),!0;return!1}function IsNumericOrDot(b){var e=GetKeyPressed(b),e=String.fromCharCode(e);return IsNumeric(null,b)||"."==e?(EnableSaveButton(!0),!0):!1}function GetDefaultPlayer(){return Plugin.isInstalled("QuickTime")?"QuickTime":Plugin.isInstalled("VLC")?"VLC":null} function GetAlternatePlayerForMpeg2(){return Plugin.isInstalled("VLC")?"VLC":null} function BuildVLCPlayer(b,e){b.play=function(c,a){var d=document.getElementById(b.pluginid),f;f=e?["programid="+a,":rtsp-http"]:Array("programid="+a);d.playlist.clear();d.playlist.add(c,"live",f);d.playlist.play();d.style.width="";d.style.height=""};b.stop=function(){var c=document.getElementById(b.pluginid);if(!0==c.playlist.isPlaying)try{c.playlist.stop(),c.playlist.clear()}catch(a){}};b.supportsAudio=function(){return!0}} function BuildQTPlayer(b){b.play=function(){};b.stop=function(){};b.supportsAudio=function(){return!0}}function BuildEmptyPlayer(b){b.play=function(){};b.stop=function(){};b.supportsAudio=function(){return!1}} function CreatePlayer(b,e,c){var a={},d="",f={};if(c&&"https:"==location.protocol)return b.innerHTML='


The chosen video player plug-in does not support network address translation (NAT) in combination with HTTPS.

',BuildEmptyPlayer(a),a;d=getCookie("VideoPlayer");if(!d||!Plugin.isInstalled(d))if(d=GetDefaultPlayer(),setCookie("VideoPlayer",d),!Plugin.isInstalled(d))return b.innerHTML='


No Video player plugin has been detected !

You can download the VLC player here

You can download the QuickTime player here

', BuildEmptyPlayer(a),a;a.pluginid="idVideoPlayer";f.id=a.pluginid;f._class="liveViewImage";if("QuickTime"==d)f.autoplay="true",f.scale="ToFit",f.controller="false",f.showlogo="false",f.target="_parent",f.src="c50eRefMovie.mov",f.qtsrc=e,f.enablejavascript="true",f.href=f.src,f.name="movieName",f.pluginspage="http://www.apple.com/quicktime/download/",f.type="video/quicktime";Plugin.embed(d,f,b);switch(d){case "VLC":BuildVLCPlayer(a,c);break;case "QuickTime":BuildQTPlayer(a,c);break;default:BuildEmptyPlayer(a)}return a} function setCookie(b,e){document.cookie=b+"="+escape(e)}function getCookie(b){return(b=document.cookie.match(b+"=(.*?)(;|$)"))?unescape(b[1]):null}function setVolume(b,e){var c=255,a=$("#idVideoPlayer").get(0);"VLC"==e?(c=200*b/100,"Netscape"!=navigator.appName?a.volume=c:a.audio.volume=c):"QuickTime"==e&&a.SetVolume(c*b/100)}function muteAudio(b,e){var c=$("#idVideoPlayer").get(0);"VLC"==b?c.audio.toggleMute():"QuickTime"==b&&c.SetMute(e.checked)} function GetFileNameList(b,e){GetFileList(b,ParseFileNameList,e)}function ParseFileNameList(b,e){for(var c="",a=b.split("\r\n"),d=0;d"+b+" ";$(l).append(c)});g.Update(document.getElementById(c))} function IsCamera(b){b=b.GetParameter(b.FEATURE_VIDEO,"camera");return"true"==Trim(b)};