

<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="lineName">{%label.lineOne%}</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="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 lineL1">
				<li class="dragLine">
					<div id="sensitivityDragLine" class="ipcDragLineDiv"></div>
				</li>
			</ul>
			<!-- 方向 -->
			<ul class="line lineR">
				<li class="direction">
					<label class="des desA">{%label.direction%}</label>
					<span class="selCon">
						<span id="directionSel" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
				</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.lineCrossingTips%}</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" class="subBtn btnA" value="{%btn.save%}" />
	</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 u(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 IPCUMGUESTNAUTH:e=errStr.invPermissionDenied;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFYRECORDENERR:case IPCNOTIFYFTPENERR:case IPCNOTIFMSGPUSHENERR:case IPCNOTIFCAPTUREENERR:case IPCNOTIFSOUNDALARMENERR:e=errStr.IPCHandleInalid;break;case IPCLINECROSSINGDIRERR:e=
errStr.lineCrossingDirectionErr;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 Qa(){clearTimeout(qa);qa=$.setTimeout(function(){$("#popNote").animate({bottom:"-150px"},
void 0,void 0,function(){id("popNote").style.display="none"})},5E3)}function Fb(){g.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(qa),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=g.getPicFileStoragePath(),b=e.lastIndexOf("\\"),b=e.substr(b+1);popContentCorrect.style.display="inline-block";popContentError.style.display="none";titleText.innerHTML=label.snapPicSuccess;Gb.innerHTML=b;check.onclick=function(){g.openFileStorageFolder(e)};Qa()}$("#popNote").animate({bottom:"0px"});id("popNote").style.display="inline-block";log(a);7==parseInt(a)&&Qa()})}function Ra(a){a=
x[a];null!=a&&g.showLineCrossingInfo(0,{pt1_x:a[ra],pt1_y:a[sa],pt2_x:a[ta],pt2_y:a[ua],direction:a[G]})}function Sa(a){var b,e,d=0<arguments.length?a:s.value;b=g.getLineCrossingInfo(0);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[Hb]=d+1+"";e[ra]=b.pt1_x;e[sa]=b.pt1_y;e[ta]=b.pt2_x;e[ua]=b.pt2_y;$.BSHOWPTZCTRL&&(e.position_pan=T[d],e.position_tilt=U[d],e.position_zoom=V[d],W[d]=!0);e[G]=p[d];e[X]=m[d];for(b=0;b<c.length;b++)c[b].bSupported&&(e[c[b].uciName]=
c[b].aiEnhanceTypeValue[d]);x[d]=e}}function Ta(a){var b=id("videoPluginCon").offsetHeight;void 0==a?$.BSHOWPTZCTRL?g.setSize({height:"372px",width:"496px"}):g.setSize({height:"396px",width:"720px"}):g.setSize({height:b+"px",width:b*a+"px"})}function Ib(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 t=b.split(/[-]/,2);b=parseInt(t[0],10);t=parseInt(t[1],10);0==b&&0==t?e.push(v._getString(b,t,0)):e.push(v._getString(b,
t,1))}return e}function Jb(){var a,b=v.getTimeVal(),e={};for(a=0;a<Y.length;a++){var c=e,t=Ua[a],k;k=b[Y[a]];var f=void 0,d=void 0,h=void 0,l=void 0,g=void 0,g=l=void 0;if(void 0==k)k="";else{void 0==f&&(f=6);d="[";if(1>k.length)d+='"0000-0000"';else for(h=0;h<k.length&&h<f;h++)l=k[h].toString(),g=l.split(/[-,:]/,3),l=parseInt(g[0],10),g=parseInt(g[1],10),l=v._getStringWithoutType(l,g),0<h&&(d+=","),d+='"'+l+'"';k=d+="]"}c[t]=k}return e}function Kb(a){var b={},e="0",c="0",d="0";b.ptz={};b.ptz[uciPTZ.actionName.getPTZStatus]=
null;$.action(b,function(b){!0==u(b[ERR_CODE])&&(b=b.ptz.status,e=b.position_pan,c=b.position_tilt,d=b.position_zoom);T[s.value]=e;U[s.value]=c;V[s.value]=d;"function"==typeof a&&a()})}function Va(a){for(var b=0;b<a.length;b++)if(null!=a[b])return!1;return!0}function Wa(a){if(H)return!1;var b=function(){Sa();var b=x;if(h==A&&!0==Va(b))showAlert(label.addOneLineFirst);else{var c=0,t=[],k={},f={};k[d]={};k[d][Z]={};k[d][Z][Xa]=A;if(aa){k[d][r]={};I&&(k[d][r][Ya]="true"==Za.getAttribute("checked")?h:
q);J&&(k[d][r][$a]="true"==ab.getAttribute("checked")?h:q);K&&(k[d][r][bb]="true"==ba.getAttribute("checked")?h:q);B&&(k[d][r][cb]="true"==ca.getAttribute("checked")?h:q);if(L){k[d][r][db]="true"==eb.getAttribute("checked")?h:q;for(var g=2;g<=va;g++)k[d][r]["AO"+g.toString()+"_enabled"]="true"==id("triggerAlarmOut"+g.toString()).getAttribute("checked")?h:q}C&&(k[d][r][fb]="true"==da.getAttribute("checked")?h:q);y&&(k[d][r][wa]=M?ea:"true"==gb.getAttribute("checked")?h:q);N&&(g=hb.getAttribute("checked"),
k[d][r][ib]="true"==g?h:q,"true"==g&&(k[uciTargetTrack.fileName]={},k[uciTargetTrack.fileName][uciTargetTrack.secName.target_track_info]={},k[uciTargetTrack.fileName][uciTargetTrack.secName.target_track_info][uciTargetTrack.optName.enabled]=h))}k[d][xa]=Jb();!0==O&&(k[d][D]={},k[d][D][jb]=fa,k[d][D][kb]=ga);var m=lb&&!ya&&"true"==ca.getAttribute("checked"),l=mb&&!za&&"true"==ba.getAttribute("checked"),p=nb&&!Aa&&"true"==da.getAttribute("checked");m||l||p?((m||l)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,
function(g){!0==g?(k[w]={},k[w][uciMsgAlarm.secName.chn1MsgAlarmInfo]={},m&&(k[w][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=uciMsgAlarm.optValue.enableVal.on),l&&(k[w][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=uciMsgAlarm.optValue.enableVal.on),showToast(),$.modify(k,function(k){if(!0==u(k[ERR_CODE])){m&&(ya=1);l&&(za=1);if(null!=b){f[d]={};f[d][E]={};for(var g in b)null!=b[g]&&(t[c]=b[g],c++);f[d][E][P]=t;$.action(f,function(a){!0==u(a[ERR_CODE])&&
showToast("success")});l=m=0}else showToast("success");"function"==typeof a&&void 0!=a&&a()}})):(m&&changeCheckInput(ca,!1),l&&changeCheckInput(ba,!1))}),p&&showConfirmIpc(label.confirmCaptureOnTip,function(g){!0==g?(k[ha]={},k[ha][uciPicturePlan.secName.eventConfig]={},p&&(k[ha][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=uciPicturePlan.optValue.on),showToast(),$.modify(k,function(k){if(!0==u(k[ERR_CODE])){p&&(Aa=1);if(null!=b){f[d]={};f[d][E]={};for(var g in b)null!=b[g]&&
(t[c]=b[g],c++);f[d][E][P]=t;$.action(f,function(a){!0==u(a[ERR_CODE])&&showToast("success")});p=0}else showToast("success");"function"==typeof a&&void 0!=a&&a()}})):p&&changeCheckInput(da,!1)})):(showToast(),$.modify(k,function(k){if(!0==u(k[ERR_CODE])){if(null!=b){f[d]={};f[d][E]={};for(var g in b)null!=b[g]&&(t[c]=b[g],c++);f[d][E][P]=t;$.action(f,function(a){!0==u(a[ERR_CODE])&&showToast("success")})}else showToast("success");"function"==typeof a&&void 0!=a&&a()}}))}};$.BSHOWPTZCTRL?Kb(b):b()}
function ob(){closeNoteAll();!0==checkNum(id("sensitivityDragLineDragLineInput").value)&&!0==checkNumRange(parseInt(id("sensitivityDragLineDragLineInput").value),100,1)?(m[s.value]=id("sensitivityDragLineDragLineInput").value,Q.setValue(id("sensitivityDragLineDragLineInput").value),H=!1):(showNote("sensitivityDragLineDragLineInput",errStr.sensitivityErr),H=!0);p[s.value]=id("directionSel").value}function Lb(a){closeNote("sensitivityDragLineDragLineInput");m[s.value]=a}function Mb(a){switch(a){case "AtoB":p[s.value]=
"AtoB";break;case "BtoA":p[s.value]="BtoA";break;case "both":p[s.value]="both"}g.changeDetectDirect(0,p[s.value])}function Nb(){var a=s.value;ia=!0;p[a]=z;$("#directionSel span.value")[0].value=z;$("#directionSel")[0].resetSel(z);g.changeDetectDirect(0,"both");g.delLineCrossingInfo(PLUGIN_STATE_ON);x[a]=null;$.BSHOWPTZCTRL&&(W[a]=!1);!0==Va(x)&&ja()}function ja(){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 pb(){document.getElementById("hidebg").style.display="none"}function Ob(a){Pb.innerHTML=1==a?btn.enableN:btn.close;A=1==a?h:q;if(!1==g.checkInstalled())ja();else{if(0==a)$.BSHOWPTZCTRL&&(ka=!1),g.setOSDStatus(0),ja();else{$.BSHOWPTZCTRL&&(ka=!0);g.setOSDStatus(1);if(null==m[0]&&null==
m[1]&&null==m[2]&&null==m[3]){ja();return}pb()}$.BSHOWPTZCTRL&&Ba(s.value)}}function Qb(a){Rb.innerHTML=1==a?btn.enableN:btn.close;ea=1==a?h:q}function Sb(){var a,b={};b[d]={};b[d][NAME]=xa;$.query(b,function(b){if(!0==u(b[ERR_CODE]))for(v.reset(),a=0;a<Y.length;a++)v.setTimeVal(Y[a],Ib(b[d][xa][Ua[a]]))})}function qb(a){Ca?(id("armingScheduleArrow").className="arrowDown",id("armingScheduleArrow").title=label.slideDown,id("armingScheduleArrowText").innerHTML=label.slideDown,rb.style.display="none",
Ca=!1):(id("armingScheduleArrow").className="arrowUp",id("armingScheduleArrow").title=label.slideUp,id("armingScheduleArrowText").innerHTML=label.slideUp,rb.style.display="",Ca=!0)}function sb(a){Da?(id("handleArrow").className="arrowDown",id("handleArrow").title=label.slideDown,id("handleArrowText").innerHTML=label.slideDown,tb.style.display="none",Da=!1):(id("handleArrow").className="arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,tb.style.display="",
Da=!0)}function ub(a){fa=a}function Tb(a){ga=a}function Ub(a,b){selectInit("soundTypeSelect",a,0,ub,"18");id("soundTypeSelect").resetSel(b)}function F(){showConfirmIpc(label.resCloseOnTip,function(a){!0==a&&(gResSwitchPageSign=1,unloadLogin())},btn.cancel,btn.goSwitch)}function Ba(a){if(W[a]&&ka){var b={ptz:{}},c=b.ptz.absolute_move={};c.position_pan=T[a];c.position_tilt=U[a];c.position_zoom=V[a];$.action(b,function(a){u(a[ERR_CODE])})}}function Vb(a){var b;$.BSHOWPTZCTRL&&Ba(a);switch(parseInt(a)){case 0:n=
0;id("lineName").innerHTML=label.lineOne;break;case 1:n=1;id("lineName").innerHTML=label.lineTwo;break;case 2:n=2;id("lineName").innerHTML=label.lineThree;break;case 3:n=3,id("lineName").innerHTML=label.lineFour}Sa(vb);vb=a;g.delLineCrossingInfo(PLUGIN_STATE_ON);null!=x[a]&&Ra(a);m[a]=null==m[a]?R:m[a];p[a]=null==p[a]?z:p[a];Q.setValue(m[a]);$("#directionSel")[0].resetSel(p[a]);!0!=Ea&&g.changeDetectDirect(0,p[a]);for(var e=0;e<c.length;e++)c[e].bSupported&&(b="true"==c[e].domName.getAttribute("checked")?
h:q,c[e].aiEnhanceTypeValue[a]=null==c[e].aiEnhanceTypeValue[a]?b:c[e].aiEnhanceTypeValue[a],changeCheckInput(c[e].domName,c[e].aiEnhanceTypeValue[a]==h))}function Fa(){g.playVideo();$("ul.lineConfMenu li.snapPicBtn").show();showDetailCon()}function Wb(){var a=uciLinkageCapability.optName.sound_alarm_capability,b=uciLinkageCapability.optName.msg_push_capability,c=uciLinkageCapability.optName.alarm_out_capability,d=uciLinkageCapability.optName.record_capability,g=uciLinkageCapability.optName.ftp_capability,
k=uciLinkageCapability.optName.capture_capability,f=uciLinkageCapability.optName.target_track_capability,h=function(a){a=$.linkageCapability[a];return 3>a.length?!1:"1"==a[a.length-3]?!0:!1};K=h(uciLinkageCapability.optName.light_alarm_capability);B=h(a);I=h(b);L=h(c);J=h(d);y=h(g);C=h(k);N=h(f);(aa=K||B||I||L||J||y||C||N)?(K||$("#triggerLightAlarm").parent().hide(),B||$("#triggerSoundAlarm").parent().hide(),I||$("#triggerMsgPush").parent().hide(),J||$("#triggerRecord").parent().hide(),L?InsertTriggerAlarmOut("triggerAlarmOut"):
$("#triggerAlarmOut").parent().hide(),y||$("#sendToFtp").hide(),C||$("#triggerCapture").parent().hide(),N||$("#smartTargetTrack").parent().hide()):id("handleWayDiv").style.display="none"}function Xb(){B&&$.audioAlarmCapability&&(O=1==parseInt($.audioAlarmCapability[Yb])?!0:!1,la=1==parseInt($.audioAlarmCapability[Zb])?!0:!1,ma=parseInt($.audioAlarmCapability[$b]),Ga=$.audioAlarmCapability[Ha].length);if(!1==O)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[Ha].length;c++){var g=parseInt($.audioAlarmCapability[Ha][c]);a.push(g);na.push(b[g])}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,Tb)}if(!1==la)id("setSoundAlarm").style.display="none";else{openSoundInfo("setSoundAlarm",
Ga,ma,label.usrdefSound);closeSoundInfo("infoCloseTip",d,na,Ub);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<ma;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 ac(){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]),d=parseInt($.AIEnhanceCapability[uciAiEnhanceCapability.secName.traditionalEnhance][uciAiEnhanceCapability.optName.nonVehicleEnhanceVer]);c[0].bSupported=!isNaN(a)&&
0<(a&2)?!0:!1;c[1].bSupported=!isNaN(b)&&0<(b&2)?!0:!1;c[2].bSupported=!isNaN(d)&&0<(d&2)?!0:!1;for(a=0;a<c.length;a++)b=c[a].bSupported,Ia+=b?1:0,b||(c[a].domName.style.display="none",id(c[a].domName.id+"Tips").style.display="none",c[a].uciName==oa&&(id(c[0].domName.id+"Tips").innerHTML=label.peopleDetectionEnhance));0==Ia&&(id("aiEnhance").style.display="none")}}var d=uciLineCrossingDetection.fileName,Z=uciLineCrossingDetection.secName.detection,r=uciLineCrossingDetection.secName.notifyList,xa=
uciLineCrossingDetection.secName.armingSchedule,P=uciLineCrossingDetection.secType.regionInfo,D=uciLineCrossingDetection.secName.soundAlarmInfo,Xa=uciLineCrossingDetection.optName.enabled,X=uciLineCrossingDetection.optName.sensitivity,bc=uciLineCrossingDetection.optName.id,G=uciLineCrossingDetection.optName.direction,Ja=uciLineCrossingDetection.optName.peopleEnabled,oa=uciLineCrossingDetection.optName.vehicleEnabled,Ka=uciLineCrossingDetection.optName.nonVehicleEnabled,Yb=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,
Zb=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,$b=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,Ha=uciAlarmAudioTypeCapability.optName.alarmType,ra=uciLineCrossingDetection.optName.pt1x,sa=uciLineCrossingDetection.optName.pt1y,ta=uciLineCrossingDetection.optName.pt2x,ua=uciLineCrossingDetection.optName.pt2y,Hb=uciLineCrossingDetection.optName.id,h=uciLineCrossingDetection.optValue.enableVal.on,q=uciLineCrossingDetection.optValue.enableVal.off,wb=uciImage.fileName,E=uciLineCrossingDetection.actionName.addRegions,
ib=uciLineCrossingDetection.optName.target_track_enabled,bb=uciLineCrossingDetection.optName.lightAlarmEnabled,cb=uciLineCrossingDetection.optName.soundAlarmEnabled,Ya=uciLineCrossingDetection.optName.msgPushEnabled,$a=uciLineCrossingDetection.optName.recordEnabled,db=uciLineCrossingDetection.optName.alarmEnabled,fb=uciLineCrossingDetection.optName.captureEnabled,wa=uciLineCrossingDetection.optName.ftpEnabled,Gb=id("name"),qa,jb=uciLineCrossingDetection.optName.soundAlarmType,kb=uciLineCrossingDetection.optName.soundAlarmTimes,
La=uciUsrDefAlarm.fileName,xb=uciUsrDefAlarm.secName.usrDefAudio,cc=uciUsrDefAlarm.optName.id,Ma=uciUsrDefAlarm.optName.name,w=uciMsgAlarm.fileName,lb=0,ya=0,mb=0,za=0,ha=uciPicturePlan.fileName,nb=0,Aa=0,Ea=!0,yb,zb,A,Pb=id("intelligentDetectionSwitchDes"),g,n=0,vb=0,m=[],p=[],R=50,dc=q,ec=q,fc=q,z="both",Ca=!0,Da=!0,hb=id("smartTargetTrack"),eb=id("triggerAlarmOut"),ab=id("triggerRecord"),Za=id("triggerMsgPush"),ba=id("triggerLightAlarm"),ca=id("triggerSoundAlarm"),gb=id("sendFtp"),ea,Rb=id("sendToFtpSwitchDes"),
da=id("triggerCapture"),Ab=id("peopleDetectionEnhanceCheck"),gc=id("vehicleDetectionEnhanceCheck"),hc=id("nonVehicleDetectionEnhanceCheck"),rb=id("timeSchedule"),tb=id("handleWay"),Y=[label.Mon,label.Tue,label.Wen,label.Thu,label.Fri,label.Sta,label.Sun],Ua=[uciLineCrossingDetection.optName.mon,uciLineCrossingDetection.optName.tue,uciLineCrossingDetection.optName.wed,uciLineCrossingDetection.optName.thu,uciLineCrossingDetection.optName.fri,uciLineCrossingDetection.optName.sat,uciLineCrossingDetection.optName.sun],
v,s=id("regionNumber"),x=[null,null,null,null],T=["0","0","0","0"],U=["0","0","0","0"],V=["0","0","0","0"],W=[!1,!1,!1,!1],ka=!1,H=!1,ia=!1,Na=!1,Q;id("sensitivityDragLineDragLineInput");var S=id("ptzToggleCon"),pa=$(".ptzBorderConfCon"),Oa=!0,Pa=1==parseInt($.moduleSpec[uciFunction.optName.corridorMode])?!0:!1,aa,K,B,I,L,J,y,C,N,va=isNaN(parseInt($.moduleSpec.alarm_out_num))?1:parseInt($.moduleSpec.alarm_out_num),la=!1,O=!1,fa,ga,ma,na=[],Ga=0,Bb=$.moduleSpec[uciFunction.optName.new_version_capability_list],
Cb=Bb&&0<=$.inArray(uciImage.fileName,Bb),Db=!1,Eb=!1,Ia=0,c=[{bSupported:!1,uciName:Ja,domName:Ab,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:dc},{bSupported:!1,uciName:oa,domName:gc,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:ec},{bSupported:!1,uciName:Ka,domName:hc,aiEnhanceTypeValue:[],aiEnhanceTypeValueDefault:fc}],M=!1;(function(){var a={},b=0,e=0;Wb();Xb();ac();a[d]={};a[d][NAME]=[Z];aa&&a[d][NAME].push(r);O&&a[d][NAME].push(D);a[d][KEY_TABLE]=[P];Pa&&(a[wb]={},a[wb][NAME]=uciImage.secName.para_switch);
!0==la&&(a[La]={},a[La][KEY_TABLE]=[xb]);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(a[w]={},a[w][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);Cb&&(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 n="vedioActiveX";
$.BSHOWPTZCTRL?(new PtzControl("ptzControlCon",1),n="ptzVideoActiveX vedioActiveX",$("ul.lineConfMenu").addClass("havePtz"),Pa&&(id("videoPluginCon").style.width="496px")):($("#ptzToggleCon").hide(),$("#ptzControlCon").hide());g=new Plugin({id:"videoPluginCon",className:n,readyHd:function(a){PLUGIN_STATE_ON==a&&!0==Ea&&(Ea=!1,g.setLineCrossingState(1),g.setRectArrLen(1),g.setOSDSpecialStatus(1),Ra(0),g.setOSDStatus(zb.state),Eb&&setDomSize($(".vedioActiveX")[0],null))}});selectInit("regionNumber",
[{str:label.lineOne,value:0},{str:label.lineTwo,value:1},{str:label.lineThree,value:2},{str:label.lineFour,value:3}],0,Vb);Q=new DragLine({id:"sensitivityDragLine",name:label.sensitivity,cb:Lb,lowerBound:1});v=new PlanSet("recPlanGrid",{curType:1});Sb();$("ul.lineConfMenu li.snapPicBtn").hide();$("ul.lineConfMenu li.snapPicBtn").click(function(a){Fb()});id("closeTip").onclick=function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display="none"})};S.onclick=
function(){Oa?(pa.hide(),Oa=!1,$(S).removeClass("ptzToggleShowIcon").addClass("ptzToggleHideIcon"),S.style.left="757px",$("ul.lineConfMenu").css("width","702px"),g.setSize({height:"396px",width:"704px"}),g.checkInstalled()||(pa.css("width","0px"),g.showInstalledTip())):(pa.show(),Oa=!0,S.style.left="549px",$(S).removeClass("ptzToggleHideIcon").addClass("ptzToggleShowIcon"),$("ul.lineConfMenu").css("width","494px"),g.setSize({height:"372px",width:"496px"}),g.checkInstalled()||(pa.css("width","204px"),
g.showInstalledTip()))};$.query(a,function(a){if(!0==u(a[ERR_CODE])){yb=a[d][P];var e=formatTableData(yb),f,n=0,q;for(q in e){var l=e[q],n=l[bc]-1;f={};f.id=l.id;f[ra]=l.pt1_x;f[sa]=l.pt1_y;f[ta]=l.pt2_x;f[ua]=l.pt2_y;$.BSHOWPTZCTRL&&(f.position_pan=l.position_pan,f.position_tilt=l.position_tilt,f.position_zoom=l.position_zoom,T[n]=l.position_pan,U[n]=l.position_tilt,V[n]=l.position_zoom,W[n]=!0);f[G]=l[G];f[X]=l[X];f[uciLineCrossingDetection.optName.peopleEnabled]=l[uciLineCrossingDetection.optName.peopleEnabled];
f[uciLineCrossingDetection.optName.vehicleEnabled]=l[uciLineCrossingDetection.optName.vehicleEnabled];x[n]=f;m[n]=l[X];p[n]=l[G];for(f=0;f<c.length;f++)c[f].bSupported&&(c[f].aiEnhanceTypeValue[n]=l[c[f].uciName])}for(f=0;4>f;f++)m[f]=null==m[f]?R:m[f],p[f]=null==p[f]?z:p[f];m[0]=null==m[0]?R:m[0];Q.setValue(m[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(f=0;f<c.length;f++)c[f].bSupported&&(c[f].aiEnhanceTypeValue[0]=null==c[f].aiEnhanceTypeValue[0]?c[f].aiEnhanceTypeValueDefault:c[f].aiEnhanceTypeValue[0],changeCheckInput(c[f].domName,c[f].aiEnhanceTypeValue[0]==h),$.det_mutex_list&&(c[f].uciName==Ja&&0<=$.inArray(19,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("peopleDetectionEnhanceCheckTips")).addClass("disable"),
c[f].aiEnhanceTypeValue[0]==h?$(c[f].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[f].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[f].domName.onclick=F),c[f].uciName==oa&&0<=$.inArray(20,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("vehicleDetectionEnhanceCheckTips")).addClass("disable"),c[f].aiEnhanceTypeValue[0]==h?$(c[f].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[f].domName).addClass("checkedDisabled").removeClass("checkDisabled"),
c[f].domName.onclick=F),c[f].uciName==Ka&&0<=$.inArray(22,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("nonVehicleDetectionEnhanceCheckTips")).addClass("disable"),c[f].aiEnhanceTypeValue[0]==h?$(c[f].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[f].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[f].domName.onclick=F)));selectInit("directionSel",[{str:label.toRight,value:"AtoB"},{str:label.toLeft,value:"BtoA"},
{str:label.bothWay,value:"both"}],null==p[0]?z:p[0],Mb);$.BSHOWPTZCTRL&&Ba(0);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&1==parseInt(a[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&(M=!0);if(aa){I&&(b=a[d][r][Ya]==h,changeCheckInput(Za,b));J&&(b=a[d][r][$a]==h,changeCheckInput(ab,b));K&&(b=a[d][r][bb]==h,changeCheckInput(ba,b),mb=1,za=a[w][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==
h?1:0);B&&(b=a[d][r][cb]==h,changeCheckInput(ca,b),lb=1,ya=a[w][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==h?1:0);if(L&&(b=a[d][r][db]==h,changeCheckInput(eb,b),1<va)){l=b;for(e=2;e<=va;e++)aoEnableOpt="AO"+e.toString()+"_enabled",b=a[d][r][aoEnableOpt]==h,changeCheckInput(id("triggerAlarmOut"+e.toString()),b),l=l&&b;l&&changeCheckInput("triggerAOAll",!0)}y&&(M&&C?($("#sendToFtpLine").hide(),ea=a[d][r][wa],b=ea==h?1:0,new Switch("sendToFtpSwitch",b,Qb)):($("#sendToFtpSwitchCon").hide(),
$("#sendToFtpLine").show(),$("#goToFtpConf").hide(),b=a[d][r][wa]==h,changeCheckInput(gb,b)));C&&(b=a[d][r][fb]==h,M&&y&&(b?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(da,b),$.moduleSpec[uciFunction.optName.captureEnable]&&(nb=1,Aa=a[ha][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==h?1:0));N&&(b=a[d][r][ib]==h,changeCheckInput(hb,b))}A=a[d][Z][Xa];b=A==h?1:0;1==b&&$.BSHOWPTZCTRL&&(ka=!0);zb=new Switch("intelligentDetectionSwitch",b,Ob);
if(!0==O){if(!0==la){l={};l=a[La][xb];e=formatTableData(l);for(q in e)l=e[q],l[Ma]||(l[Ma]=label.usrdefSound),na.push({str:l[Ma],value:l[cc]});uploadSoundFile("fileName",g,Ga,ma)}selectInit("soundTypeSelect",na,0,ub,"18");fa=a[d][D][jb];ga=a[d][D][kb];soundTypeSelect.changeSel(fa);soundTimesSelect.changeSel(ga)}if(Pa){var s=a[uciImage.fileName][uciImage.secName.para_switch][uciImage.optName.rotate_type];q={};q[uciVideo.fileName]={};q[uciVideo.fileName][NAME]=uciVideo.secName.main;$.query(q,function(a){!0==
u(a[ERR_CODE])&&(a=a[uciVideo.fileName][uciVideo.secName.main],a=a.resolution.split("*")[1]/a.resolution.split("*")[0],s==uciImage.optValue.rotOff?Ta():Ta(a),$("object.vedioActiveX").addClass("vedioActiveX_corridor"),id("videoPluginCon").style.background="black")})}Cb?1==parseInt(a[uciImageCapability.fileName][uciImageCapability.secType.capability][uciImageCapability.optName.stitch])?(Db=!0,a={},a[uciImageCapability.fileName]={},a[uciImageCapability.fileName][NAME]=[],a[uciImageCapability.fileName][NAME].push(uciImageCapability.optName.stitch),
$.query(a,function(a){!0==u(a[ERR_CODE])&&Db&&(Eb=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==u(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});Fa()}}))})):Fa():Fa()}});initCheckInput("showInfo",function(a,b){for(e=0;e<c.length;e++)c[e].bSupported&&(c[e].aiEnhanceTypeValue[s.value]="true"==c[e].domName.getAttribute("checked")?h:q,c[e].domName.value=c[e].aiEnhanceTypeValue[s.value]);a||0!=b||showAlert(label.confirmRecordOff)});initCheckInput("capture",function(a){M&&y&&(a?$("#sendToFtpSwitchCon").show():
$("#sendToFtpSwitchCon").hide())});id("save").onclick=Wa;id("del").onclick=Nb;id("clearAll").onclick=function(a){v.reset()};id("armingScheduleArrow").onclick=qb;id("armingScheduleArrowText").onclick=qb;id("handleArrow").onclick=sb;id("handleArrowText").onclick=sb;id("sensitivityDragLineDragLineInput").onblur=ob;Ab.onblur=ob;$("fieldset")[0].onscroll=function(){id("selOptsUleventSel")&&"visible"==id("selOptsUleventSel").style.visibility&&document.body.click()};id("goToFtpConf").onclick=function(){showConfirmC(label.cue,
label.saveTips,function(a){!0==a?Wa(function(){gFtpSwitchPageSign=1;unloadLogin()}):(gFtpSwitchPageSign=1,unloadLogin())},btn.unsave,btn.save,!1)}})();(function(){g.intelligentCallback(function(a){var b=0;if(!0==Na)for(m=[null,null,null,null],p=[null,null,null,null],b=0;b<c.length;b++)c[b].bSupported&&(c[b].aiEnhanceTypeValue=[null,null,null,null]);if(H){if(!1==ia){g.showHighlight(n,1);return}closeNoteAll();H=!1}else g.showHighlight(parseInt(a),0);if(!1==Na&&!1==ia)for(m[n]=null==m[n]?R:m[n],p[n]=
null==p[n]?z:p[n],b=0;b<c.length;b++)c[b].bSupported&&(c[b].aiEnhanceTypeValue[n]=null==c[b].aiEnhanceTypeValue[n]?c[b].aiEnhanceTypeValueDefault:c[b].aiEnhanceTypeValue[n]);null==m[0]&&null==m[1]&&null==m[2]&&null==m[3]||h!=A||pb();Q.setValue(null==m[n]?R:m[n]);$("#directionSel")[0].resetSel(p[n]);for(b=0;b<c.length;b++)c[b].bSupported&&(c[b].domName.value=null==c[b].aiEnhanceTypeValue[n]?c[b].aiEnhanceTypeValueDefault:c[b].aiEnhanceTypeValue[n],changeCheckInput(c[b].domName,c[b].domName.value==
h),$.det_mutex_list&&(c[b].uciName==Ja&&0<=$.inArray(19,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("peopleDetectionEnhanceCheckTips")).addClass("disable"),c[b].domName.value==h?$(c[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[b].domName.onclick=F),c[b].uciName==oa&&0<=$.inArray(20,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&
($(id("vehicleDetectionEnhanceCheckTips")).addClass("disable"),c[b].domName.value==h?$(c[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):$(c[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[b].domName.onclick=F),c[b].uciName==Ka&&0<=$.inArray(22,$.det_mutex_list[curIntelligentMode-1][uciDetectionCapability.optName.unsupportedList])&&($(id("nonVehicleDetectionEnhanceCheckTips")).addClass("disable"),c[b].domName.value==h?$(c[b].domName).addClass("checkDisabled").removeClass("checkedDisabled"):
$(c[b].domName).addClass("checkedDisabled").removeClass("checkDisabled"),c[b].domName.onclick=F)));Na=ia=!1})})()}init();
</script><style type="text/css">div.configDiv li.direction{display:inline-block;font-size:0;vertical-align:middle;height:30px;margin-left:60px;padding:5px 0}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;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>