

<div class="detailCon">
	<div id="ptzToggleCon" class="ptzToggle ptzToggleShowIcon"></div>
	<div class="ptzBorderConfCon  IESIXFMLM3" id="ptzControlCon"></div>
	<div style="position:relative;*z-index:1;">
		<div id="hidebg"></div>
	</div>
	<div id="videoPluginCon">
		<ul class="line">
			<div id="popNote" class="popNote">
				<div class="popTitle" id="popTitle">
					<i id="closeTip" style="float:right;"></i>
					<span id="titleText"></span>
				</div>
				<div class="popContent" id ="popContent">
					<div class="popContentError disNone" id="popContentError"></div>
					<div class="popContentCorrect" id="popContentCorrect">
						<span class="check" id="check">{%label.check%}</span>
						<i class="completeIcon"></i>
						<span class="name" id="name"></span>
					</div>
				</div>
				<iframe frameborder="0" class="kinescopeNoteIframe"></iframe>
			</div>
		</ul>
	</div>
	<ul class="line lineConfMenu lineBottom">
		<li class="line lineConf1">
			<input id="del" type="button" class="subBtnB btnA delIcon" value="{%btn.del%}" />
		</li>
		<li class="line lineConf2">
			<input id="clear" type="button" class="subBtnB btnA clearIcon" value="{%btn.clean%}" />
		</li>
		<li class="snapPicLi snapPicBtn" title="{%label.snapPic%}"></li>
	</ul>
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle" id="regionName">{%label.regionOne%}</label>
		</div>
		<div class="configDiv" id="configDiv">
			<ul id="aiEnhance" class="line lineE">
				<li class="Line lineE1">
					<label class="des desA">{%label.smartDetection%}</label>
					<i name="showInfo" id="peopleDetectionEnhanceCheck" class="chObj" value="20"></i>
					<label class="des desA" id="peopleDetectionEnhanceCheckTips">{%label.peopleDetectionEnhance%}</label>
					<i name="showInfo" id="vehicleDetectionEnhanceCheck" class="chObj" value="21"></i>
					<label class="des desA" id="vehicleDetectionEnhanceCheckTips">{%label.vehicleDetectionEnhance%}</label>
					<i name="showInfo" id="nonVehicleDetectionEnhanceCheck" class="chObj" value="22"></i>
					<label class="des desA" id="nonVehicleDetectionEnhanceCheckTips">{%label.nonVehicleDetectionEnhance%}</label>
				</li>
				<li class="Line lineE2">
					<label class="desG">{%label.smartDetectionTips%}</label>
				</li>
			</ul>
			<ul class="line">
				<li class="dragLine">
					<div id="sensitivityDragLine" class="ipcDragLineDiv"></div>
				</li>
			</ul>
			<div class="height"></div>
		</div>
	</div>
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.defenceTime%}</label>
			<div class="actionTitleArrowDiv">
				<label class="actionArrowTitle" id="armingScheduleArrowText">{%label.slideUp%}</label>
				<i class="arrowUp" title= {%label.slideUp%} id="armingScheduleArrow"></i>
			</div>
		</div>
		<div id="timeSchedule">
			<ul class="line">
				<li class="line linePlan">
					<span class="clearAll" id="clearAll">{%label.clear%}</span>
					<label class="tips">{%label.regionEntranceTips%}</label>
				</li>
			</ul>
			<div class="armingSchedule" id="armingSchedule">
				<div id="recPlanGrid" class="test"></div>
			</div>
			<div class="height"></div>
		</div>
	</div>
	<div class="actionBarDiv" id="handleWayDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.handleWay%}</label>
			<div class="actionTitleArrowDiv">
				<label class="actionArrowTitle" id="handleArrowText">{%label.slideUp%}</label>
				<i class="arrowUp" title= {%label.slideUp%} id="handleArrow"></i>
			</div>
		</div>
		<div class="handleWay" id="handleWay">
			<ul class="Line">
				<li class="Line lineE" id="recordLine">
					<i name="showInfo" id="triggerRecord" class="chObj" value="0"></i>
					<label class="des desA">{%label.triggerRecordF%}</label>
					<label class="des desM">{%label.triggerRecordTips%}</label>
				</li>
				<li class="Line lineE" id="captureLine">
					<i name="capture" id="triggerCapture" class="chObj" value="1"></i>
					<label class="des desA">{%label.triggerCapture%}</label>
					<label class="des desM">{%label.captureTips%}</label>
				</li>
				<ul class="line" id="sendToFtp">
					<li class="Line" id="sendToFtpLine">
						<i name="showInfo" id="sendFtp" class="chObj" value="2"></i>
						<label class="des desA">{%label.sendFtp%}</label>
						<label class="des desM">{%label.ftpTips%}</label>
					</li>
					<li class="Line lineTypeSel" id="sendToFtpSwitchCon">
						<label class="des desTypeSel sendFtpDes">{%label.sendFtp%}</label>
						<div id="sendToFtpSwitch" class="switchCon">
							<i class="switchBg"></i>
							<i class="switchBall"></i>
						</div>
						<label id="sendToFtpSwitchDes" class="des desH">{%btn.close%}</label>
						<input id="goToFtpConf" type="button" class="subBtnB btnA goToFtpConf" value="{%btn.goToFtpConf%}" />
					</li>
				</ul>
				<li class="Line lineE" id="msgPushLine">
					<i name="showInfo" id="triggerMsgPush" class="chObj" value="3"></i>
					<label class="des desA">{%label.msgPush%}</label>
					<label class="des desM">{%label.msgPushTips%}</label>
				</li>
				<li class="Line lineE" id="alarmOutLine">
					<i name="showInfo" id="triggerAlarmOut" class="chObj" value="4"></i>
					<label class="des desA">{%label.triggerAlarmDevice%}</label>
					<label class="des desM">{%label.triggerAlarmDeviceTips%}</label>
				</li>
				<li class="Line lineE" id="lightAlarmLine">
					<i name="showInfo" id="triggerLightAlarm" class="chObj" value="5"></i>
					<label class="des desA">{%label.lightAlarm%}</label>
					<label class="des desM">{%label.lightAlarmTips%}</label>
				</li>
				<li class="Line lineE" id="soundAlarmLine">
					<i name="showInfo" id="triggerSoundAlarm" class="chObj" value="6"></i>
					<label class="des desA">{%label.soundAlarm%}</label>
					<label class="des desM">{%label.soundAlarmTips%}</label>
				</li>
			</ul>
			<ul class="line" id="soundInfo">
				<li class="Line lineTypeSel soundTypeCon" id="soundType">
					<label class="des desTypeSel">{%label.soundAlarmType%}</label>
					<span class="selCon">
						<span id="soundTypeSelect" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
					<input id="setSoundAlarm" type="button" value="{%btn.configSet%}" class="subBtnB btnConfSet" />
				</li>
				<li class="Line lineTypeSel soundTypeCon" id="soundTimes">
					<label class="des desTypeSel">{%label.soundAlarmTimes%}</label>
					<span class="selCon">
						<span id="soundTimesSelect" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
				</li>
			</ul>
		</div>
	</div>
	<!-- 功能按钮 -->
	<div class="funcBtnCon">
		<input id="save" type="button" value="{%btn.save%}" class="subBtn btnA"/>
	</div>
</div>
<div id="soundInfoEditCon" class="tableEditLyCon">
	<div class="tableEditCon tableEditConT">
		<div class="innerCon">
			<h4 class="title soundInfoInnerCon">{%label.soundAlarmSet%}</h4>
			<i id="infoCloseTip"></i>
			<ul class="line">
				<li class="Line lineSoundInfoHead">
					<div class="ipcDragLineDiv">
						<label id="soundList" class="des desC desList">{%label.soundList%}</label>
						<div class="fileDiv">
							<input type="button" value="{%btn.uploadFile%}" style="display:none" class="subBtn btnUpload" />
							<input type="file" class="file" name="filename" style="display:none" id="fileName" />
						</div>
					</div>
				</li>
			</ul>
			<div class="tableSoundInfo" id="SoundInfoShowCon">
				<ul class="line">
					<li class="Line lineSoundInfoSubHead" id="devsound_0">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.alarmSound%}</label>
							<input id="testListen_0" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_1">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.warningSound%}</label>
							<input id="testListen_1" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_2">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.waringZone%}</label>
							<input id="testListen_2" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_3">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerZone%}</label>
							<input id="testListen_3" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_4">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.noParking%}</label>
							<input id="testListen_4" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_5">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.monitorArea%}</label>
							<input id="testListen_5" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_6">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.helloWelcome%}</label>
							<input id="testListen_6" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_7">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.noTouching%}</label>
							<input id="testListen_7" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_8">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.privateZone%}</label>
							<input id="testListen_8" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_9">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerWater%}</label>
							<input id="testListen_9" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_10">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerHeight%}</label>
							<input id="testListen_10" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_11">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.gabbageClassify%}</label>
							<input id="testListen_11" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_12">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.intoWorkshop%}</label>
							<input id="testListen_12" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_13">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid%}</label>
							<input id="testListen_13" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_14">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.tempWarning%}</label>
							<input id="testListen_14" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_15">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.maskWorn%}</label>
							<input id="testListen_15" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_16">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.maskRequest%}</label>
							<input id="testListen_16" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_17">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid1%}</label>
							<input id="testListen_17" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_18">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid2%}</label>
							<input id="testListen_18" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_19">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid3%}</label>
							<input id="testListen_19" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_0" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit0" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text0" for="usrdef_edit0" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename0" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete0" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test0" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel0" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save0" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_1" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit1" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text1" for="usrdef_edit1" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename1" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete1" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test1" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel1" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save1" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_2" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit2" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text2" for="usrdef_edit2" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename2" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete2" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test2" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel2" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save2" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<iframe frameborder="0" class="innerIframe"></iframe>
	</div>
</div><script type="text/javascript">function init(){function q(a,c){var b="";switch(parseInt(a)){case ENONE:return!0;case IPCSMDENABLEERR:b=errStr.IPCParamInvalid;break;case EINVARG:b=errStr.IPCParamInvalid;break;case IPCSMDSENSITIVITYERR:b=errStr.sensitivityErr;break;case IPCUMGUESTNAUTH:b=errStr.invPermissionDenied;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFYRECORDENERR:case IPCNOTIFYFTPENERR:case IPCNOTIFMSGPUSHENERR:case IPCNOTIFCAPTUREENERR:case IPCNOTIFSOUNDALARMENERR:b=errStr.IPCHandleInalid;break;case IPCSMDREGIONEILLEGAL:b=
errStr.regionIllegal;break;case IPCSMDREGIONNUMERR:b=errStr.regionNumErr;break;case IPCARMINGSCHEDULEEOVERFLOW:b=errStr.armingScheduleOverflow;break;case IPCARMINGSCHEDULEMIX:b=errStr.armingScheduleMix;break;case IPCARMINGSCHEDULEILLEGAL:b=errStr.armingScheduleIllegal;break;default:b=errStr.invRequestFail}closeToast();showAlert(b,c);return!1}function Da(){clearTimeout(ia);ia=$.setTimeout(function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display="none"})},
5E3)}function vb(){g.catchPic(function(a){var c="";switch(parseInt(a)){case 0:c=label.snapPicEnd;$("#StorageFolder").css("background-image","url(../web-static/images/save_reddot.png)");break;case 1:c=label.snapPicSaveFail;break;case 2:return;case 3:c=label.diskLess;break;case 7:c=label.pathChange;break;case 8:c=label.pathNoExist}if(0<parseInt(a))clearTimeout(ia),popContentCorrect.style.display="none",popContentError.style.display="inline-block",7==parseInt(a)?titleText.innerHTML=label.cue:titleText.innerHTML=
label.snapPicFail,popContentError.innerHTML=c;else{var b=g.getPicFileStoragePath(),c=b.lastIndexOf("\\"),c=b.substr(c+1);popContentCorrect.style.display="inline-block";popContentError.style.display="none";titleText.innerHTML=label.snapPicSuccess;wb.innerHTML=c;check.onclick=function(){g.openFileStorageFolder(b)};Da()}$("#popNote").animate({bottom:"0px"});id("popNote").style.display="inline-block";log(a);7==parseInt(a)&&Da()})}function xb(){for(var a=[],c=0,b=0,e,r=0;4>c;c++){b=g.getIntelligentRegion(c);
if(null==b.pt1_x||0==b.pt1_x&&0==b.pt1_y&&0==b.pt2_x&&0==b.pt2_y)return null;if(0<=b.pt1_x){e={};e[ja]=c+1+"";e[ka]=b.pt1_x;e[Ea]=b.pt1_y;e[Fa]=b.pt2_x;e[Ga]=b.pt2_y;e[Ha]=b.pt3_x;e[Ia]=b.pt3_y;e[Ja]=b.pt4_x;e[Ka]=b.pt4_y;e[La]=h[c];for(b=0;b<d.length;b++)d[b].bSupported&&(e[d[b].uciName]=d[b].aiEnhanceTypeValue[c]);a[r++]=e}}return a}function Ma(a){var c=id("videoPluginCon").offsetHeight;void 0==a?$.BSHOWPTZCTRL?g.setSize({height:"372px",width:"496px"}):g.setSize({height:"396px",width:"720px"}):
g.setSize({height:c+"px",width:c*a+"px"})}function yb(a){var c,b=[];if(void 0==a)return b.push('"0000-0000:0"'),b;a instanceof Array||(a=a.match(/\d{4}-\d{4}/g));for(var d=0;d<a.length;d++){c=a[d];var e=c.split(/[-]/,2);c=parseInt(e[0],10);e=parseInt(e[1],10);0==c&&0==e?b.push(s._getString(c,e,0)):b.push(s._getString(c,e,1))}return b}function zb(){var a,c=s.getTimeVal(),b={};for(a=0;a<P.length;a++){var d=b,e=Na[a],f;f=c[P[a]];var g=void 0,l=void 0,m=void 0,h=void 0,v=void 0,v=h=void 0;if(void 0==
f)f="";else{void 0==g&&(g=6);l="[";if(1>f.length)l+='"0000-0000"';else for(m=0;m<f.length&&m<g;m++)h=f[m].toString(),v=h.split(/[-,:]/,3),h=parseInt(v[0],10),v=parseInt(v[1],10),h=s._getStringWithoutType(h,v),0<m&&(l+=","),l+='"'+h+'"';f=l+="]"}d[e]=f}return b}function Oa(a){if(C)return!1;var c=xb();if(f!=w||null!=c&&0!=c.length){var b={},d={};b[e]={};b[e][Q]={};b[e][Q][Pa]=w;if(R){b[e][n]={};D&&(b[e][n][Qa]="true"==Ra.getAttribute("checked")?f:p);E&&(b[e][n][Sa]="true"==Ta.getAttribute("checked")?
f:p);F&&(b[e][n][Ua]="true"==S.getAttribute("checked")?f:p);x&&(b[e][n][Va]="true"==T.getAttribute("checked")?f:p);if(G){b[e][n][Wa]="true"==Xa.getAttribute("checked")?f:p;for(var r=2;r<=la;r++)b[e][n]["AO"+r.toString()+"_enabled"]="true"==id("triggerAlarmOut"+r.toString()).getAttribute("checked")?f:p}U&&(b[e][n][Ab]="true"==triggerEmail.getAttribute("checked")?f:p);y&&(b[e][n][Ya]="true"==V.getAttribute("checked")?f:p);u&&(b[e][n][ma]=H?W:"true"==Za.getAttribute("checked")?f:p)}b[e][na]=zb();!0==
I&&(b[e][z]={},b[e][z][$a]=X,b[e][z][ab]=Y);var h=bb&&!oa&&"true"==T.getAttribute("checked"),g=cb&&!pa&&"true"==S.getAttribute("checked"),l=db&&!qa&&"true"==V.getAttribute("checked");h||g||l?((h||g)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,function(r){!0==r?(b[t]={},b[t][uciMsgAlarm.secName.chn1MsgAlarmInfo]={},h&&(b[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=uciMsgAlarm.optValue.enableVal.on),g&&(b[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=
uciMsgAlarm.optValue.enableVal.on),showToast(),$.modify(b,function(b){!0==q(b[ERR_CODE])&&(h&&(oa=1),g&&(pa=1),null!=c?(d[e]={},d[e][A]={},d[e][A][J]=c,$.action(d,function(b){!0==q(b[ERR_CODE])&&showToast("success")})):showToast("success"),"function"==typeof a&&void 0!=a&&a())})):(h&&changeCheckInput(T,!1),g&&changeCheckInput(S,!1))}),l&&showConfirmIpc(label.confirmCaptureOnTip,function(r){!0==r?(b[Z]={},b[Z][uciPicturePlan.secName.eventConfig]={},l&&(b[Z][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=
uciPicturePlan.optValue.on),showToast(),$.modify(b,function(b){!0==q(b[ERR_CODE])&&(l&&(qa=1),null!=c?(d[e]={},d[e][A]={},d[e][A][J]=c,$.action(d,function(b){!0==q(b[ERR_CODE])&&showToast("success")})):showToast("success"),"function"==typeof a&&void 0!=a&&a())})):l&&changeCheckInput(V,!1)})):(showToast(),$.modify(b,function(b){!0==q(b[ERR_CODE])&&(null!=c?(d[e]={},d[e][A]={},d[e][A][J]=c,$.action(d,function(b){!0==q(b[ERR_CODE])&&showToast("success")})):showToast("success"),"function"==typeof a&&
void 0!=a&&a())}))}else showAlert(label.addOneRegionFirst)}function K(){closeNoteAll();!0==checkNum(id("sensitivityDragLineDragLineInput").value)&&!0==checkNumRange(parseInt(id("sensitivityDragLineDragLineInput").value),100,1)?(h[k]=id("sensitivityDragLineDragLineInput").value,aa.setValue(id("sensitivityDragLineDragLineInput").value),C=!1):(showNote("sensitivityDragLineDragLineInput",errStr.sensitivityErr),C=!0)}function Bb(a){closeNote("sensitivityDragLineDragLineInput");h[k]=a}function Cb(){L=!0;
h[k]=null;for(i=0;i<d.length;i++)d[i].bSupported&&(d[i].aiEnhanceTypeValue[k]=null);if(null==h[0]&&null==h[1]&&null==h[2]&&null==h[3]){id("sensitivityDragLineDragLineInput").value=ba;for(i=0;i<d.length;i++)d[i].bSupported&&(d[i].domName.value=d[i].aiEnhanceTypeValueDefault);M()}for(i=0;i<d.length;i++)d[i].bSupported&&changeCheckInput(d[i].domName,d[i].domName.value==f);g.delIntelligentRegion(PLUGIN_STATE_ON)}function Db(){ca=!0;h=[null,null,null,null];if(0<N)for(i=0;i<d.length;i++)d[i].bSupported&&
(d[i].aiEnhanceTypeValue=[null,null,null,null],d[i].domName.value=d[i].aiEnhanceTypeValueDefault,changeCheckInput(d[i].domName,d[i].domName.value==f));id("sensitivityDragLineDragLineInput").value=ba;g.delIntelligentRegion(PLUGIN_STATE_MINUS);M()}function M(){var a=document.getElementById("hidebg");a.style.display="block";var c=getoffset(id("save")).top-getoffset(id("videoPluginCon")).top;if(0==$("#peCon").length||"none"==$("#peCon").css("display"))a.style.height=c+"px";else{var b=getoffset(id("peCon")).top-
getoffset(id("videoPluginCon")).top+id("peCon").offsetHeight;a.style.height=(c>b?c:b)+"px"}}function eb(){document.getElementById("hidebg").style.display="none"}function Eb(a){Fb.innerHTML=1==a?btn.enableN:btn.close;w=1==a?f:p;!1==g.checkInstalled()?M():0==a?(g.setOSDStatus(0),M()):(g.setOSDStatus(1),null==h[0]&&null==h[1]&&null==h[2]&&null==h[3]?M():eb())}function Gb(a){Hb.innerHTML=1==a?btn.enableN:btn.close;W=1==a?f:p}function Ib(){var a,c={};c[e]={};c[e][NAME]=na;$.query(c,function(b){if(!0==
q(b[ERR_CODE]))for(s.reset(),a=0;a<P.length;a++)s.setTimeVal(P[a],yb(b[e][na][Na[a]]))})}function fb(a){ra?(id("armingScheduleArrow").className="arrowDown",id("armingScheduleArrow").title=label.slideDown,id("armingScheduleArrowText").innerHTML=label.slideDown,gb.style.display="none",ra=!1):(id("armingScheduleArrow").className="arrowUp",id("armingScheduleArrow").title=label.slideUp,id("armingScheduleArrowText").innerHTML=label.slideUp,gb.style.display="",ra=!0)}function hb(a){sa?(id("handleArrow").className=
"arrowDown",id("handleArrow").title=label.slideDown,id("handleArrowText").innerHTML=label.slideDown,ib.style.display="none",sa=!1):(id("handleArrow").className="arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,ib.style.display="",sa=!0)}function jb(a){X=a}function Jb(a){Y=a}function Kb(a,c){selectInit("soundTypeSelect",a,0,jb,"18");id("soundTypeSelect").resetSel(c)}function B(){showConfirmIpc(label.resCloseOnTip,function(a){!0==a&&(gResSwitchPageSign=1,
unloadLogin())},btn.cancel,btn.goSwitch)}function ta(){g.playVideo();$("ul.lineConfMenu li.snapPicBtn").show();showDetailCon()}function Lb(){var a=uciLinkageCapability.optName.sound_alarm_capability,c=uciLinkageCapability.optName.msg_push_capability,b=uciLinkageCapability.optName.alarm_out_capability,d=uciLinkageCapability.optName.record_capability,e=uciLinkageCapability.optName.email_capability,f=uciLinkageCapability.optName.ftp_capability,h=uciLinkageCapability.optName.capture_capability,g=function(b){b=
$.linkageCapability[b];return 5>b.length?!1:"1"==b[b.length-5]?!0:!1};F=g(uciLinkageCapability.optName.light_alarm_capability);x=g(a);D=g(c);G=g(b);E=g(d);U=g(e);u=g(f);y=g(h);(R=F||x||D||G||E||U||u||y)?(F||$("#triggerLightAlarm").parent().hide(),x||$("#triggerSoundAlarm").parent().hide(),D||$("#triggerMsgPush").parent().hide(),E||$("#triggerRecord").parent().hide(),G?InsertTriggerAlarmOut("triggerAlarmOut"):$("#triggerAlarmOut").parent().hide(),U||$("#triggerEmail").parent().hide(),u||$("#sendToFtp").hide(),
y||$("#triggerCapture").parent().hide()):id("handleWayDiv").style.display="none"}function Mb(){x&&$.audioAlarmCapability&&(I=1==parseInt($.audioAlarmCapability[Nb])?!0:!1,da=1==parseInt($.audioAlarmCapability[Ob])?!0:!1,ea=parseInt($.audioAlarmCapability[Pb]),ua=$.audioAlarmCapability[va].length);if(!1==I)id("soundInfo").style.display="none";else{id("soundTypeSelect");id("soundTimesSelect");for(var a=[],c=[{str:label.alarmSound,value:0},{str:label.warningSound,value:1},{str:label.waringZone,value:2},
{str:label.dangerZone,value:3},{str:label.noParking,value:4},{str:label.monitorArea,value:5},{str:label.helloWelcome,value:6},{str:label.noTouching,value:7},{str:label.privateZone,value:8},{str:label.dangerWater,value:9},{str:label.dangerHeight,value:10},{str:label.gabbageClassify,value:11},{str:label.intoWorkshop,value:12},{str:label.ebikeForbid,value:13},{str:label.tempWarning,value:14},{str:label.maskWorn,value:15},{str:label.maskRequest,value:16},{str:label.ebikeForbid1,value:17},{str:label.ebikeForbid2,
value:18},{str:label.ebikeForbid3,value:19}],b=0;b<$.audioAlarmCapability[va].length;b++){var d=parseInt($.audioAlarmCapability[va][b]);a.push(d);fa.push(c[d])}selectInit("soundTimesSelect",[{str:label.once,value:1},{str:label.twice,value:2},{str:label.threetimes,value:3},{str:label.fourtimes,value:4},{str:label.fivetimes,value:5}],1,Jb)}if(!1==da)id("setSoundAlarm").style.display="none";else{openSoundInfo("setSoundAlarm",ua,ea,label.usrdefSound);closeSoundInfo("infoCloseTip",e,fa,Kb);for(b=0;b<c.length;b++)0<=
$.inArray(b,a)?(devSoundListen("testListen_"+b,b),devSoundFocus("devsound_"+b,b)):id("devsound_"+b).style.display="none";for(a=0;a<ea;a++)usrDefSoundListen("usrdef_test"+a,a),usrDefSoundDel("usrdef_delete"+a,a),usrDefSoundRename("usrdef_rename"+a,a),usrDefSoundSave("usrdef_save"+a,a),usrDefSoundCancel("usrdef_cancel"+a,a),usrDefSoundNameCheck("usrdef_edit"+a,a),usrDefSoundFocus("usrdef_"+a,a)}}function Qb(){if(null==$.AIEnhanceCapability)id("aiEnhance").style.display="none";else{var a=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.peopleEnhanceVer]),
c=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.vehicleEnhanceVer]),b=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.nonVehicleEnhanceVer]);d[0].bSupported=!isNaN(a)&&0<(a&8)?!0:!1;d[1].bSupported=!isNaN(c)&&0<(c&8)?!0:!1;d[2].bSupported=!isNaN(b)&&0<(b&8)?!0:!1;for(a=0;a<d.length;a++)c=d[a].bSupported,N+=c?1:0,c||(d[a].domName.style.display="none",id(d[a].domName.id+
"Tips").style.display="none",d[a].uciName==ga&&(id(d[0].domName.id+"Tips").innerHTML=label.peopleDetectionEnhance));0==N&&(id("aiEnhance").style.display="none")}}var e=uciRegionEntranceDetection.fileName,Q=uciRegionEntranceDetection.secName.detection,na=uciRegionEntranceDetection.secName.armingSchedule,n=uciRegionEntranceDetection.secName.notifyList,J=uciRegionEntranceDetection.secType.regionInfo,z=uciRegionEntranceDetection.secName.soundAlarmInfo,Pa=uciRegionEntranceDetection.optName.enabled,La=
uciRegionEntranceDetection.optName.sensitivity,ja=uciRegionEntranceDetection.optName.id,ka=uciRegionEntranceDetection.optName.pt1x,Ea=uciRegionEntranceDetection.optName.pt1y,Fa=uciRegionEntranceDetection.optName.pt2x,Ga=uciRegionEntranceDetection.optName.pt2y,Ha=uciRegionEntranceDetection.optName.pt3x,Ia=uciRegionEntranceDetection.optName.pt3y,Ja=uciRegionEntranceDetection.optName.pt4x,Ka=uciRegionEntranceDetection.optName.pt4y,wa=uciRegionEntranceDetection.optName.peopleEnabled,ga=uciRegionEntranceDetection.optName.vehicleEnabled,
xa=uciRegionEntranceDetection.optName.nonVehicleEnabled,Qa=uciRegionEntranceDetection.optName.msgPushEnabled,Sa=uciRegionEntranceDetection.optName.recordEnabled,Ab=uciRegionEntranceDetection.optName.emailEnabled,Wa=uciRegionEntranceDetection.optName.alarmEnabled,ma=uciRegionEntranceDetection.optName.ftpEnabled,Ya=uciRegionEntranceDetection.optName.captureEnabled,Va=uciRegionEntranceDetection.optName.soundAlarmEnabled,Ua=uciRegionEntranceDetection.optName.lightAlarmEnabled,f=uciRegionEntranceDetection.optValue.enableVal.on,
Nb=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,Ob=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,Pb=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,va=uciAlarmAudioTypeCapability.optName.alarmType,p=uciRegionEntranceDetection.optValue.enableVal.off,A=uciRegionEntranceDetection.actionName.addRegions,$a=uciRegionEntranceDetection.optName.soundAlarmType,ab=uciRegionEntranceDetection.optName.soundAlarmTimes,ya=uciUsrDefAlarm.fileName,kb=uciUsrDefAlarm.secName.usrDefAudio,
Rb=uciUsrDefAlarm.optName.id,za=uciUsrDefAlarm.optName.name,lb=!0,Aa,mb,w,Fb=id("intelligentDetectionSwitchDes"),g,k=0,t=uciMsgAlarm.fileName,bb=0,oa=0,cb=0,pa=0,Z=uciPicturePlan.fileName,db=0,qa=0,h=[],ba=50,Sb=p,Tb=p,Ub=p,aa;id("sensitivityDragLineDragLineInput");var nb=id("peopleDetectionEnhanceCheck"),ob=id("vehicleDetectionEnhanceCheck"),pb=id("nonVehicleDetectionEnhanceCheck"),P=[label.Mon,label.Tue,label.Wen,label.Thu,label.Fri,label.Sta,label.Sun],Na=[uciRegionEntranceDetection.optName.mon,
uciRegionEntranceDetection.optName.tue,uciRegionEntranceDetection.optName.wed,uciRegionEntranceDetection.optName.thu,uciRegionEntranceDetection.optName.fri,uciRegionEntranceDetection.optName.sat,uciRegionEntranceDetection.optName.sun],ra=!0,sa=!0,gb=id("timeSchedule"),ib=id("handleWay"),Xa=id("triggerAlarmOut"),Ta=id("triggerRecord"),Ra=id("triggerMsgPush"),T=id("triggerSoundAlarm"),S=id("triggerLightAlarm"),Za=id("sendFtp"),W,Hb=id("sendToFtpSwitchDes"),V=id("triggerCapture"),wb=id("name"),ia,C=
!1,L=!1,ca=!1,s,Ba=1==parseInt($.moduleSpec[uciFunction.optName.corridorMode])?!0:!1,R,F,x,D,G,E,u,U,y,la=isNaN(parseInt($.moduleSpec.alarm_out_num))?1:parseInt($.moduleSpec.alarm_out_num),N=0,d=[{bSupported:!1,uciName:wa,domName:nb,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:Sb},{bSupported:!1,uciName:ga,domName:ob,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:Tb},{bSupported:!1,uciName:xa,domName:pb,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:Ub}],da=!1,I=!1,X,Y,ea,fa=[],ua=0,qb=$.moduleSpec[uciFunction.optName.new_version_capability_list],
rb=qb&&0<=$.inArray(uciImage.fileName,qb),sb=!1,tb=!1,ub=null,H=!1,O=id("ptzToggleCon"),ha=$(".ptzBorderConfCon"),Ca=!0;(function(){var a={},c=0,b=0;Lb();Mb();Qb();a[e]={};a[e][NAME]=[Q];R&&a[e][NAME].push(n);I&&a[e][NAME].push(z);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(a[t]={},a[t][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);a[e][KEY_TABLE]=[J];!0==da&&(a[ya]={},a[ya][KEY_TABLE]=[kb]);Ba&&(a[uciImage.fileName]={},a[uciImage.fileName][NAME]=uciImage.secName.para_switch);rb&&(a[uciImageCapability.fileName]=
{},a[uciImageCapability.fileName][NAME]=[],a[uciImageCapability.fileName][NAME].push(uciImageCapability.secType.capability));$.moduleSpec[uciFunction.optName.captureEnable]&&(a[uciPicturePlan.fileName]={},a[uciPicturePlan.fileName][NAME]=uciPicturePlan.secName.eventConfig);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&(a[uciPicturePlanCapability.fileName]={},a[uciPicturePlanCapability.fileName][NAME]=uciPicturePlanCapability.secName.capability);$.detectionCapability&&1==parseInt($.detectionCapability[uciDetectionCapability.optName.detectionMutexCapability])&&
(a[uciDetectionCapability.fileName]={},a[uciDetection.fileName]={},a[uciDetectionCapability.fileName][KEY_TABLE]=[uciDetectionCapability.secType.detectionMutexList],a[uciDetection.fileName][KEY_NAME]=[uciDetection.secName.detectionMutexConfig]);var k="vedioActiveX";$.BSHOWPTZCTRL?(new PtzControl("ptzControlCon",1),k="ptzVideoActiveX vedioActiveX",$("ul.lineConfMenu").addClass("havePtz"),Ba&&(id("videoPluginCon").style.width="496px")):($("#ptzToggleCon").hide(),$("#ptzControlCon").hide());g=new Plugin({id:"videoPluginCon",
className:k,readyHd:function(b){if(PLUGIN_STATE_ON==b&&!0==lb){lb=!1;g.setIntelligentState(1);g.setOSDSpecialStatus(1);b=formatTableData(Aa);for(var c in b){var a=b[c];void 0!=a[ka]&&g.showIntelligentRegion(parseInt(a[ja])-1,{pt1_x:a[ka],pt1_y:a[Ea],pt2_x:a[Fa],pt2_y:a[Ga],pt3_x:a[Ha],pt3_y:a[Ia],pt4_x:a[Ja],pt4_y:a[Ka]})}g.setOSDStatus(mb.state);tb&&setDomSize($(".vedioActiveX")[0],ub)}}});aa=new DragLine({id:"sensitivityDragLine",name:label.sensitivity,cb:Bb,lowerBound:1});s=new PlanSet("recPlanGrid",
{curType:1});Ib();$("ul.lineConfMenu li.snapPicBtn").hide();$("ul.lineConfMenu li.snapPicBtn").click(function(b){vb()});id("closeTip").onclick=function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display="none"})};O.onclick=function(){Ca?(ha.hide(),Ca=!1,$(O).removeClass("ptzToggleShowIcon").addClass("ptzToggleHideIcon"),O.style.left="757px",$("ul.lineConfMenu").css("width","702px"),g.setSize({height:"396px",width:"704px"}),g.checkInstalled()||(ha.css("width",
"0px"),g.showInstalledTip())):(ha.show(),Ca=!0,O.style.left="549px",$(O).removeClass("ptzToggleHideIcon").addClass("ptzToggleShowIcon"),$("ul.lineConfMenu").css("width","494px"),g.setSize({height:"372px",width:"496px"}),g.checkInstalled()||(ha.css("width","204px"),g.showInstalledTip()))};$.query(a,function(a){if(!0==q(a[ERR_CODE])){Aa=a[e][J];var k=formatTableData(Aa),p=0,l;for(l in k){var m=k[l],p=m[ja]-1;h[l]=m[La];for(b=0;b<d.length;b++)d[b].bSupported&&(d[b].aiEnhanceTypeValue[p]=m[d[b].uciName])}aa.setValue(null==
h[0]?ba:h[0]);$.detectionCapability&&1==parseInt($.detectionCapability[uciDetectionCapability.optName.detectionMutexCapability])&&($.det_mutex_list=formatTableData(a[uciDetectionCapability.fileName][uciDetectionCapability.secType.detectionMutexList]),curIntelligentMode=a[uciDetection.fileName][uciDetection.secName.detectionMutexConfig][uciDetection.optName.currentMutexMode]);for(b=0;b<d.length;b++)d[b].bSupported&&(d[b].aiEnhanceTypeValue[0]=null==d[b].aiEnhanceTypeValue[0]?d[b].aiEnhanceTypeValueDefault:
d[b].aiEnhanceTypeValue[0],changeCheckInput(d[b].domName,d[b].aiEnhanceTypeValue[0]==f),$.det_mutex_list&&(d[b].uciName==wa&&0<=$.inArray(19,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("peopleDetectionEnhanceCheckTips")).addClass("disable"),d[b].aiEnhanceTypeValue[0]==f?$(d[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(d[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),d[b].domName.onclick=B),d[b].uciName==
ga&&0<=$.inArray(20,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("vehicleDetectionEnhanceCheckTips")).addClass("disable"),d[b].aiEnhanceTypeValue[0]==f?$(d[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(d[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),d[b].domName.onclick=B),d[b].uciName==xa&&0<=$.inArray(22,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("nonVehicleDetectionEnhanceCheckTips")).addClass("disable"),
d[b].aiEnhanceTypeValue[0]==f?$(d[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(d[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),d[b].domName.onclick=B)));$.moduleSpec[uciFunction.optName.picturePlanCapability]&&1==parseInt(a[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&(H=!0);if(R){D&&(c=a[e][n][Qa]==f,changeCheckInput(Ra,c));E&&(c=a[e][n][Sa]==f,changeCheckInput(Ta,
c));F&&(c=a[e][n][Ua]==f,changeCheckInput(S,c),cb=1,pa=a[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==f?1:0);x&&(c=a[e][n][Va]==f,changeCheckInput(T,c),bb=1,oa=a[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==f?1:0);if(G&&(c=a[e][n][Wa]==f,changeCheckInput(Xa,c),1<la)){m=c;for(k=2;k<=la;k++)aoEnableOpt="AO"+k.toString()+"_enabled",c=a[e][n][aoEnableOpt]==f,changeCheckInput(id("triggerAlarmOut"+k.toString()),c),m=m&&c;m&&changeCheckInput("triggerAOAll",
!0)}u&&(H&&y?($("#sendToFtpLine").hide(),W=a[e][n][ma],c=W==f?1:0,new Switch("sendToFtpSwitch",c,Gb)):($("#sendToFtpSwitchCon").hide(),$("#sendToFtpLine").show(),$("#goToFtpConf").hide(),c=a[e][n][ma]==f,changeCheckInput(Za,c)));y&&(c=a[e][n][Ya]==f,H&&u&&(c?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(V,c),$.moduleSpec[uciFunction.optName.captureEnable]&&(db=1,qa=a[Z][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==f?1:0))}0==N&&(id("aiEnhance").style.display=
"none");w=a[e][Q][Pa];c=w==f?1:0;mb=new Switch("intelligentDetectionSwitch",c,Eb);if(!0==I){if(!0==da){m={};m=a[ya][kb];k=formatTableData(m);for(l in k)m=k[l],m[za]||(m[za]=label.usrdefSound),fa.push({str:m[za],value:m[Rb]});uploadSoundFile("fileName",g,ua,ea)}selectInit("soundTypeSelect",fa,0,jb,"18");X=a[e][z][$a];Y=a[e][z][ab];soundTypeSelect.changeSel(X);soundTimesSelect.changeSel(Y)}if(Ba){var s=a[uciImage.fileName][uciImage.secName.para_switch][uciImage.optName.rotate_type];l={};l[uciVideo.fileName]=
{};l[uciVideo.fileName][NAME]=uciVideo.secName.main;$.query(l,function(a){!0==q(a[ERR_CODE])&&(a=a[uciVideo.fileName][uciVideo.secName.main],a=a.resolution.split("*")[1]/a.resolution.split("*")[0],s==uciImage.optValue.rotOff?Ma():Ma(a),$("object.vedioActiveX").addClass("vedioActiveX_corridor"),id("videoPluginCon").style.background="black")})}$("ul.lineConfMenu li.snapPicBtn").show();rb?1==parseInt(a[uciImageCapability.fileName][uciImageCapability.secType.capability][uciImageCapability.optName.stitch])?
(sb=!0,a={},a[uciImageCapability.fileName]={},a[uciImageCapability.fileName][NAME]=[],a[uciImageCapability.fileName][NAME].push(uciImageCapability.optName.stitch),$.query(a,function(a){!0==q(a[ERR_CODE])&&sb&&(tb=1==parseInt(a[uciImageCapability.fileName][uciImageCapability.optName.stitch][uciImageCapability.optName.dual_stitching])?!0:!1,a={},a[uciVideo.fileName]={},a[uciVideo.fileName][NAME]=uciVideo.secName.main,$.query(a,function(a){if(!0==q(a[ERR_CODE])){var b=a[uciVideo.fileName][uciVideo.secName.main][uciVideo.optName.resolution].split("*")[0];
a=a[uciVideo.fileName][uciVideo.secName.main][uciVideo.optName.resolution].split("*")[1];b=parseInt(720/(b/a));a=parseInt((396-b)/2);$(".vedioActiveX").addClass("vedioActiveXStitch");ub={height:b,paddingTop:a,paddingBottom:a};ta()}}))})):ta():ta()}});id("save").onclick=Oa;id("clear").onclick=Db;id("del").onclick=Cb;id("clearAll").onclick=function(a){s.reset()};id("armingScheduleArrow").onclick=fb;id("armingScheduleArrowText").onclick=fb;id("handleArrow").onclick=hb;id("handleArrowText").onclick=hb;
nb.onblur=K;ob.onblur=K;pb.onblur=K;id("sensitivityDragLineDragLineInput").onblur=K;id("goToFtpConf").onclick=function(){showConfirmC(label.cue,label.saveTips,function(a){!0==a?Oa(function(){gFtpSwitchPageSign=1;unloadLogin()}):(gFtpSwitchPageSign=1,unloadLogin())},btn.unsave,btn.save,!1)}})();initCheckInput("showInfo",function(a,c){for(i=0;i<d.length;i++)d[i].bSupported&&(d[i].aiEnhanceTypeValue[k]="true"==d[i].domName.getAttribute("checked")?f:p,d[i].domName.value=d[i].aiEnhanceTypeValue[k]);a||
0!=c||showAlert(label.confirmRecordOff)});initCheckInput("capture",function(a){H&&u&&(a?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide())});(function(){g.intelligentCallback(function(a){var c=0;K();if(!0==ca)for(h=[null,null,null,null],c=0;c<d.length;c++)d[c].bSupported&&(d[c].aiEnhanceTypeValue=[null,null,null,null]);else if(!0==L)for(h[k]=null,c=0;c<d.length;c++)d[c].bSupported&&(d[c].aiEnhanceTypeValue[k]=null);if(C){if(!1==L){g.showHighlight(k,1);return}closeNoteAll();C=!1}else g.showHighlight(parseInt(a),
0);switch(parseInt(a)){case 0:k=0;id("regionName").innerHTML=label.regionOne;break;case 1:k=1;id("regionName").innerHTML=label.regionTwo;break;case 2:k=2;id("regionName").innerHTML=label.regionThree;break;case 3:k=3;id("regionName").innerHTML=label.regionFour;break;default:return}if(!1==ca&&!1==L)for(h[k]=null==h[k]?id("sensitivityDragLineDragLineInput").value:h[k],c=0;c<d.length;c++)d[c].bSupported&&(d[c].aiEnhanceTypeValue[k]=null==d[c].aiEnhanceTypeValue[k]?d[c].domName.value:d[c].aiEnhanceTypeValue[k]);
null==h[0]&&null==h[1]&&null==h[2]&&null==h[3]||f!=w||eb();aa.setValue(null==h[k]?ba:h[k]);for(c=0;c<d.length;c++)d[c].bSupported&&(d[c].domName.value=null==d[c].aiEnhanceTypeValue[k]?d[c].aiEnhanceTypeValueDefault:d[c].aiEnhanceTypeValue[k],changeCheckInput(d[c].domName,d[c].domName.value==f),$.det_mutex_list&&(d[c].uciName==wa&&0<=$.inArray(19,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("peopleDetectionEnhanceCheckTips")).addClass("disable"),d[c].domName.value==
f?$(d[c].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(d[c].domName).addClass("checkedDisabled").removeClass("checkDisabled"),d[c].domName.onclick=B),d[c].uciName==ga&&0<=$.inArray(20,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("vehicleDetectionEnhanceCheckTips")).addClass("disable"),d[c].domName.value==f?$(d[c].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(d[c].domName).addClass("checkedDisabled").removeClass("checkDisabled"),
d[c].domName.onclick=B),d[c].uciName==xa&&0<=$.inArray(22,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("nonVehicleDetectionEnhanceCheckTips")).addClass("disable"),d[c].domName.value==f?$(d[c].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(d[c].domName).addClass("checkedDisabled").removeClass("checkDisabled"),d[c].domName.onclick=B)));ca=L=!1})})()}init();
</script><style type="text/css">div.ptzToggle{height:64px;width:12px;position:absolute;cursor:pointer;top:268px;left:549px;z-index:1}div.peCol span.select{font-size:0!important}span.peSelect{width:124px!important;_width:116px!important;font-size:14px!important}#orgDC{width:662px}.displayNone{display:none!important}i.peTypeRd{width:25px!important;height:25px!important}i.timeSeled{background:url(../web-static/images/timeSeled.png) center no-repeat!important}i.timeUnSeled{background:url(../web-static/images/timeUnSeled.png) center no-repeat!important}i.mdtUnSeled{background:url(../web-static/images/mdtUnSeled.png) center no-repeat!important}i.mdtSeled{background:url(../web-static/images/mdtSeled.png) center no-repeat!important}#timingLabel{margin-right:35px;display:inline-block;*display:inline;*zoom:1}#mdtLabel{margin-right:347px;*margin-right:340px;display:inline-block;*display:inline;*zoom:1}label.typeSeled{color:#fff!important}div.handleWay ul.Line label.des{display:inline;vertical-align:middle;margin-left:8px}ul.line label.disable{color:#999}div.handleWay ul.Line label.sendFtpDes{display:inline-block;margin-left:4px;margin-right:4px;width:140px}ul.Line label.desM{font-size:12px;color:#666;line-height:12px}input.goToFtpConf{margin-left:24px;padding:0 12px}div.peCon{left:136px;top:560px;_left:-30px;_top:-10px}div.peCon div.peConDetail div.peCol4{display:none}ul.line li.lineR{display:inline-block;*display:inline;*zoom:1;height:100%;font-size:0;vertical-align:middle;float:right}ul.line li.lineE1{width:100%;padding-top:5px}ul.line li.lineE2{width:100%;margin-bottom:24px}ul.line label.des{display:inline;vertical-align:middle}ul.line label.desA{color:#333;margin-right:16px}li.Line i.checkDisabled{background:url(../../web-static/images/check_disable.png) center no-repeat}li.Line i.checkedDisabled{background:url(../../web-static/images/checked_disable.png) center no-repeat}div.fileDiv{height:30px;overflow:hidden;position:relative;vertical-align:middle}div.fileDiv input.file{font-size:16px;top:0;right:0;opacity:0;filter:alpha(opacity:0);cursor:pointer;position:absolute;vertical-align:top;z-index:1}div.tableEditLyCon{height:0;z-index:300;width:770px}div.tableEditConT{width:640px;height:640px}div.tableSoundInfo{width:616px;height:505px}ul.line li.lineTypeSel{padding:5px 0;_height:32px;width:100%;margin-left:24px}ul.line li.lineSoundInfoHead{width:100%;margin-bottom:16px;height:30px}ul.line li.lineSoundInfoSubHead{border:1px solid #e1e3e6;width:592px;height:40px}ul.line li.lineSoundInfoSub{border:1px solid #e1e3e6;border-top:0;width:592px;height:40px}ul.line label.desTypeSel{font-size:12px;color:#7a8999;width:53px;margin-left:4px;margin-right:17px;letter-spacing:1.1px;line-height:16px}ul.line label.desSoundName{font-size:13px;color:#333;line-height:40px;width:300px;margin-left:16px;text-align:left}ul.line label.desList{margin-right:352px}input.btnConfSet{border-radius:2px;font-size:13px;width:82px;height:30px;margin-left:16px}input.textSoundName{width:238px;margin-left:16px;margin-top:5px}input.btnUpload{border-radius:2px;font-size:13px;width:120px;height:30px;margin-right:24px}input.btnDevSoundTest{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:190px;margin-right:16px}input.btnRename{border-radius:2px;font-size:13px;width:83px;height:26px;margin-top:7px;margin-left:81px;margin-right:4px}input.btnDel{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:4px;margin-right:4px}input.btnUsrdefSoundTest{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:4px;margin-right:16px}input.btnCancel{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:172px;margin-right:4px}input.btnSave{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:4px;margin-right:16px}input.testIcon{background-image:url(../../web-static/images/play_normal.png);background-repeat:no-repeat;background-position:8px 4px;*background-position:4px 2px;padding:0 16px 0 28px;*padding:2px 2px 0 18px;height:26px}input.testIcon:hover{background-image:url(../../web-static/images/play_pressed.png)}input.renameIcon{background-image:url(../../web-static/images/edit_normal.png);background-repeat:no-repeat;background-position:8px 4px;*background-position:4px 2px;padding:0 16px 0 28px;*padding:2px 2px 0 18px;height:26px}input.renameIcon:hover{background-image:url(../../web-static/images/edit_pressed.png)}iframe.innerIframe{border:0;height:640px;width:640px;position:absolute;opacity:0;filter:alpha(opacity=0);top:0;left:0;z-index:-1}#infoCloseTip{background:transparent url("../../web-static/images/closeTip.png") no-repeat scroll 0 12px;width:24px;height:26px;display:inline-block;cursor:pointer}</style>