function isPCDev(){ return location.hostname==="10.10.25.57"||location.hostname==="127.0.0.1"; }; function isPCDevFixedInit(){ return isPCDev()&&browser()==="Firefox"; }; function hostname(){ return isPCDev()?"10.10.25.15":location.hostname; }; function browser(){ return navigator.userAgent.indexOf("MSIE")>=0?"MSIE":(navigator.userAgent.indexOf("Firefox")>=0?"Firefox":"rest"); }; function getInternetExplorerVersion(){ var rv=-1; if(navigator.appName=="Microsoft Internet Explorer"){ var ua=navigator.userAgent; var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"); if(re.exec(ua)!=null){ rv=parseFloat(RegExp.$1); } } return rv; }; function onParametersChange(){ onParametersChange2(); }; function backString(_1,_2){ if(_1.lastIndexOf(_2)===-1){ return null; }else{ return _1.substring(_1.lastIndexOf(_2)+1,_1.length); } }; function getCameraParam(_3){ if(!image.freeze){ if(isPCDevFixedInit()){ return "3"; }else{ var _4=new XMLHttpRequest(); var _5="/get?"+_3+"&id="+(new Date()).getTime(); try{ _4.open("GET",_5,false); _4.send(null); var _6=backString(_4.responseText,"="); return _6===null?null:decodeURIComponent(_6); } catch(e){ return null; } } } }; function setCameraParam(_7,_8){ if((!image.freeze)||(_7==="ip")){ if(!isPCDevFixedInit()){ var _9=new XMLHttpRequest(); var _a="/set?"+_7+"="+_8+"&id="+(new Date()).getTime(); try{ _9.open("GET",_a,false); _9.send(null); var _8=backString(_9.responseText,"="); return _8===null?null:decodeURIComponent(_8); } catch(e){ } av.savedParams(_7==="params"); } } }; function getCameraRegister(_b,_c){ if(!image.freeze){ if(isPCDevFixedInit()){ return "3"; }else{ var _d=new XMLHttpRequest(); var _e="/getreg?page="+_b+"®="+_c+"&id="+(new Date()).getTime(); try{ _d.open("GET",_e,false); _d.send(null); var _f=backString(_d.responseText,"="); return _f===null?0:Number(_f); } catch(e){ return null; } } } }; function setCameraRegister(_10,reg,_11){ if(!image.freeze){ if(!isPCDevFixedInit()){ var _12=new XMLHttpRequest(); var url="/setreg?page="+_10+"®="+reg+"&val="+_11+"&id="+(new Date()).getTime(); try{ _12.open("GET",url,false); _12.send(null); } catch(e){ } av.savedParams(false); } } }; function slowdown(){ var _13=(new Date).getTime(); while(_13===(new Date).getTime()){ } }; var av={documentTitle:function(){ return "Arecont Vision Camera"; },saved:true,savedParams:function(b){ if(b!==this.saved){ this.saved=b; } },registerControlDependency:function(_14,_15){ if(_15!==null){ _15.listeners.push(_14); if(!_15.checked||_15.disabled){ ReadOnlyVisual(_14,true); } if(_14.hasOwnProperty("associatedControl")&&_14.associatedControl!==null){ av.registerControlDependency(_14.associatedControl,_15); } } },pwdStrSecurityId:"setSecurity identifier",pwdStrSecurityPwd:"setSecurity pwd",setSecurity:function(_16,_17){ var _18,p0,p1; function _19(_1a,v0,v1){ if(typeof v0!=="string"||typeof v1!=="string"){ alert("Fill in the phrase and confirm!"); }else{ if(v0!==v1){ alert("The phrase and its confirmation must be identical! Try again."); }else{ if(v0==="empty"){ alert("Press Erase to erase the phrase."); }else{ var i; for(i=0;i"||v0.charAt(i)==" "){ document.title="pword:"+v0+" "+"i="+v0.charAt(i)+" "+v0.length+" "+i; break; } } if(i, etc! Try again."); }else{ p1=setCameraParam(_1a,v0); if(v0!=p1){ alert("The setup failed! Your current value is:"+p1); }else{ alert("Success!"); } } } } } }; if(_16===this.pwdStrSecurityId){ _18="security_id"; }else{ if(_16===this.pwdStrSecurityPwd){ _18="security_pwd"; }else{ return; } } if(_17===null){ if(confirm("Are you sure?")){ if(_16===this.pwdStrSecurityId){ dijit.byId("textbox"+"EAP Identifier").setValue(""); dijit.byId("textbox"+"Confirmation4").setValue(""); }else{ dijit.byId("textbox"+"CHAP Password").setValue(""); dijit.byId("textbox"+"Confirmation3").setValue(""); } } }else{ _19(_18,_17[0].getValue(),_17[1].getValue()); } },pwdStrAdmin:"setPwd admin",pwdStrViewer:"setPwd viewer",setPassword:function(_1b,_1c){ var _1d,p0,p1; function _1e(_1f,v0,v1){ if(typeof v0!=="string"||typeof v1!=="string"){ alert("Fill in the password and confirm!"); }else{ if(v0!==v1){ alert("The password and its confirmation must be identical! Try again."); }else{ if(v0==="empty"){ alert("Press Erase to erase the password."); }else{ var i; for(i=0;i"||v0.charAt(i)==" "){ document.title="pword:"+v0+" "+"i="+v0.charAt(i)+" "+v0.length+" "+i; break; } } if(i, etc! Try again."); }else{ p1=setCameraParam(_1f,v0); if(v0!=p1){ alert("The password setup failed! Your current password is:"+p1); }else{ if(_1f==="admin"){ setTimeout("location.reload(true);",1000); }else{ alert("The viewer password is set successfully!"); } } } } } } }; if(_1b===this.pwdStrAdmin){ _1d="admin"; }else{ if(_1b===this.pwdStrViewer){ _1d="viewer"; }else{ return; } } if(_1c===null){ if(confirm("Are you sure?")){ setCameraParam(_1d,"empty"); if(_1b===this.pwdStrAdmin){ dijit.byId("textbox"+"admin password").setValue(""); dijit.byId("textbox"+"confirmation1").setValue(""); }else{ dijit.byId("textbox"+"viewer password").setValue(""); dijit.byId("textbox"+"confirmation2").setValue(""); } } }else{ _1e(_1d,_1c[0].getValue(),_1c[1].getValue()); } }}; var avutil={getTime:function(){ return (new Date()).getTime(); },createNamed:function(_20,_21){ var el=document.createElement(_20); el.id=_21; return el; },createAppend:function(_22,_23,_24){ if(typeof _22==="string"){ _22=document.getElementById(_22); } if(typeof _23==="string"){ _23=document.createElement(_23); } if(typeof _24==="string"){ _23.id=_24; } _22.appendChild(_23); return _23; },insertText:function(_25,_26){ if(typeof _25==="string"){ _25=document.getElementById(_25); } var _27=document.createTextNode(_26); _25.appendChild(_27); return _27; },remove:function(id){ var _28=document.getElementById(id); _28.parentNode.removeChild(_28); },ipValidator:function(_29){ var re=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i; if(re.test(_29)){ var _2a=_29.split("."); if((parseInt(_2a[0],10)==255)||(parseInt(_2a[0],10)>=224&&parseInt(_2a[0],10)<=239)||(parseInt(_2a[0],10)==127)||(parseInt(_2a[0],10)==0)||(parseInt(_2a[3],10)<1)||(parseInt(_2a[3],10)==255)){ return false; } for(i=0;i<_2a.length;i++){ if(parseInt(_2a[i],10)>255){ return false; } } return true; }else{ return false; } },multicastValidator:function(_2b){ var re=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i; if(re.test(_2b)){ var _2c=_2b.split("."); if((parseInt(_2c[0],10)<224||parseInt(_2c[0],10)>239)){ return false; } for(i=0;i<_2c.length;i++){ if(parseInt(_2c[i],10)>255){ return false; } } return true; }else{ return false; } },maskValidator:function(_2d){ var re=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i; if(re.test(_2d)){ var _2e=_2d.split("."); for(i=0;i<_2e.length;i++){ if(parseInt(_2e[i],10)>255){ return false; } } return true; }else{ return false; } },gatewayValidator:function(_2f){ var re=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i; if(re.test(_2f)){ var _30=_2f.split("."); if((parseInt(_30[0],10)==255)||(parseInt(_30[0],10)>=224&&parseInt(_30[0],10)<=239)||(parseInt(_30[0],10)==127)||((parseInt(_30[0],10)==0)&&((parseInt(_30[1],10)!=0)||(parseInt(_30[2],10)!=0)||(parseInt(_30[3],10)!=0)))||(parseInt(_30[3],10)==255)){ return false; } for(i=0;i<_30.length;i++){ if(parseInt(_30[i],10)>255){ return false; } } return true; }else{ return false; } },limit:function(_31,_32,_33){ var low=Math.min(_32,_33),_34=Math.max(_32,_33); return Math.max(Math.min(_31,_34),low); }}; function divisible(_35,_36,_37){ if(typeof _37==="undefined"||_37===0){ return Math.round(_35/_36)*_36; }else{ if(_37==1){ return Math.ceil(_35/_36)*_36; }else{ if(_37==-1){ return Math.floor(_35/_36)*_36; } } } }; function getImageDims(){ var _38={}; _38.left=Number(getCameraParam("imgleft")); _38.top=Number(getCameraParam("imgtop")); _38.width=Number(getCameraParam("imgwidth")); _38.height=Number(getCameraParam("imgheight")); if(typeof _38.left==="number"&&typeof _38.top==="number"&&typeof _38.width==="number"&&typeof _38.height==="number"){ return _38; } }; function getSensorDims(){ var _39={}; _39.left=Number(getCameraParam("sensorleft")); _39.top=Number(getCameraParam("sensortop")); _39.width=Number(getCameraParam("sensorwidth")); _39.height=Number(getCameraParam("sensorheight")); if(typeof _39.left==="number"&&typeof _39.top==="number"&&typeof _39.width==="number"&&typeof _39.height==="number"){ return _39; } }; function getMaxSensorDims(){ var _3a={}; _3a.left=0; _3a.top=0; _3a.width=Number(getCameraParam("maxsensorwidth")); _3a.height=Number(getCameraParam("maxsensorheight")); if(typeof _3a.width==="number"&&typeof _3a.height==="number"){ return _3a; }else{ return getSensorDims(); } }; function checkDims(img){ proceed=true; return (proceed==true); }; function checkImgSize(){ var _3b={}; _3b.left=image.left.getValue(); _3b.top=image.top.getValue(); _3b.right=image.right.getValue(); _3b.bottom=image.bottom.getValue(); return checkDims(_3b); }; function ReadOnlyVisual(_3c,val){ var i; _3c.associatedControl&&_3c.associatedControl.set("readOnly",val); _3c.set("readOnly",val); if(_3c.listeners&&_3c.listeners.length){ for(i=0;i<_3c.listeners.length;i++){ _3c.listeners[i]&&ReadOnlyVisual(_3c.listeners[i],val); } } }; function disableVisual(_3d,val){ var i; _3d.associatedControl&&_3d.associatedControl.set("disabled",val); _3d.set("disabled",val); if(_3d.listeners&&_3d.listeners.length){ for(i=0;i<_3d.listeners.length;i++){ _3d.listeners[i]&&disableVisual(_3d.listeners[i],val); } } }; function createCheckbox(_3e,_3f,on,off,_40,_41,_42){ var _43=(typeof _3f==="function")?_3f("get"):getCameraParam(_3f),_44=document.getElementById("leading_region"),_45=false; if(_43===null){ _43=""; _45=true; } var _46=document.createElement("prelabel"); _46.innerHTML="
"+((_42&&_42.pre)?_42.pre:""); _44.appendChild(_46); var _47=avutil.createNamed("input","checkBox"+_3e); _44.appendChild(_47); var _48=document.createElement("label"); _48.htmlFor=_47.id; _48.value=_48.innerHTML=" "+_3e; _44.appendChild(_48); _44.appendChild(document.createElement("br")); var _49=new dijit.form.CheckBox({name:"checkBox",value:_43,checked:(_43==on),param:_3f,listeners:[],onChange:function(val){ var i; this.value=val?on:off; if(_41){ this.onChange2(); } for(i=0;i"),i; if(!(_50&&_50.noLegend)){ if(_51===null){ _51=""; _54=true; } var div=document.createElement("span"); div.innerHTML=_55+"
"+_4b+"

"; _52.appendChild(div); } for(i=0;i<_4d.length;i++){ var _56=avutil.createNamed("input","radio"+_4b+i); _52.appendChild(_56); var _57=document.createElement("label"); _57.htmlFor=_56.id; _57.value=_57.innerHTML=" "+_4d[i][1]; _52.appendChild(_57); _52.appendChild(document.createElement("br")); _53[i]=new dijit.form.RadioButton({name:_4b,value:_4d[i][0],checked:(_51===_4d[i][0]),param:_4c,listeners:[],onChange:function(val){ var i; if(_4f&&val===true){ this.onChange2i(); } for(i=0;i"+_59+":  "; div.innerHTML+=(_61&&_61.rtspLinkData)?"
":""; div.appendChild(avutil.createNamed("input","textbox"+_59+_67)); if(typeof _5a==="number"&&typeof _5b==="number"){ _65=new dijit.form.NumberTextBox({name:"textbox",value:parseInt(_62,10),constraints:{min:_5a,max:_5b,pattern:"#####"},style:"width:55px",param:_5d},"textbox"+_59+_67); }else{ _65=new dijit.form.TextBox({name:"textbox",value:_62,style:(_61&&_61.rtspLinkData)?"width: 270px; font-style: italic; font-size: 75%;":((_61&&_61.stampData)?"width: 200px;":((_61&&_61.password)?"width: 170px;":"width: 130px;")),maxLength:(_61&&_61.maxLength)?_61.maxLength:255,type:(_61&&_61.password)?"password":"input",param:_5d},"textbox"+_59+_67); } _66&&disableVisual(_65,true); function _68(_69){ if((_69 instanceof dijit.form.NumberTextBox)&&!isNaN(_69.value)){ if(_69.value<_69.constraints.min){ _69.setValue(_69.constraints.min); } if(_69.value>_69.constraints.max){ _69.setValue(_69.constraints.max); } } var _6a=!(_69 instanceof dijit.form.NumberTextBox)||(!isNaN(_69.value)&&_69.constraints.min<=_69.value&&_69.value<=_69.constraints.max); return _6a&&(_5c==null||_5c(_69.value)); }; function _6b(){ if(_68(this)){ if(typeof _5d==="function"){ _5d("set",this.value); }else{ setCameraParam(_5d,this.value); } onParametersChange(); }else{ alert(_59+" has invalid value!"); } }; if(_60){ _65.onBlur=_6b; }else{ _65.onSet=_6b; _65.getValue=function(){ return _68(this)?this.value:null; }; } av.registerControlDependency(_65,_5f); return _65; }; function createSlider(_6c,_6d,_6e,_6f,_70,_71,_72,_73,_74){ var _75=(typeof _6f==="function")?_6f("get"):getCameraParam(_6f),_76=false,_77=document.getElementById("leading_region"); var _78=(_6e-_6d+1)/(_71-_70+1); var _79=(_6e+_6d)/2; var _7a=(_71+_70)/2-0.01; var _7b=(_6d===_70&&_6e===_71); function _7c(val){ if(_7b){ return val; }else{ if(val===_6d){ return _70; }else{ if(val===_6e){ return _71; }else{ var _7d=(val-_79)/_78; var r=Math.round(Math.round(_7d)+_7a); return avutil.limit(r,_71,_70); } } } }; function _7e(_7f){ if(_70<=_71){ if(_7f<=_70){ return _6d; }else{ if(_7f>=_71){ return _6e; } } }else{ if(_7f>=_70){ return _6d; }else{ if(_7f<=_71){ return _6e; } } } if(_7b){ return _7f; }else{ var _80=_6d+(_7f-_70)*(_6e-_6d)/(_71-_70)-0.01; var r=Math.round(_80); return avutil.limit(r,_6e,_6d); } }; if(_75===null){ _75=String(_6d<0?0:_6d); _76=true; } var div=document.createElement("div"); div.innerHTML+="
"+_6c+":  "; div.appendChild(avutil.createNamed("input","textbox"+_6c)); div.appendChild(document.createElement("br")); var _81=avutil.createNamed("div","slider"+_6c); _81.appendChild(avutil.createNamed("span","hrule"+_6c)); _81.appendChild(avutil.createNamed("span","hruleLabels"+_6c)); div.appendChild(_81); _77.appendChild(div); var _82=new dijit.form.HorizontalSlider({name:"slider",value:Number(_7e(_75)),minimum:_6d,maximum:_6e,discreteValues:Math.min(Math.abs(_71-_70)+1,_6e-_6d+1),intermediateChanges:true,style:(_74&&_74.sliderWidth?"width:"+_74.sliderWidth+";":"width:270px;"),_mouseWheeled:function(evt){ },onChange:function(_83){ this.primaryControl.set("value",_7e(_7c(Math.round(this.value)))); if(_73){ this.primaryControl.onChange2(); } av.saved=false; }},"slider"+_6c); var _84=new dijit.form.HorizontalRule({count:Math.min(11,Math.abs(_71-_70)+1),style:"height: 5px;"},"hrule"+_6c); var _85,_86; _86=(_74&&_74.rend&&typeof _74.rend==="string")?String(_6e-1)+"    "+_74.rend:_6e; if(_71-_70===3){ _85=[_6d,Math.round((_6e+_6d)/3),Math.round((_6e+_6d)*2/3),_6e]; }else{ _85=[_6d,Math.round((_6d+_6e)/2-0.01),_86]; } var _87=new dijit.form.HorizontalRuleLabels({style:"height: 1em; font-size: 75%;",labels:_85},"hruleLabels"+_6c); var _88=new dijit.form.NumberTextBox({name:"textbox",value:Number(_7e(_75)),constraints:{min:_6d,max:_6e},style:"width:35px;",param:_6f,onChange:function(){ if(_74&&_74.rend&&typeof _74.rend==="string"&&(this.value===_6e||this.value===_74.rend)){ this.set("disabled",true); this.set("displayedValue",_74.rend); }else{ if(_74&&_74.rend&&typeof _74.rend==="string"&&_6d<=this.value&&this.value<_6e){ this.set("disabled",false); this.set("displayedValue",this.value); } } },onKeyPress:function(evt){ var val; if(evt.keyCode===13){ val=parseInt(this.get("value"),10); if(typeof val==="number"){ this.value=val; this.onBlur(); } } },onBlur:function(){ if(_89(this)){ this.set("value",_7e(_7c(Math.round(this.value)))); this.associatedControl.set("value",this.value); } }},"textbox"+_6c); _88.associatedControl=_82; _82.primaryControl=_88; _76&&disableVisual(_88,true); _88.onChange(); function _89(_8a){ return !isNaN(_8a.value)&&(_8a.constraints?_8a.constraints.min:_8a.minimum)<=_8a.value&&_8a.value<=(_8a.constraints?_8a.constraints.max:_8a.maximum); }; function _8b(){ if(_89(this.associatedControl)){ if(typeof _6f==="function"){ _6f("set",_7c(this.associatedControl.value)); }else{ setCameraParam(_6f,_7c(this.associatedControl.value)); } onParametersChange(); }else{ alert(_6c+" has invalid value!"); } }; if(_73){ _88.onChange2=_8b; }else{ _88.onSet=_8b; _88.getValue=function(){ return _89(this.associatedControl)?_7c(this.associatedControl.value):null; }; } av.registerControlDependency(_88,_72); return _88; }; function createButton(_8c,_8d,_8e,_8f){ var _90=document.getElementById("leading_region"),_91; if(typeof _8f==="object"&&_8f.pre==="br"){ avutil.createAppend(_90,_8f.pre); } avutil.insertText(_90," "); avutil.createAppend(_90,"button","button"+_8c); avutil.insertText(_90," "); if(typeof _8d==="function"){ _91=new dijit.form.Button({label:_8c,id:_8c+"-"+_8d.toString().length,onClick:_8d},"button"+_8c); }else{ if(_8d.substring(0,7)==="setPwd "){ _91=new dijit.form.Button({label:_8c,id:_8c+"-"+_8d.substring(7),onClick:function(){ av.setPassword(_8d,_8e); }},"button"+_8c); }else{ if(_8d.substring(0,12)==="setSecurity "){ _91=new dijit.form.Button({label:_8c,id:_8c+"-"+_8d.substring(12),onClick:function(){ av.setSecurity(_8d,_8e); }},"button"+_8c); }else{ _91=new dijit.form.Button({label:_8c,id:_8c+"-"+_8d+"-"+_8e.length+"-"+_8e.join().length,onClick:function(){ var i,_92,_93=_8d; if(_8d==="onSetVideo"&&checkImgSize()){ applyVideo(); _93="onSet"; }else{ if(_8d==="onSetVideo"){ document.title="onSetVideo empty"; return; }else{ if(_8d==="onSetSave"){ _93="onSet"; _92="true"; } } } if((_8c==="Apply & Save to Flash")&&dijit.byId("radioDHCP/Fixed Selection0").attr("checked")&&!(getCameraParam("netopt")&1)){ var _94=getCameraParam("netopt")|1; _94=_94&(~(1<<3)); setCameraParam("params","save"); av.saved=true; setCameraParam("netopt",_94); image.freeze=true; clearTimeout(image.idTimeoutShort); clearTimeout(image.idTimeoutLong); alert("Please reopen browser with new IP address"); $(":input").attr("disabled",true); return; } var _95=false; for(i=0;i<_8e.length;i++){ if(typeof _8e[i]==="object"){ if(_8e[i]==dijit.byId("textboxIP Address1")){ if(getCameraParam("ip")!==dijit.byId("textboxIP Address1").getValue()){ _95=true; } }else{ _8e[i][_93](); av.saved=false; } }else{ if(typeof _8e[i]==="function"){ _8e[i](); } } } if(_8c==="Apply & Save to Flash"){ setCameraParam("params","save"); av.saved=true; } if((_95)&&!(getCameraParam("netopt")&1)){ var _96=dijit.byId("textboxIP Address1").getValue(); if(!avutil.ipValidator(_96)){ alert("IP Address has invalid value!"); return; } setCameraParam("ip",_96); image.freeze=true; clearTimeout(image.idTimeoutShort); clearTimeout(image.idTimeoutLong); window.location.replace("http://"+_96); alert("Please wait while webpage is reloading with new IP address"); $(":input").attr("disabled",true); disableVisual(this,true); } if(_92==="true"){ setCameraParam("params","save"); } }},"button"+_8c); } } } if(typeof _8f==="object"&&_8f.suf==="br"){ avutil.createAppend(_90,_8f.suf); } return _91; }; function createText(_97,_98,id,_99){ var _9a=document.getElementById("leading_region"),div=document.createElement("div"),_9b=(_99&&_99.noLeadBr?"":"
"),_9c=(_99&&_99.noPostBr?"":"
"),_9d=(_99&&_99.left?"":"
"); id&&(div.id=id); if(_98===true){ div.innerHTML+=(_9b+"
"+_97+"

"); }else{ if(_99&&_99.rtspLinkData===true){ div.innerHTML+=(_9b+""+_97+""+_9c); }else{ if(_99&&_99.fontSmaller===true){ div.innerHTML+=(_9b+""+_97+""+_9c); }else{ if(_99&&_99.bold===true){ div.innerHTML+=(_9b+""+_97+""+_9c); }else{ div.innerHTML+=(_9b+_9d+_97+_9c); } } } } _9a.appendChild(div); return div; }; function accessFull(){ var _9e=getCameraParam("viewer"); return _9e!=="Access denied!"; }; function upgrade(F){ function _9f(){ document.getElementById("PostForm").submit(); alert("The firmware was upgraded. Please wait about 2 minutes while the camera is rebooting and refresh this web page."); }; if(!accessFull()){ alert("Access denied!"); return; } if(F.UpgradeFile.value==""){ alert("Please select a file to upgrade !"); return false; }else{ str=F.UpgradeFile.value.toUpperCase(); suffix=".MB"; if(str.indexOf(suffix,str.length-suffix.length)==-1){ alert("File type not allowed,\nAllowed file: *.mb"); return false; } } clearInterval(image.irisTimeout); imageRemove(); setTimeout(_9f,2000); }; function createUpgradeForm(){ var _a0=document.getElementById("leading_region"),_a1="

"+"
"+"\t \tSelect Firmware File:

"+"\t

"+"\t"+"
",div=avutil.createAppend(_a0,"div"); div.innerHTML+=_a1; }; function upload(F){ function _a2(){ document.getElementById("SpeakerForm").submit(); alert("The file was uploaded. Please wait about 2 minutes while the camera is rebooting and refresh this web page."); }; if(F.SpeakerFile.value==""){ alert("Please select a file to upload !"); return false; } setTimeout(_a2,2000); }; function createSpeakerForm(){ var _a3=document.getElementById("leading_region"),_a4="


"+"
"+"\t \tSpeaker File Upload:

"+"\t

"+"\t"+"
",div=avutil.createAppend(_a3,"div"); div.innerHTML+=_a4; }; var image={type:1,idTimeoutShort:null,idTimeoutLong:null,irisTimeout:null,timeLoadingStarted:avutil.getTime(),loading:true,base_model:2805,maxsensorwidth:1920,maxsensorheight:1088,resolution:"half",fpsMaxVal:30,h264BitrateCheck:false,audioEnable:false,is_sdPlayback:false,is_scaling:false,is_90rotation:false,channel:1,MDrequest:true,rtsp_viewer_psd:0,freeze:false,makeH264String:function(){ return "?res="+this.resolution.getValue()+"&x0="+this.left.getValue()+"&y0="+this.top.getValue()+"&x1="+this.right.getValue()+"&y1="+this.bottom.getValue()+(this.h264BitrateCheck?"&bitrate="+this.h264BitrateNumber.getValue():"&qp="+this.h264Quality.getValue()+(this.h264EnableRatelimit.getValue()=="on"?"&ratelimit="+this.h264Ratelimit.getValue():""))+(0=this.right&&this.left===0){ this.right=_1; this.width=_1; }else{ if(this.left>=this.right&&this.left>=_1){ this.left-=_1; this.width=_1; }else{ if(this.top>=this.bottom&&this.top===0){ this.bottom=_1; this.height=_1; }else{ if(this.top>=this.bottom&&this.top>=_1){ this.top-=_1; this.height=_1; } } } } }},setActual:function(){ this.actual.iResolution=(this.resolution.getValue()==="full"?1:2); this.actual.left=Number(this.left.getValue()); this.actual.top=Number(this.top.getValue()); this.actual.right=Number(this.right.getValue()); this.actual.bottom=Number(this.bottom.getValue()); this.actual.width=this.actual.right-this.actual.left; this.actual.height=this.actual.bottom-this.actual.top; },makeDivisible:function(){ this.actual.makeDivisible(); },getWidth:function(_2){ return this.actual.width/(_2===true?1:this.actual.iResolution); },getHeight:function(_3){ return this.actual.height/(_3===true?1:this.actual.iResolution); },getLeft:function(_4){ return this.actual.left/(_4===true?1:this.actual.iResolution); },getTop:function(_5){ return this.actual.top/(_5===true?1:this.actual.iResolution); },getRight:function(_6){ return this.actual.right/(_6===true?1:this.actual.iResolution); },getBottom:function(_7){ return this.actual.bottom/(_7===true?1:this.actual.iResolution); },Resolution:function(){ return this.actual.iResolution; },toScreen:true,dispRatio:1,mouseMode:"view",ptDown:null,mm:[],mdEnable:0,zoneSize:8,mdTableReady:0,zbnum:8,gridVer:8,gridHor:8,gridSize:32}; function getClientWH(){ var _8=document.getElementById("central_region"); return {w:Math.max(_8.clientWidth-10,80),h:Math.max(_8.clientHeight-15,45)}; }; function antiGamma(_9){ ret=_9; return ret; }; function setGamma(_a){ var i,_b=[]; x=[0,4,8,16,32,64,96,128,160,192,224]; if(_a<40){ _a=40; }else{ if(_a>100){ _a=100; } } for(i=10;i>=4;i--){ _b[i]=255*Math.pow((x[i]-8)/216,_a/100)+0.5; } for(i=3;i>=0;i--){ _b[i]=x[i]*_b[4]/32+0.5; } for(i=10;i>=0;i--){ setCameraRegister(3,160+i,Math.floor(_b[i])); slowdown(); } setCameraRegister(3,159,1); return Math.round(_b[4]); }; function onParametersChange2(){ if(image.type===3){ clearTimeout(image.idTimeoutShort); image.idTimeoutShort=setTimeout("imageReset()",500); } }; function imageTypeSelection(_c,_d){ if(_c==="get"){ return image.type; }else{ if(_d==2){ var _e=1*image.fps.getValue(); dijit.byId("textbox"+"Frames Per Second").setValue(_e); dijit.byId("slider"+"Frames Per Second").setValue(_e); } image.type=_d; imageReset(); } }; function applyVideo(){ image.makeDivisible(); image.setActual(); image.jpegString=image.makeJpegString(); image.rtspLink.set("value",image.rtspUri_external()); imageReset(); }; function applyVideoIfDims(){ if(checkImgSize()){ applyVideo(); } }; function redraw_seleted_window(_f){ var _10={}; _10.ptLeft=Math.round((_f.left/image.Resolution()-image.getLeft())*image.dispRatio); _10.ptTop=Math.round((_f.top/image.Resolution()-image.getTop())*image.dispRatio); _10.ptWidth=Math.round((_f.width/image.Resolution())*image.dispRatio); _10.ptHeight=Math.round((_f.height/image.Resolution())*image.dispRatio); _10.offLeft=_10.ptLeft+$("#overlay").offset().left,_10.offTop=_10.ptTop+$("#overlay").offset().top; $("#inlay").offset({left:_10.offLeft,top:_10.offTop}); $("#inlay").width(_10.ptWidth); $("#inlay").height(_10.ptHeight); return _10; }; function channel(_11,_12){ if(_11==="get"){ return image.channel; }else{ image.channel=_12; applyVideo(); } }; function mouseMode(_13,_14){ if(_13==="get"){ return image.mouseMode; }else{ image.mouseMode=_14; var _15={}; if(model.hasFocus()&&(_14!="focus")){ dijit.byId("checkBox"+"View Focus Window").set("value",false); } if(model.hasSDcard()&&(_14!="sd_imgsize")){ dijit.byId("checkBox"+"View SD Recording ROI").set("value",false); } if(_14=="focus"){ if(image.is_sdPlayback!=true){ color="transparent"; _15.left=getCameraParam("focusleft"); _15.top=getCameraParam("focustop"); _15.width=getCameraParam("focusright")-_15.left; _15.height=getCameraParam("focusbottom")-_15.top; $("#bg-table").css("background-color",color); $("#border-table").css("border-color","#FFFFFF"); redraw_seleted_window(_15); dijit.byId("radio"+"Control Video with Mouse"+"0").set("checked",true); dijit.byId("checkBox"+"View Focus Window").set("value",true); } }else{ if(_14=="backlight"&&getCameraParam("exposure")=="off"){ color="#00FF00"; border="#AAFFAA"; _15.left=getCameraParam("expwndleft"); _15.top=getCameraParam("expwndtop"); _15.width=getCameraParam("expwndwidth"); _15.height=getCameraParam("expwndheight"); $("#bg-table").css("background-color",color); redraw_seleted_window(_15); }else{ if(_14=="white_balance"&&getCameraParam("wbwndctrl")=="on"){ color="#E0FFFF"; border="#00FFFF"; _15.left=getCameraParam("wbwndleft"); _15.top=getCameraParam("wbwndtop"); _15.width=getCameraParam("wbwndwidth"); _15.height=getCameraParam("wbwndheight"); $("#bg-table").css("background-color",color); redraw_seleted_window(_15); }else{ if(_14=="sd_imgsize"){ if(image.is_sdPlayback!=true){ color="transparent"; _15.left=getCameraParam("sd_imgleft"); _15.top=getCameraParam("sd_imgtop"); _15.width=getCameraParam("sd_imgright")-_15.left; _15.height=getCameraParam("sd_imgbottom")-_15.top; $("#bg-table").css("background-color",color); $("#border-table").css("border-color","#CC6600"); redraw_seleted_window(_15); dijit.byId("radio"+"Control Video with Mouse"+"0").set("checked",true); dijit.byId("checkBox"+"View SD Recording ROI").set("value",true); } }else{ if((_14!="ptz")&&(_14!="backlight")&&(_14!="white_balance")){ dijit.byId("radio"+"Control Video with Mouse"+"0").set("checked",true); } $("#inlay").offset({left:0,top:0}); $("#inlay").width(0); $("#inlay").height(0); } } } } } }; function vbr(_16,_17){ if(_16==="get"){ return "vbr"; }else{ image.h264BitrateCheck=false; dijit.byId("radio"+"cbr0").set("checked",false); tmp_bitrate=1*image.h264BitrateNumber.getValue(); image.h264BitrateNumber.setValue(0); } }; var tmp_bitrate; function cbr(_18,_19){ if(_18==="get"){ if(tmp_bitrate=1*getCameraParam("bitrate")){ dijit.byId("radio"+"vbr0").set("checked",false); image.h264BitrateCheck=true; return "cbr"; } }else{ image.h264BitrateCheck=true; dijit.byId("radio"+"vbr0").set("checked",false); image.h264BitrateNumber.setValue(tmp_bitrate); } }; function videoToScreen(_1a,_1b){ if(_1a==="get"){ return image.toScreen; }else{ image.toScreen=_1b; imageReset(); } }; function preload(){ var _1c=document.getElementById("hiddenImage"); _1c.src=image.jpegUri(); }; function myErrorHandler(){ image.loading=false; }; function showimage(){ var _1d=document.getElementById("hiddenImage"); var _1e=document.getElementById("mainImage"); clearInterval(image.idTimeoutLong); clearTimeout(image.idTimeoutShort); if(image.loading==false){ image.loading=true; }else{ if(model.isDualsensor()){ var _1f,_20; if(browser()=="MSIE"){ var _21=new Image(); _21.src=this.src; _1f=_21.width; _20=_21.height; }else{ _1f=this.width; _20=this.height; } if((image.getWidth()/_1f)>1.2&&(image.getWidth()/_1f)<1.8){ $("#mainImage").width(Math.round(image.dispRatio*_1f)); $("#mainImage").height(Math.round(image.dispRatio*_20)); }else{ $("#mainImage").width(Math.round(image.dispRatio*image.getWidth())),$("#mainImage").height(Math.round(image.dispRatio*image.getHeight())); } }else{ if(image.is_sdPlayback==true){ }else{ if(image.is_scaling==true){ if(browser()=="MSIE"){ var _21=new Image(); _21.src=this.src; _1f=_21.width; _20=_21.height; }else{ _1f=this.width; _20=this.height; } $("#mainImage").width(Math.round(_1f)); $("#mainImage").height(Math.round(_20)); } } } _1e.src=this.src; } image.idTimeoutLong=setInterval("preload()",5000); prepareMDTable(); if(image.mdEnable){ drawMDcells(); } }; function foo(){ }; function hidfoo(){ }; function mainfoo(){ }; function loadImage(){ var _22=document.getElementById("mainImage"); _22.src=image.jpegUri(); }; function imageRemove(){ var _23=document.getElementById("central_region"); clearTimeout(image.idTimeoutShort); clearInterval(image.idTimeoutLong); while(_23!==null&&_23.hasChildNodes()){ if(_23.lastChild.id==="overlay"){ break; } _23.removeChild(_23.lastChild); } }; var idTimeoutDelay; function imageSetup(){ var _24=document.getElementById("central_region"); if(image.type===2){ if(browser()==="MSIE"){ var obj=document.createElement("object"); _24.appendChild(obj); obj.classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"; obj.codebase="C:Program Files (x86)VideoLANVLCaxvlc.dll"; obj.events="True"; obj.id="vlc"; obj.name="vlcplayer"; obj.width=image.dispRatio*image.getWidth(); obj.height=image.dispRatio*image.getHeight(); var _25=document.createElement("param"); _25.setAttribute("Src",image.rtspUri()); _25.setAttribute("Autoplay","True"); _25.setAttribute("ShowDisplay","True"); obj.appendChild(_25); setTimeout(function(){ var vlc=document.getElementById("vlc"); var _26=vlc.playlist.add(image.rtspUri()); vlc.playlist.playItem(_26); },100); }else{ var _27=document.createElement("embed"); _27.src=image.rtspUri(); _27.autoplay="true"; _27.type="application/x-vlc-plugin"; _27.width=image.dispRatio*image.getWidth(); _27.height=image.dispRatio*image.getHeight(); $("#overlay").width(_27.width); $("#overlay").height(_27.height); _24.appendChild(_27); } }else{ if(image.type===1||image.type===3){ _24.innerHTML+="
\t\"\"
\"\""; var w=Math.round(image.dispRatio*image.getWidth()),h=Math.round(image.dispRatio*image.getHeight()); var rot; if(image.is_90rotation&&(image.right.getValue()>image.maxsensorheight)){ rot=w; w=h; h=rot; } $("#mainImage").width(w); $("#mainImage").height(h); $("#overlay").width(w); $("#overlay").height(h); var _28=document.getElementById("hiddenImage"); var _29=document.getElementById("mainImage"); $("#mainImage").mousedown(function(e){ e.preventDefault(); }); $("#mainImage").mousemove(function(e){ e.preventDefault(); }); $("#mainImage").mouseup(function(e){ e.preventDefault(); }); if(image.type===1){ _28.onload=showimage; _28.onError=myErrorHandler; var _2a=0; if(image.is_sdPlayback==true){ _2a=1000/image.sd_fps.getValue(); _2a=(_2a>40)?_2a-10:0; } _29.onload=function(){ image.idTimeoutShort=setTimeout(preload,_2a); }; _28.src=image.jpegUri(); }else{ _28.onload=function(){ _29.src=_28.src; }; } } } image.mdTableReady=0; }; function imageReset(){ imageRemove(); if(image.toScreen){ var _2b=getClientWH(); if(image.is_90rotation&&(image.right.getValue()>image.maxsensorheight)){ image.dispRatio=Math.min(_2b.w/image.getHeight(),_2b.h/image.getWidth(),128); }else{ image.dispRatio=Math.min(_2b.w/image.getWidth(),_2b.h/image.getHeight(),128); } }else{ image.dispRatio=1; } imageSetup(); }; function calculateGrid(ext){ var _2c=getSensorDims(),_2d={},_2e=image.zoneSize; if(image.is_90rotation){ _2d.hor=Math.ceil(_2c.height/_2e/32); _2d.ver=Math.ceil(_2c.width/_2e/32); }else{ _2d.hor=Math.ceil(_2c.width/_2e/32); _2d.ver=Math.ceil(_2c.height/_2e/32); } if(_2d.hor>image.zbnum){ _2d.hor=image.zbnum; } if(_2d.ver>image.zbnum){ _2d.ver=image.zbnum; } _2d.size=_2e*32*image.dispRatio/image.Resolution(); return _2d; }; function drawGrid(_2f){ }; function drawGridScreen(_30,_31,_32){ var tbl=$("#lay-table")[0],row,_33,i,j; tbl.style.tableLayout="fixed"; tbl.width=Math.ceil(_30*_32); tbl.height=Math.ceil(_31*_32); _32=Math.ceil(_32); if(browser()==="MSIE"){ for(i=0;i<_31;i++){ row=tbl.insertRow(); for(j=0;j<_30;j++){ _33=row.insertCell(); _33.id=i+"_"+j; image.mm[i,j]=0; } } }else{ for(i=0;i<_31;i++){ row=tbl.insertRow(i); for(j=0;j<_30;j++){ _33=row.insertCell(j); _33.setAttribute("height",_32-3); _33.id=i+"_"+j; image.mm[i,j]=0; } } } }; function cleargrid(){ var _34; for(i=0;i=image.gridHor){ break; } if(!(_39&(1<=image.gridHor||i>=image.gridVer){ _3e+=(1<<(k%8)); }else{ if(document.getElementById(i+"_"+j).style.backgroundColor!="red"){ _3e+=(1<<(k%8)); } } k++; if(k%8==0){ _3d=_3e.toString(16); if(_3d.length<2){ _3c+="0"; } _3c+=_3d; _3e=0; } } } setCameraParam("mdprivasymask",_3c); getPrivacy(); }; function prepareMDTable(){ function _3f(){ var tbl=document.getElementById("lay-table"); while(tbl.hasChildNodes()){ tbl.removeChild(tbl.firstChild); } }; if(image.mdEnable){ if(image.mdTableReady===0){ var _40=calculateGrid(); _3f(); image.gridHor=_40.hor; image.gridVer=_40.ver; image.gridSize=_40.size; drawGridScreen(_40.hor,_40.ver,_40.size); image.mdTableReady=1; getPrivacy(); } }else{ if(image.mdTableReady){ _3f(); } } }; function showMDGrid(){ if((image.type==1)&&(image.is_sdPlayback!=true)){ image.MDrequest=true; $("#lay-table").css("style","opacity:0.6; filter:Alpha(opacity=60);"); if(browser()!="MSIE"){ $("#lay-table").css("border-color","#00FF00"); } applyVideo(); } }; function hideMDGrid(){ if(image.type==1){ image.MDrequest=false; $("#lay-table").css("style","opacity:0; filter:Alpha(opacity=0);"); $("#lay-table").css("border-color","transparent"); applyVideo(); } }; function eventsRegistration(){ function _1(_2,cX,cY){ var _3={}; _3.left=Math.round(2*cX-_2.right); _3.top=Math.round(2*cY-_2.bottom); _2.right=Math.round(2*cX-_2.left); _2.bottom=Math.round(2*cY-_2.top); _2.left=_3.left; _2.top=_3.top; }; function _4(_5,_6){ return Math.abs(_5.X-_6.X)+Math.abs(_5.Y-_6.Y); }; function _7(_8,_9){ var _a=(_8.X-_9.X)*(_8.Y-_9.Y); return (_a>0?"down":(_a<0?"up":null)); }; function _b(){ $("#inlay").offset({left:0,top:0}); $("#inlay").width(0); $("#inlay").height(0); }; function _c(e){ return (browser()==="MSIE"?{X:e.offsetX,Y:e.offsetY}:{X:e.layerX,Y:e.layerY}); }; function _d(bn){ return (browser()==="MSIE"&&getInternetExplorerVersion()<9)?bn===1:bn===0; }; function _e(bn){ return (bn===2); }; function _f(bn){ return _d(bn)?"primary":(_e(bn)?"secondary":null); }; function _10(e){ return e.target.id==="overlay"; }; function _11(e){ return _d(e.button)||(_e(e.button)&&(image.mouseMode==="motion"||image.mouseMode==="privacy")); }; function _12(e){ if((image.mouseMode==="motion"||image.mouseMode==="privacy")&&(e.ctrlKey||e.shiftKey)){ return e.shiftKey?"over":"under"; }else{ return null; } }; function _13(_14,_15,how){ if((image.mouseMode==="ptz"||image.mouseMode==="ptzback")&&_15>10){ var _16=1; if(model.isDualsensor()){ _16=(getCameraParam("upscaling")=="on"?1:1.6); } image.left.set("value",_14.left*_16); image.top.set("value",_14.top*_16); image.right.set("value",_14.right*_16); image.bottom.set("value",_14.bottom*_16); applyVideo(); if(image.mouseMode==="ptzback"){ image.left.onSet(); image.top.onSet(); image.right.onSet(); image.bottom.onSet(); } } if((image.mouseMode==="backlight"||image.mouseMode==="ptzback")&&_15>10&&_14.width>=128&&_14.height>=128){ if(how==="default"){ setCameraParam("exposure","on"); }else{ setCameraParam("exposure","off"); setCameraParam("expwndleft",_14.left); setCameraParam("expwndtop",_14.top); setCameraParam("expwndwidth",_14.width); setCameraParam("expwndheight",_14.height); } } if((image.mouseMode==="white_balance")&&_15>10&&_14.width>=64&&_14.height>=64){ if(how==="default"){ setCameraParam("wbwndctrl","off"); if(getCameraParam("procversion")<"15777"){ setCameraParam("exposure","on"); } }else{ if(getCameraParam("procversion")<"15777"){ setCameraParam("exposure","off"); } setCameraParam("wbwndleft",_14.left); setCameraParam("wbwndtop",_14.top); setCameraParam("wbwndwidth",_14.width); setCameraParam("wbwndheight",_14.height); setCameraParam("wbwndctrl","on"); } } }; function _17(_18,_19,how,_1a,_1b){ var _1c=32,_1d,_1e; function _1f(_20,_21){ setCameraParam("pmaskleft",_20.left); setCameraParam("pmasktop",_20.top); setCameraParam("pmaskright",_20.right); setCameraParam("pmaskbottom",_20.bottom); setCameraParam("pmaskblock",_21); }; if(getCameraParam("pmask")!=="on"){ alert("To change privacy mask, check Enable Privacy Mask checkbox."); } if(how==="default"){ _1d={left:Math.ceil(_18.left/_1c)-1,top:Math.ceil(_18.top/_1c)-1,right:Math.ceil(_18.right/_1c)-1,bottom:Math.ceil(_18.bottom/_1c)-1}; _1f(_1d,"off"); }else{ if(_1a!==null&&_1b!==null){ _1e=(how==="primary"?"on":"off"); _1d={left:Math.ceil(_18.left/_1c)-1,top:Math.ceil(_18.top/_1c)-1,right:Math.ceil(_18.right/_1c)-1,bottom:Math.ceil(_18.bottom/_1c)-1}; var _22=Math.abs((_1d.right-_1d.left)/(Math.max(_1d.bottom-_1d.top,1))),r={},Y0=(_1a==="under"?_1d.top:_1d.bottom),Y1=Y0,Y2=(_1a==="under"?_1d.bottom:_1d.top),dy=(_1a==="under"?1:-1),_23=0,dx=((_1b==="down"&&_1a==="under")||(_1b==="up"&&_1a==="over")?1:-1),X1,_24; while(Y1+_23!==Y2){ _24=Math.round(_22*Math.abs(Y1+_23-Y0)); if(_24===Math.round(_22*Math.abs(Y1+_23+1-Y0))){ _23+=dy; }else{ X1=(dx>0?_1d.left:_1d.right+dx*_24); r={left:X1,top:Y1,right:X1+_24,bottom:Y1+_23}; _1f(r,_1e); Y1+=_23+dy; _23=0; } } }else{ _1e=(how==="primary"?"on":"off"); _1d={left:Math.ceil(_18.left/_1c)-1,top:Math.ceil(_18.top/_1c)-1,right:Math.ceil(_18.right/_1c)-1,bottom:Math.ceil(_18.bottom/_1c)-1}; _1f(_1d,_1e); } } }; function _25(_26,_27,how){ var _28=32*image.zoneSize,_29,_2a; function _2b(_2c,_2d){ var i,j; alert("MD:"+_2c.left+" "+_2c.top+" "+_2c.right+" "+_2c.bottom+" "+_2d+" "+_28); }; _2a=(how==="primary"?"on":"off"); _29={left:Math.ceil(_26.left/_28)-1,top:Math.ceil(_26.top/_28)-1,right:Math.ceil(_26.right/_28)-1,bottom:Math.ceil(_26.bottom/_28)-1}; setMDMask(_29,_2a); }; function _2e(_2f,_30,how){ if(_2f.left<_2f.right&&_2f.top<_2f.bottom){ if(how==="default"){ _2f.left=Math.round(_2f.right/4); _2f.top=Math.round(_2f.bottom/4); _2f.width=Math.round(_2f.right/2); _2f.height=Math.round(_2f.bottom/2); _2f.right=Math.round(_2f.right*3/4); _2f.bottom=Math.round(_2f.bottom*3/4); } setCameraParam("focusleft",_2f.left); setCameraParam("focustop",_2f.top); setCameraParam("focusright",_2f.right); setCameraParam("focusbottom",_2f.bottom); if(how==="default"){ redraw_seleted_window(_2f); } } }; function _31(_32,_33,how){ if(_32.left<_32.right&&_32.top<_32.bottom){ if(image.is_sdPlayback!=true){ setCameraParam("sd_imgleft",_32.left); setCameraParam("sd_imgtop",_32.top); setCameraParam("sd_imgright",_32.right); setCameraParam("sd_imgbottom",_32.bottom); redraw_seleted_window(_32); } } }; function _34(_35,_36,how,_37,_38){ _35.right=_35.left+_35.width; _35.bottom=_35.top+_35.height; if((image.mouseMode==="ptz"||image.mouseMode==="backlight"||image.mouseMode==="white_balance"||image.mouseMode==="ptzback")&&(how==="default"||how==="primary")){ _13(_35,_36,how); } if(image.mouseMode==="privacy"&&(how==="default"||how==="primary"||how==="secondary")){ _17(_35,_36,how,_37,_38); } if(image.mouseMode==="motion"){ _25(_35,_36,how); } if(image.mouseMode==="focus"){ _2e(_35,_36,how); } if(image.mouseMode==="sd_imgsize"){ _31(_35,_36,how); } }; $("#central_region").mousedown(function(e){ if(!_10(e)||!_11(e)){ return; } image.ptDown=_c(e); $("#midlay").empty(); var _39,_3a; switch(image.mouseMode){ case "view": _39="#888888"; _3a="#FFFFFF"; break; case "ptz": _39="#0000FF"; _3a="#AAAAFF"; break; case "backlight": _39="#00FF00"; _3a="#AAFFAA"; break; case "white_balance": _39="#E0FFFF"; _3a="#00FFFF"; break; case "ptzback": _39="#00BBBB"; _3a="#AAFFFF"; break; case "motion": _39="#FFAA00"; _3a="#FFDDAA"; break; case "privacy": _39="#FF44BB"; _3a="#FFAADD"; break; case "focus": _39="transparent"; _3a="#FFFFFF"; break; case "sd_imgsize": _39="transparent"; _3a="#CC6600"; break; default: _39="#444444"; _3a="FFFFFF"; break; } if(_e(e.button)){ _39="#FFFFFF"; } $("#bg-table").css("background-color",_39); $("#border-table").css("border-color",_3a); return false; }); var _3b=0; $("#central_region").mousemove(function(e){ if(!_10(e)||image.ptDown===null||!_11(e)){ return; } e.stopImmediatePropagation(); var pt1=image.ptDown,pt2=_c(e); var _3c=Math.min(pt1.X,pt2.X),_3d=Math.min(pt1.Y,pt2.Y),_3e=Math.abs(pt1.X-pt2.X),_3f=Math.abs(pt1.Y-pt2.Y),_40=_3c+$("#overlay").offset().left,_41=_3d+$("#overlay").offset().top; if(image.mouseMode!=="privacy"&&image.mouseMode!=="motion"){ $("#inlay").offset({left:_40,top:_41}); $("#inlay").width(_3e); $("#inlay").height(_3f); }else{ var _42=(image.mouseMode==="privacy"?"pm":"pm"),_43=(_d(e.button)?"mask":"unmask"),_44=((_12(e)===null||_7(pt1,pt2)===null)?"rect":(_7(pt1,pt2)+"-"+_12(e))),id="#"+_42+"-"+_43+"-"+_44; if(image.mouseMode==="privacy"){ $("#inlay").offset({left:_40,top:_41}); $("#inlay").width(_3e); $("#inlay").height(_3f); } $(id).width(_3e).height(_3f); $("#midlay").offset({left:_40,top:_41}); $("#midlay").children().not(id).remove(); if($("#midlay").children(id).length===0){ $("#midlay").append($(id).clone()); } } return false; }); $("#central_region").mouseup(function(e){ if(_10(e)&&image.ptDown!==null&&image.mouseMode==="view"&&_d(e.button)){ _b(); image.ptDown=null; return; } e.stopImmediatePropagation(); _b(); if(!_10(e)||image.ptDown===null||!_11(e)){ image.ptDown=null; return; } var pt1=image.ptDown,pt2=_c(e); image.ptDown=null; $("#midlay").empty(); var _45=Math.min(pt1.X,pt2.X),_46=Math.min(pt1.Y,pt2.Y),_47=Math.abs(pt1.X-pt2.X),_48=Math.abs(pt1.Y-pt2.Y),_49={}; _49.left=Math.round((image.getLeft()+_45/image.dispRatio)*image.Resolution()); _49.top=Math.round((image.getTop()+_46/image.dispRatio)*image.Resolution()); _49.width=Math.round(_47*image.Resolution()/image.dispRatio); _49.height=Math.round(_48*image.Resolution()/image.dispRatio); if((image.is_sdPlayback!=true)&&(image.mouseMode=="white_balance"||image.mouseMode=="backlight"||image.mouseMode=="focus"||image.mouseMode=="sd_imgsize")){ redraw_seleted_window(_49); } _34(_49,_4(pt1,pt2),_f(e.button),_12(e),_7(pt1,pt2)); return false; }); $("#central_region").dblclick(function(e){ image.ptDown=null; $("#midlay").empty(); if(_10(e)){ var _4a=((image.mouseMode==="privacy"||image.mouseMode==="motion")?getMaxSensorDims():getImageDims()); _34(_4a,1000,"default"); } }); $("#central_region")[0].f1080pChange=function(){ image.ptDown=null; $("#midlay").empty(); var _4b,_4c=getMaxSensorDims(); image.maxsensorwidth=_4c.width; image.maxsensorheight=_4c.height; _4b=image.mouseMode; image.mouseMode="ptz"; _34(_4c,1000,"default"); image.mouseMode=_4b; if(image.mdEnable){ dijit.byId("checkBox"+"DisableMD").setValue(false); val=getCameraParam("mdzonesize"); image.zoneSize=val; dijit.byId("textbox"+"Zone Size").setValue(val); dijit.byId("slider"+"Zone Size").setValue(val); image.mdTableReady=0; } }; $(document).bind("contextmenu",function(){ return false; }); var _4d=false; $(window).resize(function(){ if(image.toScreen){ if(_4d!==false){ clearTimeout(_4d); } _4d=setTimeout(imageReset,1000); } if(image.mouseMode=="white_balance"||image.mouseMode=="backlight"||image.mouseMode=="focus"||image.mouseMode=="sd_imgsize"){ setTimeout(imageReset,1000); mouseMode("set","view"); } }); $(window).bind("beforeunload",function(){ if((!av.saved)&&(getCameraParam("admin")!="Access denied!")){ return "There are unsaved changes. Please click \"Save All Settings to Flash\" button in Administration tab to save settings."; } }); }; var model={has1080:function(){ return (this.name.substring(0,5)==="10005"); },hasH264:function(){ return true; },hasWDR:function(){ return (this.releasename.substring(3,4)==="6"); },hasCasinoMode:function(){ return ((this.releasename.substring(0,1)==="2")&&(this.releasename.substring(3,4)==="5")); },hasDN:function(){ return (this.feature&1); },hasIR:function(){ return (this.feature&2); },hasAI:function(){ return (this.feature&4); },hasBinning:function(){ return (this.feature&32); },hasFocus:function(){ return (this.feature&256); },hasFocusAid:function(){ return (this.feature&512); },hasAudio:function(){ return (this.feature&2048); },hasSDcard:function(){ return (this.feature&4096); },hasPIris:function(){ return (this.feature&8192); },hasScaling:function(){ return (this.feature&32768); },hasRotate90:function(){ return (this.feature&65536); },hasAdjustableIR:function(){ return (this.feature&131072); },hasSNAPstream:function(){ return (this.feature&262144); },hasWBRev2:function(){ return (this.feature&524288); },is2M:function(){ return (this.name.substring(0,4)==="2805"); },isProduction:function(){ return (this.production&2); },isDualsensor:function(){ return (this.enclosure==5); }}; dojo.addOnLoad(function theAddOnLoad(){ var _1=document.getElementById("leading_region"),_2,_3=[],_4=[],_5=[],_6=[],_7=[],_8=[],_9=[],md=[],pm=[],_a=[],_b=[],_c=[],_d=[],_e=[],_f=image.fpsMaxVal,_10=accessFull(),qi={}; function fps(_11,_12){ var tmp; if(_11==="get"){ tmp=getCameraParam("fps")||0; return (1<=tmp&&tmp<=_f)?tmp:_f+1; }else{ setCameraParam("fps",(1<=_12&&_12<=_f)?_12:0); } }; function _13(_14,_15){ if(_14==="get"){ return getCameraParam("1080p_mode"); }else{ setCameraParam("1080p_mode",_15); $("#central_region")[0].f1080pChange(); } }; var _16=(function(){ var _17,_18=0,_19=65535; return {maxrate:function(){ return _19; },bool:function(_1a,_1b){ if(_1a==="get"){ _17=_17||Number(getCameraParam("bitrate"))||0; return _17>0; }else{ if(_1a==="set"){ _17=_1b?_19:0; } } },number:function(_1c,_1d){ if(_1c==="get"){ _17=_17||Number(getCameraParam("bitrate"))||0; return _17; }else{ if(_1c==="set"){ _17=Number(_1d); setCameraParam("bitrate",_17); if(_17==0||_17>=_18){ setCameraParam("bitrate",_17); }else{ alert("Rates less than 100kbps are not allowed."); } } } }}; })(); var _1e=(function(){ var _1f; function _20(_21,_22,_23){ var v; if(_22==="get"){ _1f=_1f||getCameraParam("netopt")||0; return (_1f&_21)!==0; }else{ if(_22==="set"){ _1f=(_23?_1f|_21:_1f&~_21); setCameraParam("netopt",_1f); } } }; return {dhcp:function(_24,_25){ return _20(1,_24,_25); },lockIP:function(_26,_27){ return _20(8,_26,_27); },limitMTU:function(_28,_29){ return _20(128,_28,_29); },mcast:function(_2a,_2b){ return _20(64,_2a,_2b); },setter:function(){ setCameraParam("netopt",_1f); }}; })(); function _2c(_2d,_2e){ var tmp; if(_2d==="get"){ tmp=getCameraParam("en_multicast"); return (tmp); }else{ setCameraParam("en_multicast",_2e); } }; function _2f(_30,_31){ var tmp; if(_30==="get"){ tmp=getCameraParam("multicast_rec"); return (tmp); }else{ if(getCameraParam("multicast_rec")=="off"){ if(confirm("This setting enables support for responding to incoming multicast traffic to the camera.")){ setCameraParam("multicast_rec","on"); av.saved=false; } }else{ if(confirm("This setting disables support for responding to incoming multicast traffic to the camera. Disabling this feature will not affect the camera's ability to provide multicast video.")){ setCameraParam("multicast_rec","off"); av.saved=false; } } } }; var _32={leftControl:null,topControl:null,width:function(_33,_34){ var _35; if(_33==="get"){ _35=getCameraParam("imgwidth"); return Number(_35)+Number(this.leftControl.getValue()); }else{ if(_33==="set"){ _35=Number(_34)-Number(this.leftControl.getValue()); setCameraParam("imgwidth",_35); } } },height:function(_36,_37){ var _38; if(_36==="get"){ _38=getCameraParam("imgheight"); return Number(_38)+Number(this.topControl.getValue()); }else{ if(_36==="set"){ _38=Number(_37)-Number(this.topControl.getValue()); setCameraParam("imgheight",_38); } } }}; function _39(_3a,_3b){ return _32.width(_3a,_3b); }; function _3c(_3d,_3e){ return _32.height(_3d,_3e); }; function _3f(_40,_41){ if(_40==="get"){ return getCameraRegister(3,21); }else{ if(_40==="set"){ setCameraRegister(3,21,_41); } } }; var _42=[1990,1970,1954,1935,1917,1901,1883,1866,1848,1833,1816,1801,1786,1769,1754,1739,1726,1711,1696,1683,1669,1654,1642,1627,1616,1604,1591,1578,1566,1554,1543,1530,1518,1507,1496,1487,1474,1465,1454,1444,1433,1422,1412,1403,1394,1385,1373,1364,1357,1347,1337,1328,1321,1313,1303,1295,1287,1278,1271,1263,1255,1246,1239,1232,1225,1218,1212,1203,1195,1190,1185,1175,1168,1162,1156,1149,1144,1138,1131,1125,1118,1112,1106,1101,1096,1091,1086,1079,1074,1068,1063,1058,1053,1046,1043,1038,1031,1028,1023,1016]; function _43(_44,_45){ var i,sum=0,tmp,_46,min=10000,_47; if(_44==="get"){ for(i=161;i<=170;i++){ sum+=1*getCameraRegister(3,i); } for(tmp=1;tmp<=100;tmp++){ if(_42[tmp-1]==sum){ break; }else{ _46=sum-_42[tmp-1]; if(_46<0){ _46=-_46; } if(_46100){ tmp=_47; } if(tmp<40){ tmp=40; } return tmp; }else{ setGamma(antiGamma(_45)); } }; function _48(_49,_4a){ var tmp,val; if(_49==="get"){ tmp=getCameraParam("motiondetect"); }else{ setCameraParam("motiondetect",_4a); tmp=_4a; } image.mdEnable=(tmp==="on")?1:0; if(image.mdEnable){ dijit.byId("checkBox"+"DisableMD").setValue(false); if(_49==="set"){ val=getCameraParam("mdzonesize"); image.zoneSize=val; dijit.byId("textbox"+"Zone Size").setValue(val); dijit.byId("slider"+"Zone Size").setValue(val); mouseMode("set","motion"); } image.mdTableReady=0; showMDGrid(); }else{ dijit.byId("checkBox"+"DisableMD").setValue(true); if(_49==="set"){ mouseMode("set","view"); } } if(_49==="get"){ return tmp; } }; function _4b(_4c,_4d){ var tmp,val; var _4e=calculateGrid(); var _4f=_4e.hor*_4e.ver; if(_4c==="get"){ val=getCameraParam("mdsensitivity"); tmp=Math.round(val*100/_4f); if(tmp>100){ tmp=100; } return tmp; }else{ tmp=Math.round(_4d*_4f/100); setCameraParam("mdsensitivity",tmp); } }; function _50(_51,_52){ var tmp,val; if(_51==="get"){ tmp=getCameraParam("mdtotalzones"); }else{ setCameraParam("mdtotalzones",_52); tmp=_52; } if(_51==="set"){ image.zbnum=(_52==1024)?32:8; val=getCameraParam("mdzonesize"); image.zoneSize=val; dijit.byId("textbox"+"Zone Size").setValue(val); dijit.byId("slider"+"Zone Size").setValue(val); val=getCameraParam("mddetail"); dijit.byId("textbox"+"Detail").setValue(val); dijit.byId("slider"+"Detail").setValue(val); val=getCameraParam("mdlevelthreshold"); dijit.byId("textbox"+"Level Threshold").setValue(val); dijit.byId("slider"+"Level Threshold").setValue(val); val=_4b("get",null); dijit.byId("textbox"+"Motion Sensitivity, %").setValue(val); dijit.byId("slider"+"Motion Sensitivity, %").setValue(val); } if(_51==="get"){ return tmp; } }; var _53,_54; function _55(val){ }; var _56,_57,_58=0; var _59,_5a; function _5b(){ _54=1*getCameraParam("focus"); if(_54<=1*_53+10&&_54>=1*_53-10){ if(_58==0){ $("#border-table").css("border-color","#FFFF00"); } }else{ if(_54>_53){ $("#border-table").css("border-color","#00FF00"); }else{ if(_54<_53){ $("#border-table").css("border-color","#FF0000"); } } } _53=_54; if(_58==1){ _59=getCameraParam("focus=status"); if(_59!="on"){ clearTimeout(_57); clearInterval(_56); $("#border-table").css("border-color","#FFFFFF"); _58=0; if(_59=="toodark"){ _5a.setValue("Stopped. Too Dark!"); }else{ _5a.setValue("DONE"); } }else{ _5a.setValue("In process.."); } } }; function _5c(){ clearInterval(_56); }; function _5d(_5e,_5f){ _53=setCameraParam(_5e,_5f); _55(_53); if(_5e=="zoom"&&dijit.byId("checkBox"+"Enable Auto Focus after Zoom").getValue()){ _60(); }else{ clearInterval(_56); _58=0; if(_5f==0){ if(_5a.getValue()=="In process.."){ $("#border-table").css("border-color","#FFFFFF"); _5a.setValue("Stopped"); } }else{ _56=setTimeout(_5b,1000); } } }; function _60(){ clearInterval(_56); _58=1; _56=setInterval(_5b,1000); _5a.setValue("In process.."); }; function _61(_62,_63){ if(_62==="set"){ if(_63){ clearInterval(_56); _58=2; _56=setInterval(_5b,1000); }else{ clearInterval(_56); $("#border-table").css("border-color","#FFFFFF"); _58=0; } } }; function _64(){ if(_65.getValue()=="on"){ var _66=1*getCameraRegister(3,80),_67=1*getCameraRegister(3,98); if(_67<=1){ if(_66&256){ dijit.byId("textbox"+"Iris Status").setValue("Zoomed In"); }else{ if(_66&32){ dijit.byId("textbox"+"Iris Status").setValue("Too Dark"); }else{ dijit.byId("textbox"+"Iris Status").setValue("Evaluating"); } } }else{ if(_67==3||_67==4){ dijit.byId("textbox"+"Iris Status").setValue("Closing"); }else{ if(_67==5){ dijit.byId("textbox"+"Iris Status").setValue("Closed"); }else{ if(_67==6||_67==7||_67==8){ dijit.byId("textbox"+"Iris Status").setValue("Opening"); }else{ dijit.byId("textbox"+"Iris Status").setValue("Unknown"); } } } } }else{ dijit.byId("textbox"+"Iris Status").setValue("Disabled"); } }; var dt=new Date(); var tm0=new String(); var _68=new String(); var tm=new String(); var _69=dt.getTimezoneOffset(); function _6a(){ var _6b; var _6c; _6b=dt.toJSON(); _6c=_6b.split("T"); _6b=_6c[0].split("-"); _6c=_6b[1]+"/"+_6b[2]+"/"+_6b[0]+" "+_6c[1]; _6b=_6c.split("Z"); _6c=_6b[0]; _6b=_6c.split("."); _6c=_6b[0]; return _6c; }; function _6d(){ if(!image.freeze){ tm0=getCameraParam("sd_stampspan"); } tm=tm0.split(","); if(tm[0]>2208988800){ dt.setTime((tm[0]-2208988800-_69*60)*1000); _6e.setValue(_6a()); if(_6f.getValue()=="No recording!"){ _6f.setValue(_6a()); } }else{ if(1*_6e){ _6e.setValue("N/A"); }else{ _6e.setValue("No recording!"); _6f.setValue("No recording!"); } } if(tm[1]>2208988800){ dt.setTime((tm[1]-2208988800-_69*60)*1000); _70.setValue(_6a()); }else{ if(1*_70){ _70.setValue("N/A"); }else{ _70.setValue("No recording!"); } } if(image.is_sdPlayback){ tm0=getCameraParam("sd_playbackstamp"); tm=tm0.split(","); if(tm[0]>2208988800){ dt.setTime((tm[0]-2208988800-_69*60)*1000); _6f.setValue(_6a()); } } }; function _71(_72,_73){ var tmp,val; if(_72==="get"){ var _74=new Date(); setCameraParam("ntp_timestamp",(_74.getTime()/1000+2208988800)); tmp=getCameraParam("sd_recording"); }else{ setCameraParam("sd_recording",_73); tmp=_73; } if(_72==="get"){ return tmp; } }; var _75; var _76="jpeg"; function _77(_78,_79){ if(_78==="set"){ image.is_sdPlayback=_79; if(image.is_sdPlayback==true){ _75=imageTypeSelection("get",0); if(_76=="h264"){ imageTypeSelection("set",2); }else{ imageTypeSelection("set",1); } ReadOnlyVisual(_6f,true); var _7a=Date.parse(_6f.getValue())/1000+2208988800; setCameraParam("sd_playbackstamp",_7a); setTimeout(applyVideo,200); }else{ imageTypeSelection("set",_75); ReadOnlyVisual(_6f,false); applyVideo(); } } }; function _7b(){ if(image.is_sdPlayback){ _77("set",false); _7c.set("label","Click to Play"); }else{ _77("set",true); _7c.set("label","Click to Stop"); } }; function _7d(_7e,_7f){ if(_7e==="set"){ _76=_7f; }else{ return _76; } }; function _80(_81,_82){ if(_81==="get"){ tm0=getCameraParam("sd_playbackstamp"); tm=tm0.split(","); if(tm[0]>2208988800){ dt.setTime((tm[0]-2208988800-_69*60)*1000); return _6a(); } } }; function _83(_84,_85){ if(_84==="set"){ if(_85=="on"){ image.is_scaling=true; }else{ image.is_scaling=false; } applyVideo(); } }; function _86(_87,_88){ if(_87==="get"){ tmp=getCameraParam("scaling"); return tmp; }else{ setCameraParam("scaling",_88); if(_88=="off"){ ViewScaling.setValue(false); } applyVideo(); } }; function _89(_8a,_8b){ if(_8a==="get"){ tmp=1*getCameraParam("rotate"); if(tmp==90||tmp==270){ image.is_90rotation=true; } return tmp; }else{ setCameraParam("rotate",_8b); if(_8b==90||_8b==270){ image.is_90rotation=true; }else{ image.is_90rotation=false; } applyVideo(); } }; function _8c(_8d,_8e){ if(_8d==="set"){ image.audioEnable=(_8e=="on")?true:false; } }; _1.style.fontSize="150%"; model.name=getCameraParam("model=fullname")||""; model.releasename=getCameraParam("model=releasename")||""; image.base_model=1*getCameraParam("model"); model.feature=1*(getCameraParam("features")||""); model.enclosure=1*(getCameraParam("enclosure=code")||""); model.production=1*getCameraRegister(6,166); model.internalpn=getCameraParam("model=internal")||""; if(_10){ avutil.createAppend(_1,"hr"); createText("Image",true,"_picture",{noLeadBr:true}); createSlider("Brightness",-50,50,"brightness",-50,50,null,true); createSlider("Sharpness",0,4,"sharpness",0,4,null,true); createSlider("Saturation",0,6,"saturation",0,6,null,true); if(model.hasWBRev2()){ createSlider("Blue",-30,30,"blue",-30,30,null,true); createSlider("Red",-30,30,"red",-30,30,null,true); }else{ createSlider("Blue",-10,10,"blue",-10,10,null,true); createSlider("Red",-10,10,"red",-10,10,null,true); } createSlider("Gamma",40,100,_43,40,100,null,true); if(model.hasRotate90()){ image.flipped=createRadioSet("Rotate Image",_89,[[0,"0"],[90,"90"],[180,"180"],[270,"270"]],null,true); }else{ image.flipped=createCheckbox("Flip Image","rotate",180,0,null,true); } createCheckbox("Auto Exposure","autoexp","on","off",null,true); createCheckbox("Auto White Balance","white_balance","on","off",null,true); if(getCameraParam("enclosure")!="FLEX"&&model.hasCasinoMode()){ var _8f=createCheckbox("Casino Mode","casino_mode","on","off",null,true); } if(model.hasSNAPstream()){ createCheckbox("SNAPstream","SNAPstream","on","off",null,true); }else{ createCheckbox("Bandwidth Saving Mode","bandwidthsaving","on","off",null,true); } if(model.hasWDR()){ createCheckbox("WDR Motion Compensation","motion_compensation","on","off",null,true); createText("* Disabling WDR Motion Compensation may lead to excess motion blur",false,null,{fontSmaller:true}); } var _90=createRadioSet("Lighting Compensation Frequency","freq",[["50","50Hz"],["60","60Hz"],["0","Custom"]],null,true,{noLeadBr:true,bold:false}); createSlider("Frequency (Hz)",5,255,"freq",5,255,null,true); if(_90[2].checked==false){ dijit.byId("textbox"+"Frequency (Hz)").set("disabled",true); dijit.byId("slider"+"Frequency (Hz)").set("disabled",true); } _90[0].onClick=function(){ dijit.byId("textbox"+"Frequency (Hz)").set("disabled",true); dijit.byId("slider"+"Frequency (Hz)").set("disabled",true); }; _90[1].onClick=function(){ dijit.byId("textbox"+"Frequency (Hz)").set("disabled",true); dijit.byId("slider"+"Frequency (Hz)").set("disabled",true); }; _90[2].onClick=function(){ dijit.byId("textbox"+"Frequency (Hz)").set("disabled",false); dijit.byId("slider"+"Frequency (Hz)").set("disabled",false); }; if(model.hasWBRev2){ createRadioSet("Illumination","illum",[["auto","Automatic"],["incandescent","Incandescent"],["outdoor","Outdoor"],["led","LED"],["fluorescent","Fluorescent"]],null,true); }else{ createRadioSet("Illumination","illum",[["auto","Automatic"],["indoor","Indoor"],["outdoor","Outdoor"],["mix","Mixed"]],null,true); createText("* Mixed mode compensates for excessive red and blue levels of illumination.",false,null,{fontSmaller:true}); } var _91=createRadioSet("Exposure Mode","lowlight",[["highspeed","High Speed"],["speed","Speed"],["balance","Balanced"],["quality","Quality"],["moonlight","Moonlight (TM)"]],null,true); createSlider("Exposure (ms)",1,80,"shortexposures",1,80,_91[0],true); if(getCameraParam("enclosure")!="FLEX"&&model.hasCasinoMode()){ if(_8f.checked){ for(var i=0;i<5;i++){ disableVisual(_91[i],true); } _91[0].attr("checked",true); } dojo.connect(_8f,"onChange",function(){ if(_8f.checked){ for(var i=0;i<5;i++){ disableVisual(_91[i],true); } }else{ for(var i=0;i<5;i++){ disableVisual(_91[i],false); } } for(var i=0;i<5;i++){ if(_91[i].value==getCameraParam("lowlight")){ _91[i].attr("checked",true); break; } } }); } if((getCameraParam("model")!=1105)||(getCameraParam("model=releasename")=="1555DN")){ createSlider("Low Light Noise Filter (%)",0,100,"spacialfilter",0,100,null,true); } if(model.isDualsensor()){ var _92=createRadioSet("Day/Night","daynight",[["auto","Automatic"],["day","Day"],["night","Night"],["dual","Dual Channel Streaming"]],null,true); createSlider("Switching Level",1,100,"nightgain",64,512,_92[0],true); createSlider("Toggle Guard",1,4,"daygain",1,4,_92[0],true,{sliderWidth:"200px"}); createCheckbox("Upscale 1.2MP to 3MP","upscaling","on","off",null,true); }else{ if(model.hasDN()){ var _92=createRadioSet("Day/Night","daynight",[["auto","Automatic"],["day","Day"],["night","Night"]],null,true); model.hasDN()||(disableVisual(_92[0],true),disableVisual(_92[1],true),disableVisual(_92[2],true)); if(model.hasAdjustableIR()){ createRadioSet("Adjustable IR","adjustable_ir",[["adaptive","Enable"],["disabled","Disable"],["preset","Preset"]],null,true); createSlider("IR-Tele Level",0,7,"irtelepos",0,7,null,true); createSlider("IR-Wide Level",0,7,"irwidepos",0,7,null,true); }else{ if(getCameraParam("enclosure=code")!=="11"){ createSlider("Switching Level",1,100,"nightgain",64,512,_92[0],true); createSlider("Toggle Guard",1,4,"daygain",1,4,_92[0],true,{sliderWidth:"200px"}); } if(model.hasIR()){ createRadioSet("IR Light","ir",[["auto","Automatic"],["on","On"],["off","Off"]],null,true); if(getCameraParam("enclosure=code")=="9"){ createSlider("IR - 1 Light Level",0,32,"irpos_chan1",0,32,null,true); createSlider("IR - 2 Light Level",0,32,"irpos_chan2",0,32,null,true); } } } } } avutil.createAppend(_1,"br"); if(model.hasAI()){ var _65=createCheckbox("Enable Auto Iris","autoiris","on","off",null,true); model.hasAI()||disableVisual(_65,true); createTextBox("Iris Status",null,null,null,function(){ image.irisTimeout=setInterval(_64,1000); },null,null,false); avutil.createAppend(_1,"br"); }else{ if(model.hasPIris()){ var _65=createCheckbox("Enable P-Iris","piris","on","off",null,true); if(model.isProduction()){ var _93=getCameraRegister(6,170); var _94=createSlider("Iris Position",0,_93,"pirispos",0,_93,null,true); if(_65.checked){ disableVisual(_94,true); } dojo.connect(_65,"onChange",function(){ _94.set("value",_93); dijit.byId("slider"+"Iris Position").set("value",_93); if(_65.checked){ disableVisual(_94,true); }else{ disableVisual(_94,false); } }); } createTextBox("Iris Status",null,null,null,function(){ image.irisTimeout=setInterval(_64,1000); },null,null,false); avutil.createAppend(_1,"br"); } } if(model.hasBinning()&&!model.isDualsensor()&&!(model.hasWDR()&&(model.is2M()||!model.hasDN()))){ createText("Binning",false,null,{left:true}); if(!model.hasWDR()){ createCheckbox("Binning in Day Mode","day_binning","on","off",null,true); } if(model.hasDN()){ createCheckbox("Binning in Night Mode","night_binning","on","off",null,true); } if(model.has1080()){ createCheckbox("1080p Mode",_13,"on","off",null,true); } } if(model.hasScaling()){ createText("
Downscaling",false,null,{left:true}); EnableScaling=createCheckbox("Enable Scaling",_86,"on","off",null,true); ViewScaling=createCheckbox("View Scaled Video",_83,"on","off",EnableScaling,true); var _2=document.createElement("div"); _1.appendChild(_2); var _95=getCameraParam("scaling_size"); _2.innerHTML="
Scaling Size: "; var _96=document.getElementById("scaling_size"); _96.value=_95; _96.onchange=function(){ setCameraParam("scaling_size",_96.value); if((ViewScaling.attr("checked")==true)&&(image.type==2)){ applyVideo(); } }; } } avutil.createAppend(_1,"hr"); createText("Video",true,"_video",{noLeadBr:true}); avutil.createAppend(_1,"hr"); var _97=createRadioSet("Show Video Type",imageTypeSelection,[[0,"Disable Video"],[1,"JPEG over HTTP"],[2,"H.264 over RTP/UDP"]],null,true,{noLeadBr:true}); _97[0].onClick=function(){ if(getCameraParam("admin")!="Access denied!"){ disableVisual(_7c,true); } }; _97[1].onClick=function(){ if(getCameraParam("admin")!="Access denied!"){ disableVisual(_7c,false); } }; _97[2].onClick=function(){ if(getCameraParam("admin")!="Access denied!"){ disableVisual(_7c,false); }else{ var _98=prompt("Please enter viewer password:"); if(_98!=null){ image.rtsp_viewer_psd=_98; }else{ image.rtsp_viewer_psd=""; } if(browser()==="Firefox"){ imageReset(); } } }; model.hasH264()||disableVisual(_97[2],true); if(browser()==="MSIE"){ createText("* For H.264 streaming, please make sure ActiveX Plugin is installed during VLC installation and axvlc.dll is at exactly the same path as
C:\\Program Files (x86)\\VideoLAN\\VLC\\axvlc.dll",false,null,{fontSmaller:true}); } createCheckbox("Fit Video to Window",videoToScreen,true,false,null,true); var _99; if(_10){ _99=[["view","No Control"],["ptz","Enable Digital Zoom Control"],["backlight","ROI Exposure Reference"],["white_balance","ROI White Balance Reference"]]; }else{ _99=[["view","No Control"],["ptz","Enable Digital Zoom Control"]]; } var _9a=createRadioSet("Control Video with Mouse",mouseMode,_99,null,true); if(model.hasScaling()&&_10){ dojo.connect(ViewScaling,"onChange",function(){ if(ViewScaling.checked){ disableVisual(_9a[2],true); disableVisual(_9a[3],true); }else{ disableVisual(_9a[2],false); disableVisual(_9a[3],false); } }); } createText("* Mouse-related control requires running JPEG video
* Click and move to select window to set.
* Double click to reset to default settings.",false,null,{fontSmaller:true}); avutil.createAppend(_1,"hr"); _3.push(image.resolution=createRadioSet("Resolution","imgres",[["half","Half"],["full","Full"]],null,false,{noLeadBr:true})); _3.push(image.jpegQuality=createSlider("JPEG Quality",1,21,"imgquality",1,21,_97[1],false)); var dim=getMaxSensorDims(); image.maxsensorwidth=dim.width; image.maxsensorheight=dim.height; _3.push(image.left=_32.leftControl=createTextBox("Left",0,null,null,"imgleft",null,null,false)); _3.push(image.top=_32.topControl=createTextBox("Top",0,null,null,"imgtop",null,null,false)); _3.push(image.right=createTextBox("Right",64,null,null,_39,null,null,false)); _3.push(image.bottom=createTextBox("Bottom",64,null,null,_3c,null,null,false)); createButton("Preview",applyVideoIfDims,_3,{pre:"br"}); if(_10){ createButton("Apply","onSetVideo",_3,{suf:"br"}); createText("* "Preview" will not apply changes to the camera
* "Apply" will apply changes to the camera; Click "Save all setting to flash" in administration section to save all changes
",false,null,{fontSmaller:true}); } avutil.createAppend(_1,"hr"); createText("H.264",true,"_h264",{noLeadBr:true}); avutil.createAppend(_1,"hr"); createText("H.264 RTSP/RTP/AVP stream",false,null); _4.push(createTextBox("RTSP Unicast port",1,65535,null,"rtspport",null,null,false)); createRadioSet("vbr",vbr,[["vbr","Variable Bitrate Control"]],null,true,{noLegend:true}); _4.push(image.h264Quality=createTextBox("H.264 Quality (36..16)",16,36,null,"qp",null,null,false,{pre:"    "})); createText("* 36 - lowest quality, 16 - highest quality",false,null,{fontSmaller:true}); _4.push(image.h264EnableRatelimit=createCheckbox("Enable Rate Limit","ratelimit_mode","on","off",null,false,{pre:"    "})); _4.push(image.h264Ratelimit=createTextBox("Rate Limit (0-65535 kbps)",0,65535,null,"ratelimit",null,null,false,{pre:"    "})); avutil.createAppend(_1,"br"); createRadioSet("cbr",cbr,[["cbr","Constant Bitrate Control"]],null,true,{noLegend:true}); _4.push(image.h264BitrateNumber=createTextBox("Bitrate (0-65535 kbps)",0,_16.maxrate(),null,_16.number,null,null,false,{pre:"    "})); _4.push(image.fps=createSlider("Frames Per Second",1,_f+1,fps,1,_f+1,null,false,{rend:"Max"})); if(model.hasAudio()){ if(getCameraParam("enclosure=code")=="2"){ createRadioSet("Audio Input","audioinput",[["mic","Microphone"],["linein","Line-in"]],null,true); } _4.push(createCheckbox("Enable Audio in RTSP",_8c,"on","off",null,true,{noLegend:true})); createSlider("Microphone Volume",1,3,"mic_boost",0,2,null,true); if(getCameraParam("enclosure=code")=="2"){ createSlider("Line-in Volume",1,46,"linein_volume",0,45,null,true); } } createButton("Preview ",applyVideoIfDims,_4,{pre:"br"}); if(_10){ createButton("Apply ","onSetVideo",_4,{suf:"br"}); } image.rtspLink=createTextBox("Link for external media players","","",null,function(){ },null,null,false,{rtspLinkData:true}); if(_10){ createText("* "Preview" will not apply changes to the camera
* "Apply" will apply changes to the camera; Click "Save all setting to flash" in administration section to save all changes
",false,null,{fontSmaller:true}); } avutil.createAppend(_1,"hr"); createText("RTP/UDP multicast stream",false,null); var _9b; _5.push(_9b=createCheckbox("Enable RTP Multicast",_1e.mcast,true,false,null,false)); _5.push(createTextBox("IP Address","","",avutil.multicastValidator,"streamip",2,null,false)); _5.push(createTextBox("RTP Port",1,65535,null,"rtpport",null,null,false)); _5.push(createTextBox("SAP Destination IP","","",avutil.multicastValidator,"sapip",null,null,false)); if(_10){ createButton(" Apply ","onSet",_5,{suf:"br"}); } avutil.createAppend(_1,"hr"); if(_10){ if(model.hasFocus()){ if(getCameraParam("enclosure")=="MicroDome"||getCameraParam("enclosure")=="FLEX"){ createText("Focus",true,"_focus",{noLeadBr:true}); avutil.createAppend(_1,"hr"); createCheckbox("View Focus Window",mouseMode,true,false,null,true); avutil.createAppend(_1,"br"); }else{ createText("Zoom & Focus",true,"_focus",{noLeadBr:true}); avutil.createAppend(_1,"hr"); createCheckbox("View Focus Window",mouseMode,true,false,null,true); if((getCameraParam("enclosure")=="Compact")&&(getCameraParam("netversion")=="6075")){ var _9c; if((model.releasename.substring(0,1)<4)&&(model.releasename!="10215PM-S")){ _9c=createRadioSet("Lens Selection","lens_select",[["0","Not Selected"],["2","MPL9-36MPI"],["5","MPL2.8-8.5MPI"]],null,true); }else{ if(model.releasename=="5215PM-S"){ _9c=createRadioSet("Lens Selection","lens_select",[["0","Not Selected"],["1","UHD4.0-10MPI"],["2","MPL9-36MPI"],["3","UHD12-50MPI"],["4","UHD30-120MPI"],["6","MPL3.3-8.5MPI"]],null,true); }else{ if(model.releasename=="10215PM-S"){ _9c=createRadioSet("Lens Selection","lens_select",[["0","Not Selected"],["1","UHD4.0-10MPI"],["3","UHD12-50MPI"],["4","UHD30-120MPI"]],null,true); } } } disableVisual(_9c[0],true); } avutil.createAppend(_1,"br"); avutil.insertText(_1,"Zoom:"); avutil.createAppend(_1,"br"); var val; createButton("+20",function(){ _5d("zoom",20); },null,{pre:""}); createButton("+5",function(){ _5d("zoom",5); },null,{pre:""}); createButton("+1",function(){ _5d("zoom",1); },null,{pre:""}); avutil.createAppend(_1,"br"); createButton("-20 ",function(){ _5d("zoom",-20); },null,{pre:""}); createButton("-5 ",function(){ _5d("zoom",-5); },null,{pre:""}); createButton("-1 ",function(){ _5d("zoom",-1); },null,{pre:""}); createCheckbox("Enable Auto Focus after Zoom","af_zoom","on","off",null,true); avutil.createAppend(_1,"br"); } _5a=createTextBox("Focus",null,null,null,null,null,null,false); disableVisual(_5a,false); ReadOnlyVisual(_5a,true); createButton("+20",function(){ _5d("focus",20); },null,{pre:""}); createButton("+5",function(){ _5d("focus",5); },null,{pre:""}); createButton("+1",function(){ _5d("focus",1); },null,{pre:""}); avutil.createAppend(_1,"br"); createButton("-20 ",function(){ _5d("focus",-20); },null,{pre:""}); createButton("-5 ",function(){ _5d("focus",-5); },null,{pre:""}); createButton("-1 ",function(){ _5d("focus",-1); },null,{suf:""}); createButton("  Full-range Focus  ",function(){ _53=setCameraParam("focus","fullrange"); _55(_53); _60(); },null,{pre:"br"}); createButton("Short-range Focus",function(){ _53=setCameraParam("focus","shortrange"); _55(_53); _60(); },null,{pre:"br"}); createButton("    Stop    ",function(){ _5d("focus",0); },null,{pre:"br",suf:"br"}); createText("* A GREEN focus window indicates moving toward optimal
* A RED focus window indicates moving away from optimal
* A YELLOW focus window indicates no change
* The focus window will turn GREY when complete",false,null,{fontSmaller:true}); avutil.createAppend(_1,"br"); avutil.createAppend(_1,"hr"); }else{ avutil.remove("menu_focus"); } createText("Network",true,"_network",{noLeadBr:true}); avutil.createAppend(_1,"hr"); createText("IP Options",false,null); var _9d; _8.push(_9d=createRadioSet("DHCP/Fixed Selection",_1e.dhcp,[[true,"DHCP"],[false,"Fixed IP"]],null,false)); _9d[0].onClick=function(){ ReadOnlyVisual(_9e,true); ReadOnlyVisual(_9f,true); ReadOnlyVisual(_a0,true); disableVisual(_a1,true); }; _9d[1].onClick=function(){ ReadOnlyVisual(_9e,false); ReadOnlyVisual(_9f,false); ReadOnlyVisual(_a0,false); disableVisual(_a1,false); }; var _a0; var _9e; var _9f; _8.push(_a0=createTextBox("IP Address","","",avutil.ipValidator,"ip",1,null,false)); _8.push(_9e=createTextBox("Subnet Mask","","",avutil.maskValidator,"subnetmask",null,null,false)); _8.push(_9f=createTextBox("Default Gateway","","",avutil.gatewayValidator,"gateway",null,null,false)); if(_1e.dhcp("get")){ ReadOnlyVisual(_9e,true); ReadOnlyVisual(_9f,true); ReadOnlyVisual(_a0,true); } if(_1e.lockIP("get")){ ReadOnlyVisual(_a0,true); disableVisual(_9d[0],true); disableVisual(_9d[1],true); } var _a1; _8.push(_a1=createCheckbox("Lock IP",_1e.lockIP,true,false,null,false)); dojo.connect(_a1,"onClick",function(){ if(_a1.checked){ if(_a0.get("value")===getCameraParam("ip")){ ReadOnlyVisual(_a0,true); disableVisual(_9d[0],true); disableVisual(_9d[1],true); }else{ _a1.set("checked",false); alert("Please enter new IP and save to flash before locking IP"); } }else{ ReadOnlyVisual(_a0,false); disableVisual(_9d[0],false); disableVisual(_9d[1],false); } }); if(_1e.dhcp("get")){ disableVisual(_a1,true); } var _a2; _8.push(_a2=createCheckbox("Limit MTU Size",_1e.limitMTU,true,false,null,false)); _8.push(createTextBox("To",256,1500,null,"mtu",null,_a2,false)); var _a3=createButton("Apply & Save to Flash","onSet",_8,{pre:"br",suf:"br"}); avutil.createAppend(_1,"hr"); createText("Ethernet",false,null); var _a4=createRadioSet("Link Speed","eth_negotiation",[["auto","Autonegotiation"],["fixed","Fixed 100MBaseT / Full Duplex"]],null,false); createCheckbox("Enable Multicast Reception",_2f,"on","off",null,true); createCheckbox("Enable Multicast Announce",_2c,"1","0",null,true); _a4[0].onClick=function(){ if(getCameraParam("eth_negotiation")=="fixed"){ if(confirm("When switching between auto negotiation and Fixed 100Mb / Full Duplex, you must also change the settings on the switch to match. Failure to do so may cause unreliable Ethernet connectivity.")){ setCameraParam("eth_negotiation","auto"); av.saved=false; }else{ for(i=0;i * The default Video DSCP value 34 provides a low drop probability and assures forwarding traffic
* The default Management DSCP value 0 provides best effort traffic
* It is not recommended to change the default values for DSCP
* Refer to the Arecont Vision Web Browser Manual for more detailed information regarding the QoS settings",false,null,{fontSmaller:true}); avutil.createAppend(_1,"hr"); createText("802.1x",false,null); avutil.createAppend(_1,"br"); _c.push(createTextBox("EAP Identifier","","",null,function(){ },null,null,false,{maxLength:32}).set("disabled",false)); _c.push(createTextBox("Confirmation","","",null,function(){ },4,null,false,{maxLength:32}).set("disabled",false)); createButton("Set",av.pwdStrSecurityId,_c,{pre:"br"}); createButton("Erase",av.pwdStrSecurityId,null,{suf:"br"}); avutil.createAppend(_1,"br"); createText("(Up to 16 digits, letters and symbols, excluding # % & ` \" < >)",false,null,{fontSmaller:true}); _d.push(createTextBox("CHAP Password","","",null,function(){ },null,null,false,{password:true,maxLength:16})); _d.push(createTextBox("Confirmation","","",null,function(){ },3,null,false,{password:true,maxLength:16})); createButton("Set",av.pwdStrSecurityPwd,_d,{pre:"br"}); createButton("Erase",av.pwdStrSecurityPwd,null,{suf:"br"}); _d.push(createCheckbox("Enable 802.1x","en_8021x","on","off",null,true).set("disabled",false)); avutil.createAppend(_1,"hr"); createText("Miscellaneous",false,null); avutil.createAppend(_1,"br"); _7.push(createTextBox("Camera Name","","",null,"name",null,null,false,{maxLength:32})); _7.push(createTextBox("Second HTTP Port",1,65535,null,"webserverport",null,null,false)); createButton("Apply","onSet",_7,{pre:"br",suf:"br"}); avutil.createAppend(_1,"hr"); if(browser()==="MSIE"){ $("#lay-table").css("border-color","transparent"); } createText("Motion Detection",true,"_motion",{noLeadBr:true}); var _a6; var _a7; var _a8; _a8=createCheckbox("DisableMD","motiondetect","off","on",null,true); var _a9=document.getElementById("leading_region"); var len=_a9.childNodes.length; _a9.removeChild(_a9.childNodes[len-1]); _a9.removeChild(_a9.childNodes[len-2]); _a9.removeChild(_a9.childNodes[len-3]); _a8.domNode.style.display="none"; _a6=createCheckbox("Enable",_48,"on","off",null,true); _a7=createCheckbox("Extended",_50,1024,64,_a8,true); if(dijit.byId("checkBoxExtended").getValue()==1024){ image.zbnum=32; }else{ image.zbnum=8; } md.push(image.zoneSize=createSlider("Zone Size",2,15,"mdzonesize",2,15,_a8,true)); md.push(createSlider("Detail",1,255,"mddetail",1,255,_a8,true)); md.push(createSlider("Level Threshold",2,31,"mdlevelthreshold",2,31,_a8,true)); md.push(createSlider("Motion Sensitivity, %",0,100,_4b,0,100,_a8,true)); createText("* Left click and move to select window to set mask.
* Right click and move to select window to reset mask.",false,null,{fontSmaller:true}); avutil.createAppend(_1,"hr"); createText("Privacy Mask",true,"_privacy",{noLeadBr:true}); var _aa; pm.push(_aa=createCheckbox("Enable Privacy Mask","pmask","on","off",null,true)); dojo.connect(_aa,"onClick",function(){ if(_aa.checked){ mouseMode("set","privacy"); }else{ mouseMode("set","view"); } }); if(model.hasScaling()){ dojo.connect(EnableScaling,"onClick",function(){ if(EnableScaling.checked){ disableVisual(_aa,true); }else{ disableVisual(_aa,false); } }); } createText("* Left click and drag to set mask
* Right click and drag to erase mask",false,null,{fontSmaller:true}); avutil.createAppend(_1,"hr"); createText("Administration",true,"_administration",{noLeadBr:true}); avutil.createAppend(_1,"hr"); createText("Access Control",false,null); createText("(Passwords can be up to 16 letters, digits and symbols, excluding # % & ` \" < >)",false,null,{fontSmaller:true}); createText("Username: \t\tadmin",false,null,{left:true}); _a.push(createTextBox("Admin Password","","",null,function(){ },null,null,false,{password:true,maxLength:16})); _a.push(createTextBox("Confirmation","","",null,function(){ },1,null,false,{password:true,maxLength:16})); createButton("Set",av.pwdStrAdmin,_a,{pre:"br"}); createButton("Erase",av.pwdStrAdmin,null,{suf:"br"}); avutil.createAppend(_1,"br"); createText("Username: \t\tviewer",false,null,{left:true}); _b.push(createTextBox("Viewer Password","","",null,function(){ },null,null,false,{password:true,maxLength:16})); _b.push(createTextBox("Confirmation","","",null,function(){ },2,null,false,{password:true,maxLength:16})); createButton("Set",av.pwdStrViewer,_b,{pre:"br"}); createButton("Erase",av.pwdStrViewer,null,{suf:"br"}); avutil.createAppend(_1,"hr"); createText("Save & Restore Settings",false,null); createButton("Save All Settings to Flash",function(){ if(confirm("Are you sure?")){ setCameraParam("params","save"); av.saved=true; } },null,{pre:"br",suf:"br"}); createButton("Restore to Factory Default",function(){ if(confirm("Are you sure?")){ setTimeout("window.location.reload()",5000); setCameraParam("params","factory"); av.saved=true; } },null,{pre:"br",suf:"br"}); createButton("Reboot the Camera",function(){ if(confirm("Are you sure? If there are unsaved changes, please click \"Save All Settings to Flash\" button to save settings.")){ setCameraParam("params","reboot"); } },null,{pre:"br",suf:"br"}); avutil.createAppend(_1,"hr"); createText("Firmware Upgrade",false,null); createUpgradeForm(); avutil.createAppend(_1,"hr"); if(model.hasSDcard()){ createText("SD Card",true,"_sdcard",{noLeadBr:true}); createCheckbox("View SD Recording ROI",mouseMode,true,false,null,true); createText("* Mouse-related control requires running JPEG video
* Click and move to select window to set.
* Double click to reset to default settings.",false,null,{fontSmaller:true}); avutil.createAppend(_1,"br"); createText("SD Card Recording",false,null,{bold:true}); var _ab=createRadioSet("Record Enable:",_71,[["on","Continuous Recording"],["off","Stop Continuous Recording AND
Enable Event-triggered Recording"]],null,true,{noLeadBr:true}); createCheckbox("Network Failure","sd_networkfail","on","off",null,true,{pre:"    "}); createCheckbox("Motion Alarm","sd_motionalarm","on","off",null,true,{pre:"    "}); if(!model.hasAdjustableIR()){ createCheckbox("I/O Alarm","sd_ioalarm","on","off",null,true,{pre:"    "}); } image.sd_fps=createSlider("Recording Framerate",1,30,"sd_fps",1,30,null,true); var _ac=createRadioSet("SD Record Video Type","sd_codec",[["jpeg","JPEG"],["h264","H264"]],null,true,{noLeadBr:true}); var _ad=createRadioSet("SD Card Image Resolution","sd_imgres",[["half","Half"],["full","Full"]],null,true,{noLeadBr:true}); avutil.createAppend(_1,"br"); createText("SD Card Playback",false,null,{bold:true}); var _ae=createRadioSet("SD Playback Video Type",_7d,[["jpeg","JPEG"],["h264","H264"]],null,true,{noLeadBr:true}); var _6f=createTextBox("Playback",null,null,null,_80,null,null,false,{stampData:true}); var _7c=createButton("Click to Play",_7b,null,{pre:"br",suf:"br"}); var _6e=createTextBox("Start",null,null,null,function(){ setInterval(_6d,1000); },null,null,false,{stampData:true}); ReadOnlyVisual(_6e,true); var _70=createTextBox("End",null,null,null,function(){ },null,null,false,{stampData:true}); ReadOnlyVisual(_70,true); var _af=createButton("Delete All Records",function(){ if(confirm("Are you sure?")){ setCameraParam("sd","format"); } },null,{pre:"br",suf:"br"}); avutil.createAppend(_1,"hr"); if(getCameraParam("sd")!=="present"){ disableVisual(_6f,true); disableVisual(_7c,true); disableVisual(_ab[0],true); disableVisual(_ab[1],true); dijit.byId("checkBox"+"Network Failure").set("disabled",true); dijit.byId("checkBox"+"Motion Alarm").set("disabled",true); if(!model.hasAdjustableIR()){ dijit.byId("checkBox"+"I/O Alarm").set("disabled",true); } dijit.byId("slider"+"Recording Framerate").set("disabled",true); dijit.byId("textbox"+"Recording Framerate").set("disabled",true); disableVisual(_ad[0],true); disableVisual(_ad[1],true); disableVisual(_ac[0],true); disableVisual(_ac[1],true); disableVisual(_ae[0],true); disableVisual(_ae[1],true); disableVisual(_6e,true); disableVisual(_70,true); disableVisual(_af,true); } }else{ avutil.remove("menu_sdcard"); } createText("About",true,"_about"); createText("Camera Type: \t\t"+(qi.model=model.releasename),false,null,{left:true}); createText("Firmware: \t\t"+(qi.firm=getCameraParam("fwversion")),false,null,{left:true}); createText("JPEG Engine: \t\t"+getCameraParam("procversion"),false,null,{left:true}); createText("Net Version: \t\t"+getCameraParam("netversion"),false,null,{left:true}); createText("MAC Address: \t\t"+(qi.mac=getCameraParam("mac")),false,null,{left:true}); if(model.internalpn!=4294967295){ createText("Internal P/N: \t\t"+model.internalpn,false,null,{left:true}); } avutil.createAppend(_1,"br"); }else{ image.flipped=(getCameraParam("rotate")==180); createText("About",true,"_about"); createText("Camera Type: \t\t"+(qi.model=model.releasename),false,null,{left:true}); createText("Firmware: \t\t"+(qi.firm=getCameraParam("fwversion")),false,null,{left:true}); createText("JPEG Engine: \t\t"+getCameraParam("procversion"),false,null,{left:true}); createText("Net Version: \t\t"+getCameraParam("netversion"),false,null,{left:true}); createText("MAC Address: \t\t"+(qi.mac=getCameraParam("mac")),false,null,{left:true}); if(model.internalpn!=4294967295){ createText("Internal P/N: \t\t"+model.internalpn,false,null,{left:true}); } avutil.remove("menu_picture"); avutil.remove("menu_focus"); avutil.remove("menu_network"); avutil.remove("menu_motion"); avutil.remove("menu_privacy"); avutil.remove("menu_administration"); avutil.remove("menu_sdcard"); } document.getElementById("navMenu").style.visibility="visible"; var _b0=document.getElementById("quick_info"); _b0.innerHTML="

"+"Model "+qi.model+"
"+(qi.firm?"Firmware "+qi.firm:"")+"
"+"MAC  "+qi.mac+"

"; applyVideo(); eventsRegistration(); });