

<div class="detailCon" id="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="lineSet">
			<span class="selCon IEPZD">
				<span id="regionNumber" class="select">
					<span class="value hsValueB"></span>
					<i class="arrow"></i>
				</span>
			</span>
		</li>
		<li class="lineSet lineConf1">
			<input id="del" type="button" class="subBtnB btnA delIcon" value="{%btn.del%}" />
		</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">
				<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="ebikeDetectionEnhanceCheck" class="chObj" value="22"></i>
					<label class="des desA" id="ebikeDetectionEnhanceCheckTips">{%label.ebikeDetectionEnhance%}</label>
					<i name="showInfo" id="nonVehicleDetectionEnhanceCheck" class="chObj" value="23"></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 lineL1">
				<li class="dragLine">
					<div id="sensitivityDragLine" class="ipcDragLineDiv"></div>
				</li>
				<li class="dragLine marginTop">
					<div id="ratioDragLine" class="ipcDragLineDiv"></div>
				</li>
			</ul>
			<ul class="line lineR">
				<li class="threshold">
					<label class="des desA">{%label.timeThreshold%}</label>
					<input id="thresholdDelay" class="text textA4" maxLength="2" type="text" /><span class="tip">{%label.second%}</span><span class="tip">(0 - 10)</span>
				</li>
				<li id="constantAlarmSwitch" class="marginTop">
					<label class="des desA">{%label.constantAlarm%}</label>
					<div id="constantAlarm" class="switchCon">
						<i class="switchBg"></i>
						<i class="switchBall"></i>
					</div>
					<label class="des desH"></label>
				</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.intrusionDetTips%}</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>
				<div class="line subLine" id="soundInfo">  <!--声音报警联动 - 报警音配置-->
					<div 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.testListen%}" class="subBtnB btnConfSet" />
					</div>
					<div 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>
					</div>
				</div>
				<li class="Line lineE" id="smartTargetTrackLine">
					<i name="showInfo" id="smartTargetTrack" class="chObj" value="7"></i>
					<label class="des desA">{%label.smartTargetTrack%}</label>
					<label class="des desM">{%label.smartTargetTrackTips%}</label>
				</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 s(a,b){var e="";switch(parseInt(a)){case ENONE:return!0;case IPCSMDENABLEERR:e=errStr.IPCParamInvalid;break;case EINVARG:e=errStr.IPCParamInvalid;break;case IPCSMDSENSITIVITYERR:e=errStr.sensitivityErr;break;case IPCSMDTHRESHOLDERR:e=errStr.thresholdDelayErr;break;case IPCSMDPERCENTAGEERR:e=errStr.percentageRatioErr;break;case IPCUMGUESTNAUTH:e=errStr.invPermissionDenied;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFYRECORDENERR:case IPCNOTIFYFTPENERR:case IPCNOTIFMSGPUSHENERR:case IPCNOTIFCAPTUREENERR:case IPCNOTIFSOUNDALARMENERR:e=
errStr.IPCHandleInalid;break;case IPCSMDREGIONEILLEGAL:e=errStr.regionIllegal;break;case IPCSMDREGIONNUMERR:e=errStr.regionNumErr;break;case IPCARMINGSCHEDULEEOVERFLOW:e=errStr.armingScheduleOverflow;break;case IPCARMINGSCHEDULEMIX:e=errStr.armingScheduleMix;break;case IPCARMINGSCHEDULEILLEGAL:e=errStr.armingScheduleIllegal;break;default:e=errStr.invRequestFail}closeToast();showAlert(e,b);return!1}function lb(){clearTimeout(Ja);Ja=$.setTimeout(function(){$("#popNote").animate({bottom:"-150px"},void 0,
void 0,function(){id("popNote").style.display="none"})},5E3)}function ac(){l.catchPic(function(a){var b="";switch(parseInt(a)){case 0:b=label.snapPicEnd;$("#StorageFolder").css("background-image","url(../web-static/images/save_reddot.png)");break;case 1:b=label.snapPicSaveFail;break;case 2:return;case 3:b=label.diskLess;break;case 7:b=label.pathChange;break;case 8:b=label.pathNoExist}if(0<parseInt(a))clearTimeout(Ja),popContentCorrect.style.display="none",popContentError.style.display="inline-block",
7==parseInt(a)?titleText.innerHTML=label.cue:titleText.innerHTML=label.snapPicFail,popContentError.innerHTML=b;else{var e=l.getPicFileStoragePath(),b=e.lastIndexOf("\\"),b=e.substr(b+1);popContentCorrect.style.display="inline-block";popContentError.style.display="none";titleText.innerHTML=label.snapPicSuccess;bc.innerHTML=b;check.onclick=function(){l.openFileStorageFolder(e)};lb()}$("#popNote").animate({bottom:"0px"});id("popNote").style.display="inline-block";log(a);7==parseInt(a)&&lb()})}function mb(a){a=
H[a];null!=a&&void 0!=a[fa]&&l.showIntelligentRegion(0,{pt1_x:a[fa],pt1_y:a[Ka],pt2_x:a[La],pt2_y:a[Ma],pt3_x:a[Na],pt3_y:a[Oa],pt4_x:a[Pa],pt4_y:a[Qa]})}function nb(a){var b,e,y=0<arguments.length?a:x.value;b=l.getIntelligentRegion(0);if(null==b.pt1_x||0==b.pt1_x&&0==b.pt1_y&&0==b.pt2_x&&0==b.pt2_y)return-1;if(0<=b.pt1_x){var n,f,p,d,g,k,h;e=b.pt1_x;d=b.pt1_y;n=b.pt2_x;g=b.pt2_y;f=b.pt3_x;k=b.pt3_y;p=b.pt4_x;h=b.pt4_y;(e-n)*(d-k)==(e-f)*(d-g)||(e-p)*(d-g)==(d-h)*(e-n)||(e-f)*(d-h)==(e-p)*(d-k)||
(n-f)*(g-h)==(n-p)*(g-k)?(showAlert(label.threePointConllineation),e=-1):e=0;if(-1==e)return-1;e={};e[cc]=y+1+"";e[fa]=b.pt1_x.toString();e[Ka]=b.pt1_y.toString();e[La]=b.pt2_x.toString();e[Ma]=b.pt2_y.toString();e[Na]=b.pt3_x.toString();e[Oa]=b.pt3_y.toString();e[Pa]=b.pt4_x.toString();e[Qa]=b.pt4_y.toString();$.BSHOWPTZCTRL&&(e.position_pan=ga[y],e.position_tilt=ha[y],e.position_zoom=ia[y],ja[y]=!0);e[ka]=u[y];e[la]=t[y];e[ma]=q[y];z&&(e[ob]=A[y]);for(b=0;b<c.length;b++)c[b].bSupported&&(e[c[b].uciName]=
c[b].aiEnhanceTypeValue[y]);H[y]=e}return 0}function pb(a){var b=id("videoPluginCon").offsetHeight;void 0==a?$.BSHOWPTZCTRL?l.setSize({height:"372px",width:"496px"}):l.setSize({height:"396px",width:"720px"}):l.setSize({height:b+"px",width:b*a+"px"})}function dc(a){var b,e=[];if(void 0==a)return e.push('"0000-0000:0"'),e;a instanceof Array||(a=a.match(/\d{4}-\d{4}/g));for(var c=0;c<a.length;c++){b=a[c];var n=b.split(/[-]/,2);b=parseInt(n[0],10);n=parseInt(n[1],10);0==b&&0==n?e.push(B._getString(b,
n,0)):e.push(B._getString(b,n,1))}return e}function ec(){var a,b=B.getTimeVal(),e={};for(a=0;a<na.length;a++){var c=e,n=qb[a],f;f=b[na[a]];var p=void 0,d=void 0,g=void 0,k=void 0,h=void 0,h=k=void 0;if(void 0==f)f="";else{void 0==p&&(p=6);d="[";if(1>f.length)d+='"0000-0000"';else for(g=0;g<f.length&&g<p;g++)k=f[g].toString(),h=k.split(/[-,:]/,3),k=parseInt(h[0],10),h=parseInt(h[1],10),k=B._getStringWithoutType(k,h),0<g&&(d+=","),d+='"'+k+'"';f=d+="]"}c[n]=f}return e}function fc(a){var b={},e="0",
c="0",n="0";b.ptz={};b.ptz[uciPTZ.actionName.getPTZStatus]=null;$.action(b,function(b){!0==s(b[ERR_CODE])&&(b=b.ptz.status,e=b.position_pan,c=b.position_tilt,n=b.position_zoom);ga[x.value]=e;ha[x.value]=c;ia[x.value]=n;"function"==typeof a&&a()})}function rb(a){for(var b=0;b<a.length;b++)if(null!=a[b])return!1;return!0}function sb(a){if(Q||R||S)return!1;var b=function(){if(-1!=nb()){var b=0,c=H;if(k==K&&!0==rb(c))showAlert(label.addOneRegionFirst);else{var n=[],b=0,f={},p={};f[g]={};f[g][oa]={};f[g][oa][L]=
K;if(pa){f[g][r]={};T&&(f[g][r][tb]="true"==ub.getAttribute("checked")?k:m);U&&(f[g][r][vb]="true"==wb.getAttribute("checked")?k:m);V&&(f[g][r][xb]="true"==qa.getAttribute("checked")?k:m);M&&(f[g][r][yb]="true"==ra.getAttribute("checked")?k:m);if(W){f[g][r][zb]="true"==Ab.getAttribute("checked")?k:m;for(var d=2;d<=Ra;d++)f[g][r]["AO"+d.toString()+"_enabled"]="true"==id("triggerAlarmOut"+d.toString()).getAttribute("checked")?k:m}N&&(f[g][r][Bb]="true"==sa.getAttribute("checked")?k:m);I&&(f[g][r][Sa]=
X?ta:"true"==Cb.getAttribute("checked")?k:m);Y&&(d=Db.getAttribute("checked"),f[g][r][Eb]="true"==d?k:m,"true"==d&&(f[uciTargetTrack.fileName]={},f[uciTargetTrack.fileName][uciTargetTrack.secName.target_track_info]={},f[uciTargetTrack.fileName][uciTargetTrack.secName.target_track_info][uciTargetTrack.optName.enabled]=k))}f[g][Ta]=ec();!0==Z&&(f[g][O]={},f[g][O][Fb]=ua,f[g][O][Gb]=va);var h=k==aa&&"true"==ba.getAttribute("checked"),l=Hb&&!wa&&"true"==ra.getAttribute("checked"),q=Ib&&!xa&&"true"==qa.getAttribute("checked"),
P=Jb&&!ya&&"true"==sa.getAttribute("checked");l||q||P?((l||q)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,function(d){!0==d?(f[C]={},f[C][uciMsgAlarm.secName.chn1MsgAlarmInfo]={},l&&(f[C][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=uciMsgAlarm.optValue.enableVal.on),q&&(f[C][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=uciMsgAlarm.optValue.enableVal.on),h?showConfirmIpc(label.ebikeDetectOnTip,function(d){!0==d?(f[w]={},f[w][D]={},f[w][D][L]=
m,showToast(),$.modify(f,function(d){if(!0==s(d[ERR_CODE])){aa=m;l&&(wa=1);q&&(xa=1);if(null!=c){p[g]={};p[g][v]={};b=0;for(var f in c)null!=c[f]&&(n[b]=c[f],b++);p[g][v][E]=n;$.action(p,function(b){!0==s(b[ERR_CODE])&&showToast("success")})}else showToast("success");"function"==typeof a&&void 0!=a&&a()}})):changeCheckInput(ba,!1)}):(showToast(),$.modify(f,function(d){if(!0==s(d[ERR_CODE])){l&&(wa=1);q&&(xa=1);if(null!=c){p[g]={};p[g][v]={};b=0;for(var f in c)null!=c[f]&&(n[b]=c[f],b++);p[g][v][E]=
n;$.action(p,function(b){!0==s(b[ERR_CODE])&&showToast("success")})}else showToast("success");"function"==typeof a&&void 0!=a&&a()}}))):(l&&changeCheckInput(ra,!1),q&&changeCheckInput(qa,!1))}),P&&showConfirmIpc(label.confirmCaptureOnTip,function(d){!0==d?(f[za]={},f[za][uciPicturePlan.secName.eventConfig]={},P&&(f[za][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=uciPicturePlan.optValue.on),h?showConfirmIpc(label.ebikeDetectOnTip,function(d){!0==d?(f[w]={},f[w][D]={},f[w][D][L]=
m,showToast(),$.modify(f,function(d){if(!0==s(d[ERR_CODE])){aa=m;P&&(ya=1);if(null!=c){p[g]={};p[g][v]={};b=0;for(var f in c)null!=c[f]&&(n[b]=c[f],b++);p[g][v][E]=n;$.action(p,function(b){!0==s(b[ERR_CODE])&&showToast("success")})}else showToast("success");"function"==typeof a&&void 0!=a&&a()}})):changeCheckInput(ba,!1)}):(showToast(),$.modify(f,function(d){if(!0==s(d[ERR_CODE])){P&&(ya=1);if(null!=c){p[g]={};p[g][v]={};b=0;for(var f in c)null!=c[f]&&(n[b]=c[f],b++);p[g][v][E]=n;$.action(p,function(b){!0==
s(b[ERR_CODE])&&showToast("success")})}else showToast("success");"function"==typeof a&&void 0!=a&&a()}}))):P&&changeCheckInput(sa,!1)})):h?showConfirmIpc(label.ebikeDetectOnTip,function(d){!0==d?(f[w]={},f[w][D]={},f[w][D][L]=m,showToast(),$.modify(f,function(d){if(!0==s(d[ERR_CODE])){aa=m;if(null!=c){p[g]={};p[g][v]={};b=0;for(var f in c)null!=c[f]&&(n[b]=c[f],b++);p[g][v][E]=n;$.action(p,function(b){!0==s(b[ERR_CODE])&&showToast("success")})}else showToast("success");"function"==typeof a&&void 0!=
a&&a()}})):changeCheckInput(ba,!1)}):(showToast(),$.modify(f,function(d){if(!0==s(d[ERR_CODE])){if(null!=c){p[g]={};p[g][v]={};b=0;for(var f in c)null!=c[f]&&(n[b]=c[f],b++);p[g][v][E]=n;$.action(p,function(b){!0==s(b[ERR_CODE])&&showToast("success")})}else showToast("success");"function"==typeof a&&void 0!=a&&a()}}))}}};$.BSHOWPTZCTRL?fc(b):b()}function Aa(){closeNoteAll();!0==checkNum(F.value)&&!0==checkNumRange(parseInt(F.value),10,0)?(u[h]=parseInt(F.value),Q=!1):(showNote("thresholdDelay",errStr.thresholdDelayErr),
Q=!0);!0==checkNum(id("ratioDragLineDragLineInput").value)&&!0==checkNumRange(parseInt(id("ratioDragLineDragLineInput").value),100,1)?(t[h]=id("ratioDragLineDragLineInput").value,ca.setValue(id("ratioDragLineDragLineInput").value),R=!1):(showNote("ratioDragLineDragLineInput",errStr.percentageRatioErr),R=!0);!0==checkNum(id("sensitivityDragLineDragLineInput").value)&&!0==checkNumRange(parseInt(id("sensitivityDragLineDragLineInput").value),100,1)?(q[h]=id("sensitivityDragLineDragLineInput").value,da.setValue(id("sensitivityDragLineDragLineInput").value),
S=!1):(showNote("sensitivityDragLineDragLineInput",errStr.sensitivityErr),S=!0)}function gc(a){closeNote("sensitivityDragLineDragLineInput");q[x.value]=a}function hc(a){closeNote("ratioDragLineDragLineInput");t[x.value]=a}function ic(){var a=x.value;Ba=!0;l.delIntelligentRegion(PLUGIN_STATE_ON);H[a]=null;$.BSHOWPTZCTRL&&(ja[a]=!1);!0==rb(H)&&Ca()}function Ca(){var a=document.getElementById("hidebg");a.style.display="block";var b=getoffset(id("save")).top-getoffset(id("videoPluginCon")).top;if(0==
$("#peCon").length||"none"==$("#peCon").css("display"))a.style.height=b+"px";else{var c=getoffset(id("peCon")).top-getoffset(id("videoPluginCon")).top+id("peCon").offsetHeight;a.style.height=(b>c?b:c)+"px"}}function Kb(){document.getElementById("hidebg").style.display="none"}function jc(a){kc.innerHTML=1==a?btn.enableN:btn.close;K=1==a?k:m;if(!1==l.checkInstalled())Ca();else{if(0==a)$.BSHOWPTZCTRL&&(Da=!1),l.setOSDStatus(0),Ca();else{$.BSHOWPTZCTRL&&(Da=!0);l.setOSDStatus(1);if(null==q[0]&&null==
q[1]&&null==q[2]&&null==q[3]){Ca();return}Kb()}$.BSHOWPTZCTRL&&Ua(x.value)}}function lc(a){mc.innerHTML=1==a?btn.enableN:btn.close;ta=1==a?k:m}function nc(){var a,b={};b[g]={};b[g][NAME]=Ta;$.query(b,function(b){if(!0==s(b[ERR_CODE]))for(B.reset(),a=0;a<na.length;a++)B.setTimeVal(na[a],dc(b[g][Ta][qb[a]]))})}function Lb(a){Va?(id("armingScheduleArrow").className="arrowDown",id("armingScheduleArrow").title=label.slideDown,id("armingScheduleArrowText").innerHTML=label.slideDown,Mb.style.display="none",
Va=!1):(id("armingScheduleArrow").className="arrowUp",id("armingScheduleArrow").title=label.slideUp,id("armingScheduleArrowText").innerHTML=label.slideUp,Mb.style.display="",Va=!0)}function Nb(a){Wa?(id("handleArrow").className="arrowDown",id("handleArrow").title=label.slideDown,id("handleArrowText").innerHTML=label.slideDown,Ob.style.display="none",Wa=!1):(id("handleArrow").className="arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,Ob.style.display="",
Wa=!0)}function Pb(a){ua=a}function oc(a){va=a}function pc(a,b){selectInit("soundTypeSelect",a,0,Pb,"18");id("soundTypeSelect").resetSel(b)}function qc(a){J=0==a?m:k;A[h]=J}function G(){showConfirmIpc(label.resCloseOnTip,function(a){!0==a&&(gResSwitchPageSign=1,unloadLogin())},btn.cancel,btn.goSwitch)}function Ua(a){if(ja[a]&&Da){var b={ptz:{}},c=b.ptz.absolute_move={};c.position_pan=ga[a];c.position_tilt=ha[a];c.position_zoom=ia[a];$.action(b,function(b){s(b[ERR_CODE])})}}function rc(a){var b;if(Xa!=
a){$.BSHOWPTZCTRL&&Ua(a);switch(parseInt(a)){case 0:h=0;id("regionName").innerHTML=label.regionOne;break;case 1:h=1;id("regionName").innerHTML=label.regionTwo;break;case 2:h=2;id("regionName").innerHTML=label.regionThree;break;case 3:h=3,id("regionName").innerHTML=label.regionFour}nb(Xa);Xa=a;l.delIntelligentRegion(PLUGIN_STATE_ON);null!=H[a]&&mb(a);q[a]=null==q[a]?id("sensitivityDragLineDragLineInput").value:q[a];da.setValue(q[a]);t[a]=null==t[a]?id("ratioDragLineDragLineInput").value:t[a];ca.setValue(t[a]);
u[a]=null==u[a]?F.value:u[a];F.value=u[a];for(var e=0;e<c.length;e++)c[e].bSupported&&(b="true"==c[e].domName.getAttribute("checked")?k:m,c[e].aiEnhanceTypeValue[a]=null==c[e].aiEnhanceTypeValue[a]?b:c[e].aiEnhanceTypeValue[a],changeCheckInput(c[e].domName,c[e].aiEnhanceTypeValue[a]==k))}}function Ya(){l.playVideo();$("ul.lineConfMenu li.snapPicBtn").show();showDetailCon()}function sc(){var a=uciLinkageCapability.optName.sound_alarm_capability,b=uciLinkageCapability.optName.msg_push_capability,c=
uciLinkageCapability.optName.alarm_out_capability,g=uciLinkageCapability.optName.record_capability,n=uciLinkageCapability.optName.ftp_capability,f=uciLinkageCapability.optName.capture_capability,p=uciLinkageCapability.optName.target_track_capability,d=function(b){b=$.linkageCapability[b];return 4>b.length?!1:"1"==b[b.length-4]?!0:!1};V=d(uciLinkageCapability.optName.light_alarm_capability);M=d(a);T=d(b);W=d(c);U=d(g);I=d(n);N=d(f);Y=d(p);(pa=V||M||T||W||U||I||N||Y)?(V||$("#triggerLightAlarm").parent().hide(),
M||$("#triggerSoundAlarm").parent().hide(),T||$("#triggerMsgPush").parent().hide(),U||$("#triggerRecord").parent().hide(),W?InsertTriggerAlarmOut("triggerAlarmOut"):$("#triggerAlarmOut").parent().hide(),I||$("#sendToFtp").hide(),N||$("#triggerCapture").parent().hide(),Y||$("#smartTargetTrack").parent().hide()):id("handleWayDiv").style.display="none"}function tc(){M&&$.audioAlarmCapability&&(Z=1==parseInt($.audioAlarmCapability[uc])?!0:!1,Ea=1==parseInt($.audioAlarmCapability[vc])?!0:!1,Fa=parseInt($.audioAlarmCapability[wc]),
Za=$.audioAlarmCapability[$a].length);if(!1==Z)id("soundInfo").style.display="none";else{id("soundTypeSelect");id("soundTimesSelect");for(var a=[],b=[{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}],c=0;c<$.audioAlarmCapability[$a].length;c++){var k=parseInt($.audioAlarmCapability[$a][c]);a.push(k);Ga.push(b[k])}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,oc)}if(!1==Ea)id("setSoundAlarm").style.display="none";else{openSoundInfo("setSoundAlarm",Za,Fa,label.usrdefSound);closeSoundInfo("infoCloseTip",g,Ga,pc);for(c=0;c<b.length;c++)0<=$.inArray(c,a)?(devSoundListen("testListen_"+c,c),devSoundFocus("devsound_"+c,c)):id("devsound_"+c).style.display="none";for(a=0;a<Fa;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 xc(){if(null==$.AIEnhanceCapability)id("aiEnhance").style.display="none";else{var a=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.peopleEnhanceVer]),b=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.vehicleEnhanceVer]),e=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.ebikeEnhanceVer]),
g=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.nonVehicleEnhanceVer]),n=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.constantAlarmVer]);c[0].bSupported=!isNaN(a)&&0<(a&4)?!0:!1;c[1].bSupported=!isNaN(b)&&0<(b&4)?!0:!1;c[2].bSupported=!isNaN(e)&&0<(e&4)?!0:!1;c[3].bSupported=!isNaN(g)&&0<(g&4)?!0:!1;for(a=0;a<c.length;a++)b=c[a].bSupported,Ha+=b?1:0,b||(c[a].domName.style.display=
"none",id(c[a].domName.id+"Tips").style.display="none");!isNaN(n)&&0<(n&4)?(id("constantAlarmSwitch").style.display="block",z=!0):id("constantAlarmSwitch").style.display="none";0==Ha?id("aiEnhance").style.display="none":1==Ha&&(id(c[0].domName.id+"Tips").innerHTML=label.peopleDetectionEnhance,id(c[1].domName.id+"Tips").innerHTML=label.vehicleDetectionEnhance,id(c[2].domName.id+"Tips").innerHTML=label.ebikeDetectionEnhance)}}var g=uciIntrusionDetection.fileName,oa=uciIntrusionDetection.secName.detection,
Ta=uciIntrusionDetection.secName.armingSchedule,r=uciIntrusionDetection.secName.notifyList,E=uciIntrusionDetection.secType.regionInfo,O=uciIntrusionDetection.secName.soundAlarmInfo,L=uciIntrusionDetection.optName.enabled,ma=uciIntrusionDetection.optName.sensitivity,ka=uciIntrusionDetection.optName.threshold,la=uciIntrusionDetection.optName.percentage,ab=uciIntrusionDetection.optName.peopleEnabled,bb=uciIntrusionDetection.optName.vehicleEnabled,cb=uciIntrusionDetection.optName.ebikeEnabled,db=uciIntrusionDetection.optName.nonVehicleEnabled,
ob=uciIntrusionDetection.optName.constantAlarmEnabled,uc=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,vc=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,wc=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,$a=uciAlarmAudioTypeCapability.optName.alarmType,yc=uciIntrusionDetection.optName.id,fa=uciIntrusionDetection.optName.pt1x,Ka=uciIntrusionDetection.optName.pt1y,La=uciIntrusionDetection.optName.pt2x,Ma=uciIntrusionDetection.optName.pt2y,Na=uciIntrusionDetection.optName.pt3x,
Oa=uciIntrusionDetection.optName.pt3y,Pa=uciIntrusionDetection.optName.pt4x,Qa=uciIntrusionDetection.optName.pt4y,cc=uciIntrusionDetection.optName.id,k=uciIntrusionDetection.optValue.enableVal.on,m=uciIntrusionDetection.optValue.enableVal.off,Qb=uciImage.fileName,z=!1,v=uciIntrusionDetection.actionName.addRegions,Eb=uciIntrusionDetection.optName.target_track_enabled,xb=uciIntrusionDetection.optName.lightAlarmEnabled,yb=uciIntrusionDetection.optName.soundAlarmEnabled,tb=uciIntrusionDetection.optName.msgPushEnabled,
vb=uciIntrusionDetection.optName.recordEnabled,zb=uciIntrusionDetection.optName.alarmEnabled,Bb=uciIntrusionDetection.optName.captureEnabled,Sa=uciIntrusionDetection.optName.ftpEnabled,Fb=uciIntrusionDetection.optName.soundAlarmType,Gb=uciIntrusionDetection.optName.soundAlarmTimes,eb=uciUsrDefAlarm.fileName,Rb=uciUsrDefAlarm.secName.usrDefAudio,zc=uciUsrDefAlarm.optName.id,fb=uciUsrDefAlarm.optName.name,w=uciFaceSnapShot.fileName,D=uciFaceSnapShot.secName.fssRule,C=uciMsgAlarm.fileName,Hb=0,wa=0,
Ib=0,xa=0,za=uciPicturePlan.fileName,Jb=0,ya=0,Sb=!0,Tb,Ub,K,kc=id("intelligentDetectionSwitchDes"),l,h=0,Xa=0,gb=!1;$.AIEnhanceCapability&&$.AIEnhanceCapability[uciAiEnhanceCapability.secName.faceEnhance]&&(gb=isNaN($.AIEnhanceCapability[uciAiEnhanceCapability.secName.faceEnhance][uciAiEnhanceCapability.optName.fssEnhanceVer])?!1:!0);var aa=m,q=[],u=[],t=[],A=[],Vb=m,Ac=m,Bc=m,Cc=m,Dc=m,ca,da,hb,J,F=id("thresholdDelay");id("ratioDragLineDragLineInput");id("sensitivityDragLineDragLineInput");var na=
[label.Mon,label.Tue,label.Wen,label.Thu,label.Fri,label.Sta,label.Sun],qb=[uciIntrusionDetection.optName.mon,uciIntrusionDetection.optName.tue,uciIntrusionDetection.optName.wed,uciIntrusionDetection.optName.thu,uciIntrusionDetection.optName.fri,uciIntrusionDetection.optName.sat,uciIntrusionDetection.optName.sun],Va=!0,Wa=!0,Db=id("smartTargetTrack"),Ab=id("triggerAlarmOut"),wb=id("triggerRecord"),ub=id("triggerMsgPush"),qa=id("triggerLightAlarm"),ra=id("triggerSoundAlarm"),Cb=id("sendFtp"),ta,mc=
id("sendToFtpSwitchDes"),sa=id("triggerCapture"),Wb=id("peopleDetectionEnhanceCheck"),Ec=id("vehicleDetectionEnhanceCheck"),ba=id("ebikeDetectionEnhanceCheck"),Fc=id("nonVehicleDetectionEnhanceCheck"),Mb=id("timeSchedule"),Ob=id("handleWay"),bc=id("name"),Ja,x=id("regionNumber"),H=[null,null,null,null],ga=["0","0","0","0"],ha=["0","0","0","0"],ia=["0","0","0","0"],ja=[!1,!1,!1,!1],Da=!1,Q=!1,R=!1,S=!1,Ba=!1,ib=!1,B,ea=id("ptzToggleCon"),Ia=$(".ptzBorderConfCon"),jb=!0,Ha=0,c=[{bSupported:!1,uciName:ab,
domName:Wb,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:Ac},{bSupported:!1,uciName:bb,domName:Ec,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:Bc},{bSupported:!1,uciName:cb,domName:ba,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:Cc},{bSupported:!1,uciName:db,domName:Fc,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:Dc}],kb=1==parseInt($.moduleSpec[uciFunction.optName.corridorMode])?!0:!1,pa,V,M,T,W,U,I,N,Y,Ra=isNaN(parseInt($.moduleSpec.alarm_out_num))?1:parseInt($.moduleSpec.alarm_out_num),
Ea=!1,Z=!1,ua,va,Fa,Ga=[],Za=0,Xb=$.moduleSpec[uciFunction.optName.new_version_capability_list],Yb=Xb&&0<=$.inArray(uciImage.fileName,Xb),Zb=!1,$b=!1,X=!1;(function(){var a={},b=0,e=0;sc();tc();xc();a[g]={};a[g][NAME]=[oa];pa&&a[g][NAME].push(r);Z&&a[g][NAME].push(O);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(a[C]={},a[C][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);a[g][KEY_TABLE]=[E];!0==Ea&&(a[eb]={},a[eb][KEY_TABLE]=[Rb]);kb&&(a[Qb]={},a[Qb][NAME]=uciImage.secName.para_switch);gb&&
(a[w]={},a[w][NAME]=[D]);Yb&&(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 h="vedioActiveX";$.BSHOWPTZCTRL?(new PtzControl("ptzControlCon",1),h="ptzVideoActiveX vedioActiveX",$("ul.lineConfMenu").addClass("havePtz"),
kb&&(id("videoPluginCon").style.width="496px")):($("#ptzToggleCon").hide(),$("#ptzControlCon").hide());l=new Plugin({id:"videoPluginCon",className:h,readyHd:function(b){PLUGIN_STATE_ON==b&&!0==Sb&&(Sb=!1,l.setIntelligentState(1),l.setRectArrLen(1),l.setOSDSpecialStatus(1),mb(0),l.setOSDStatus(Ub.state),$b&&setDomSize($(".vedioActiveX")[0],null))}});selectInit("regionNumber",[{str:label.regionOne,value:0},{str:label.regionTwo,value:1},{str:label.regionThree,value:2},{str:label.regionFour,value:3}],
0,rc);da=new DragLine({id:"sensitivityDragLine",name:label.sensitivity,cb:gc,lowerBound:1});ca=new DragLine({id:"ratioDragLine",name:label.ratio,cb:hc,lowerBound:1});z&&(hb=new Switch("constantAlarm",0,qc),id("constantAlarmSwitch").style.visibility="hidden");B=new PlanSet("recPlanGrid",{curType:1});nc();$("ul.lineConfMenu li.snapPicBtn").hide();$("ul.lineConfMenu li.snapPicBtn").click(function(b){ac()});id("closeTip").onclick=function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display=
"none"})};ea.onclick=function(){jb?(Ia.hide(),jb=!1,$(ea).removeClass("ptzToggleShowIcon").addClass("ptzToggleHideIcon"),ea.style.left="757px",$("ul.lineConfMenu").css("width","702px"),l.setSize({height:"396px",width:"704px"}),l.checkInstalled()||(Ia.css("width","0px"),l.showInstalledTip())):(Ia.show(),jb=!0,ea.style.left="549px",$(ea).removeClass("ptzToggleHideIcon").addClass("ptzToggleShowIcon"),$("ul.lineConfMenu").css("width","494px"),l.setSize({height:"372px",width:"496px"}),l.checkInstalled()||
(Ia.css("width","204px"),l.showInstalledTip()))};$.query(a,function(a){if(!0==s(a[ERR_CODE])){Tb=a[g][E];var f=formatTableData(Tb),e,d,h=0,m;for(m in f)for(e=f[m],h=e[yc]-1,d={},d.id=e.id,d[fa]=e.pt1_x,d[Ka]=e.pt1_y,d[La]=e.pt2_x,d[Ma]=e.pt2_y,d[Na]=e.pt3_x,d[Oa]=e.pt3_y,d[Pa]=e.pt4_x,d[Qa]=e.pt4_y,$.BSHOWPTZCTRL&&(d.position_pan=e.position_pan,d.position_tilt=e.position_tilt,d.position_zoom=e.position_zoom,ga[h]=e.position_pan,ha[h]=e.position_tilt,ia[h]=e.position_zoom,ja[h]=!0),d[ka]=e[ka],d[la]=
e[la],d[ma]=e[ma],d[uciIntrusionDetection.optName.peopleEnabled]=e[uciIntrusionDetection.optName.peopleEnabled],d[uciIntrusionDetection.optName.vehicleEnabled]=e[uciIntrusionDetection.optName.vehicleEnabled],H[h]=d,q[h]=e[ma],u[h]=e[ka],t[h]=e[la],z&&(A[h]=e[ob]),d=0;d<c.length;d++)c[d].bSupported&&(c[d].aiEnhanceTypeValue[h]=e[c[d].uciName]);for(d=0;4>d;d++)q[d]=null==q[d]?50:q[d],t[d]=null==t[d]?1:t[d],u[d]=null==u[d]?0:u[d];da.setValue(q[0]);ca.setValue(t[0]);F.value=u[0];z&&(J=null==A[0]?Vb:A[0],
hb.setState(J==k?1: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(d=0;d<c.length;d++)c[d].bSupported&&(c[d].aiEnhanceTypeValue[0]=null==c[d].aiEnhanceTypeValue[0]?c[d].aiEnhanceTypeValueDefault:
c[d].aiEnhanceTypeValue[0],changeCheckInput(c[d].domName,c[d].aiEnhanceTypeValue[0]==k),$.det_mutex_list&&(c[d].uciName==ab&&0<=$.inArray(19,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("peopleDetectionEnhanceCheckTips")).addClass("disable"),c[d].aiEnhanceTypeValue[0]==k?$(c[d].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[d].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[d].domName.onclick=G),c[d].uciName==
bb&&0<=$.inArray(20,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("vehicleDetectionEnhanceCheckTips")).addClass("disable"),c[d].aiEnhanceTypeValue[0]==k?$(c[d].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[d].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[d].domName.onclick=G),c[d].uciName==cb&&0<=$.inArray(21,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("ebikeDetectionEnhanceCheckTips")).addClass("disable"),
c[d].aiEnhanceTypeValue[0]==k?$(c[d].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[d].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[d].domName.onclick=G),c[d].uciName==db&&0<=$.inArray(22,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("nonVehicleDetectionEnhanceCheckTips")).addClass("disable"),c[d].aiEnhanceTypeValue[0]==k?$(c[d].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[d].domName).addClass("checkedDisabled").removeClass("checkDisabled"),
c[d].domName.onclick=G)),c[d].aiEnhanceTypeValue[0]==k&&z&&(id("constantAlarmSwitch").style.visibility="visible"));$.BSHOWPTZCTRL&&Ua(0);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&1==parseInt(a[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&(X=!0);if(pa){T&&(b=a[g][r][tb]==k,changeCheckInput(ub,b));U&&(b=a[g][r][vb]==k,changeCheckInput(wb,b));V&&(b=a[g][r][xb]==k,changeCheckInput(qa,b),Ib=1,xa=a[C][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==
k?1:0);M&&(b=a[g][r][yb]==k,changeCheckInput(ra,b),Hb=1,wa=a[C][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==k?1:0);if(W&&(b=a[g][r][zb]==k,changeCheckInput(Ab,b),1<Ra)){e=b;for(f=2;f<=Ra;f++)aoEnableOpt="AO"+f.toString()+"_enabled",b=a[g][r][aoEnableOpt]==k,changeCheckInput(id("triggerAlarmOut"+f.toString()),b),e=e&&b;e&&changeCheckInput("triggerAOAll",!0)}I&&(X&&N?($("#sendToFtpLine").hide(),ta=a[g][r][Sa],b=ta==k?1:0,new Switch("sendToFtpSwitch",b,lc)):($("#sendToFtpSwitchCon").hide(),
$("#sendToFtpLine").show(),$("#goToFtpConf").hide(),b=a[g][r][Sa]==k,changeCheckInput(Cb,b)));N&&(b=a[g][r][Bb]==k,X&&I&&(b?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(sa,b),$.moduleSpec[uciFunction.optName.captureEnable]&&(Jb=1,ya=a[za][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==k?1:0));Y&&(b=a[g][r][Eb]==k,changeCheckInput(Db,b))}K=a[g][oa][L];b=K==k?1:0;1==b&&$.BSHOWPTZCTRL&&(Da=!0);Ub=new Switch("intelligentDetectionSwitch",b,jc);
if(!0==Z){if(!0==Ea){e={};e=a[eb][Rb];f=formatTableData(e);for(m in f)e=f[m],e[fb]||(e[fb]=label.usrdefSound),Ga.push({str:e[fb],value:e[zc]});uploadSoundFile("fileName",l,Za,Fa)}selectInit("soundTypeSelect",Ga,0,Pb,"18");ua=a[g][O][Fb];va=a[g][O][Gb];soundTypeSelect.changeSel(ua);soundTimesSelect.changeSel(va)}if(kb){var v=a[uciImage.fileName][uciImage.secName.para_switch][uciImage.optName.rotate_type];m={};m[uciVideo.fileName]={};m[uciVideo.fileName][NAME]=uciVideo.secName.main;$.query(m,function(a){!0==
s(a[ERR_CODE])&&(a=a[uciVideo.fileName][uciVideo.secName.main],a=a.resolution.split("*")[1]/a.resolution.split("*")[0],v==uciImage.optValue.rotOff?pb():pb(a),$("object.vedioActiveX").addClass("vedioActiveX_corridor"),id("videoPluginCon").style.background="black")})}gb&&(aa=a[w][D][L]);Yb?1==parseInt(a[uciImageCapability.fileName][uciImageCapability.secType.capability][uciImageCapability.optName.stitch])?(Zb=!0,a={},a[uciImageCapability.fileName]={},a[uciImageCapability.fileName][NAME]=[],a[uciImageCapability.fileName][NAME].push(uciImageCapability.optName.stitch),
$.query(a,function(a){!0==s(a[ERR_CODE])&&Zb&&($b=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==s(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");setDomSize($(".vedioActiveX")[0],{height:b,paddingTop:a,paddingBottom:a});Ya()}}))})):Ya():Ya()}});initCheckInput("showInfo",function(a,b){var g=!1;for(e=0;e<c.length;e++)c[e].bSupported&&(c[e].aiEnhanceTypeValue[x.value]="true"==c[e].domName.getAttribute("checked")?k:m,c[e].domName.value=c[e].aiEnhanceTypeValue[x.value],k==c[e].aiEnhanceTypeValue[x.value]&&(g=!0));g&&z?id("constantAlarmSwitch").style.visibility="visible":
id("constantAlarmSwitch").style.visibility="hidden";a||0!=b||showAlert(label.confirmRecordOff)});initCheckInput("capture",function(a){X&&I&&(a?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide())});id("save").onclick=sb;id("del").onclick=ic;id("clearAll").onclick=function(a){B.reset()};id("armingScheduleArrow").onclick=Lb;id("armingScheduleArrowText").onclick=Lb;id("handleArrow").onclick=Nb;id("handleArrowText").onclick=Nb;F.onblur=Aa;Wb.onblur=Aa;id("ratioDragLineDragLineInput").onblur=
Aa;id("sensitivityDragLineDragLineInput").onblur=Aa;id("goToFtpConf").onclick=function(){showConfirmC(label.cue,label.saveTips,function(a){!0==a?sb(function(){gFtpSwitchPageSign=1;unloadLogin()}):(gFtpSwitchPageSign=1,unloadLogin())},btn.unsave,btn.save,!1)}})();(function(){l.intelligentCallback(function(a){var b=0;id("constantAlarmSwitch").style.visibility="hidden";if(!0==ib)for(q=[null,null,null,null],u=[null,null,null,null],t=[null,null,null,null],z&&(A[h]=[null,null,null,null]),b=0;b<c.length;b++)c[b].bSupported&&
(c[b].aiEnhanceTypeValue=[null,null,null,null]);if(Q||R||S){if(!1==Ba){l.showHighlight(h,1);return}closeNoteAll();Q=R=S=!1}else l.showHighlight(parseInt(a),0);if(!1==ib&&!1==Ba)for(q[h]=null==q[h]?50:q[h],t[h]=null==t[h]?1:t[h],u[h]=null==u[h]?0:u[h],z&&(A[h]=null==A[h]?J:A[h]),b=0;b<c.length;b++)c[b].bSupported&&(c[b].aiEnhanceTypeValue[h]=null==c[b].aiEnhanceTypeValue[h]?c[b].aiEnhanceTypeValueDefault:c[b].aiEnhanceTypeValue[h]);null==q[0]&&null==q[1]&&null==q[2]&&null==q[3]||k!=K||Kb();da.setValue(null==
q[h]?50:q[h]);ca.setValue(null==t[h]?1:t[h]);F.value=null==u[h]?0:u[h];z&&(J=null==A[h]?Vb:A[h],hb.setState(J==m?0:1));for(b=0;b<c.length;b++)c[b].bSupported&&(c[b].domName.value=null==c[b].aiEnhanceTypeValue[h]?c[b].aiEnhanceTypeValueDefault:c[b].aiEnhanceTypeValue[h],changeCheckInput(c[b].domName,c[b].domName.value==k),$.det_mutex_list&&(c[b].uciName==ab&&0<=$.inArray(19,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("peopleDetectionEnhanceCheckTips")).addClass("disable"),
c[b].domName.value==k?$(c[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[b].domName.onclick=G),c[b].uciName==bb&&0<=$.inArray(20,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("vehicleDetectionEnhanceCheckTips")).addClass("disable"),c[b].domName.value==k?$(c[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),
c[b].domName.onclick=G),c[b].uciName==cb&&0<=$.inArray(21,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("ebikeDetectionEnhanceCheckTips")).addClass("disable"),c[b].domName.value==k?$(c[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[b].domName.onclick=G),c[b].uciName==db&&0<=$.inArray(22,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&
($(id("nonVehicleDetectionEnhanceCheckTips")).addClass("disable"),c[b].domName.value==k?$(c[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[b].domName.onclick=G)),c[b].domName.value==k&&z&&(id("constantAlarmSwitch").style.visibility="visible"));ib=Ba=!1})})()}init();
</script><style type="text/css">div.configDiv li.threshold{display:inline-block;font-size:0;vertical-align:middle;height:30px;margin-left:0;padding:5px 0}div.configDiv li.marginTop{margin-top:22px}div.configDiv li.marginTop1{margin-top:10px}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.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.desA{color:#333;margin-right:16px}ul.Line label.desM{font-size:12px;color:#666;line-height:12px}ul.line label.des{display:inline;vertical-align:middle}ul.line label.disable{color:#999}ul.line label.desG{font-size:12px;color:#666;line-height:12px;margin-top:-20px}div.handleWay ul.Line label.des{display:inline;vertical-align:middle;margin-left:8px}div.handleWay ul.Line label.sendFtpDes{display:inline-block;margin-left:4px;margin-right:4px;width:140px}div.handleWay ul.Line label.desA{font-size:13px;color:#333;line-height:30px;width:500px}input.goToFtpConf{margin-left:24px;padding:0 12px}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}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.ptzToggle{height:64px;width:12px;position:absolute;cursor:pointer;top:224px;left:549px;z-index:1}ul.line li.lineSet{display:inline-block;*display:inline;*zoom:1;height:30px;font-size:0;margin:5px 8px}span.select span.hsValueB{width:52px}</style>