

<div class="detailCon">
	<div id="videoPluginCon"></div>
	<div style="position:relative;*z-index:1;">
		<div id="hidebg"></div>
	</div>
	<div id="videoPluginCon">
		<ul class="line">
			<div id="popNote" class="popNote">
				<div class="popTitle" id="popTitle">
					<i id="closeTip" style="float:right;"></i>
					<span id="titleText"></span>
				</div>
				<div class="popContent" id ="popContent">
					<div class="popContentError disNone" id="popContentError"></div>
					<div class="popContentCorrect" id="popContentCorrect">
						<span class="check" id="check">{%label.check%}</span>
						<i class="completeIcon"></i>
						<span class="name" id="name"></span>
					</div>
				</div>
				<iframe frameborder="0" class="kinescopeNoteIframe"></iframe>
			</div>
		</ul>
	</div>
	<ul class="line lineConfMenu lineBottom">
		<li class="line lineConf2">
			<input id="del" type="button" class="subBtnB btnA delIcon" value="{%btn.del%}" />
		</li>
		<li class="line lineConf2">
			<input id="clear" type="button" class="subBtnB btnA clearIcon" value="{%btn.clean%}" />
		</li>
		<li class="snapPicLi snapPicBtn" title="{%label.snapPic%}"></li>
	</ul>
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle" id="regionName">{%label.regionOne%}</label>
		</div>
		<div class="configDiv" id="configDiv">
			<ul class="line">
				<li class="dragLine">
					<div id="sensitivityDragLine" class="ipcDragLineDiv"></div>
				</li>
			</ul>
			<div class="height"></div>
		</div>
	</div>
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.defenceTime%}</label>
			<div class="actionTitleArrowDiv">
				<label class="actionArrowTitle" id="armingScheduleArrowText">{%label.slideUp%}</label>
				<i class="arrowUp" title= {%label.slideUp%} id="armingScheduleArrow"></i>
			</div>
		</div>
		<div id="timeSchedule">
			<ul class="line">
				<li class="line linePlan">
					<span class="clearAll" id="clearAll">{%label.clear%}</span>
					<label class="tips">{%label.fastMovingDetTips%}</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">
					<i name="showInfo" id="triggerEmail" class="chObj" value="3"></i>
					<label class="des desA">{%label.sendEmail%}</label>
					<label class="des desM">{%label.emailTips%}</label>
				</li>
				<li class="Line lineE" id="msgPushLine">
					<i name="showInfo" id="triggerMsgPush" class="chObj" value="4"></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="5"></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="6"></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="7"></i>
					<label class="des desA">{%label.soundAlarm%}</label>
					<label class="des desM">{%label.soundAlarmTips%}</label>
				</li>
			</ul>
			<ul class="line" id="soundInfo">
				<li class="Line lineTypeSel soundTypeCon" id="soundType">
					<label class="des desTypeSel">{%label.soundAlarmType%}</label>
					<span class="selCon">
						<span id="soundTypeSelect" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
					<input id="setSoundAlarm" type="button" value="{%btn.configSet%}" class="subBtnB btnConfSet" />
				</li>
				<li class="Line lineTypeSel soundTypeCon" id="soundTimes">
					<label class="des desTypeSel">{%label.soundAlarmTimes%}</label>
					<span class="selCon">
						<span id="soundTimesSelect" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
				</li>
			</ul>
		</div>
	</div>
	<!-- 功能按钮 -->
	<div class="funcBtnCon">
		<input id="save" type="button" value="{%btn.save%}" class="subBtn btnA"/>
	</div>
</div>
<div id="soundInfoEditCon" class="tableEditLyCon">
	<div class="tableEditCon tableEditConT">
		<div class="innerCon">
			<h4 class="title soundInfoInnerCon">{%label.soundAlarmSet%}</h4>
			<i id="infoCloseTip"></i>
			<ul class="line">
				<li class="Line lineSoundInfoHead">
					<div class="ipcDragLineDiv">
						<label id="soundList" class="des desC desList">{%label.soundList%}</label>
						<div class="fileDiv">
							<input type="button" value="{%btn.uploadFile%}" style="display:none" class="subBtn btnUpload" />
							<input type="file" class="file" name="filename" style="display:none" id="fileName" />
						</div>
					</div>
				</li>
			</ul>
			<div class="tableSoundInfo" id="SoundInfoShowCon">
				<ul class="line">
					<li class="Line lineSoundInfoSubHead" id="devsound_0">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.alarmSound%}</label>
							<input id="testListen_0" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_1">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.warningSound%}</label>
							<input id="testListen_1" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_2">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.waringZone%}</label>
							<input id="testListen_2" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_3">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerZone%}</label>
							<input id="testListen_3" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_4">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.noParking%}</label>
							<input id="testListen_4" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_5">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.monitorArea%}</label>
							<input id="testListen_5" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_6">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.helloWelcome%}</label>
							<input id="testListen_6" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_7">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.noTouching%}</label>
							<input id="testListen_7" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_8">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.privateZone%}</label>
							<input id="testListen_8" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_9">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerWater%}</label>
							<input id="testListen_9" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_10">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerHeight%}</label>
							<input id="testListen_10" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_11">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.gabbageClassify%}</label>
							<input id="testListen_11" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_12">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.intoWorkshop%}</label>
							<input id="testListen_12" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_13">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid%}</label>
							<input id="testListen_13" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_14">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.tempWarning%}</label>
							<input id="testListen_14" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_15">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.maskWorn%}</label>
							<input id="testListen_15" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_16">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.maskRequest%}</label>
							<input id="testListen_16" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_17">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid1%}</label>
							<input id="testListen_17" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_18">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid2%}</label>
							<input id="testListen_18" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_19">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid3%}</label>
							<input id="testListen_19" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_0" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit0" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text0" for="usrdef_edit0" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename0" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete0" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test0" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel0" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save0" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_1" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit1" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text1" for="usrdef_edit1" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename1" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete1" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test1" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel1" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save1" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_2" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit2" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text2" for="usrdef_edit2" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename2" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete2" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test2" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel2" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save2" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<iframe frameborder="0" class="innerIframe"></iframe>
	</div>
</div>
<script type="text/javascript">function init(){function s(a,d){var b="";switch(parseInt(a)){case ENONE:return!0;case IPCSMDENABLEERR:b=errStr.IPCParamInvalid;break;case EINVARG:b=errStr.IPCParamInvalid;break;case IPCUMGUESTNAUTH:b=errStr.invPermissionDenied;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFYRECORDENERR:case IPCNOTIFYFTPENERR:b=errStr.IPCHandleInalid;break;case IPCSMDREGIONEILLEGAL:b=errStr.regionIllegal;break;case IPCSMDREGIONNUMERR:b=errStr.regionNumErr;break;case IPCARMINGSCHEDULEEOVERFLOW:b=
errStr.armingScheduleOverflow;break;case IPCARMINGSCHEDULEMIX:b=errStr.armingScheduleMix;break;case IPCARMINGSCHEDULEILLEGAL:b=errStr.armingScheduleIllegal;break;default:b=errStr.invRequestFail}closeToast();showAlert(b,d);return!1}function ra(){clearTimeout(ba);ba=$.setTimeout(function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display="none"})},5E3)}function eb(){g.catchPic(function(a){var d="";switch(parseInt(a)){case 0:d=label.snapPicEnd;$("#StorageFolder").css("background-image",
"url(../web-static/images/save_reddot.png)");break;case 1:d=label.snapPicSaveFail;break;case 2:return;case 3:d=label.diskLess;break;case 7:d=label.pathChange;break;case 8:d=label.pathNoExist}if(0<parseInt(a))clearTimeout(ba),popContentCorrect.style.display="none",popContentError.style.display="inline-block",7==parseInt(a)?titleText.innerHTML=label.cue:titleText.innerHTML=label.snapPicFail,popContentError.innerHTML=d;else{var b=g.getPicFileStoragePath(),d=b.lastIndexOf("\\"),d=b.substr(d+1);popContentCorrect.style.display=
"inline-block";popContentError.style.display="none";titleText.innerHTML=label.snapPicSuccess;fb.innerHTML=d;check.onclick=function(){g.openFileStorageFolder(b)};ra()}$("#popNote").animate({bottom:"0px"});id("popNote").style.display="inline-block";log(a);7==parseInt(a)&&ra()})}function gb(){for(var a=[],d=0,b,f,c=0;4>d;d++){b=g.getIntelligentRegion(d);if(null==b.pt1_x||0==b.pt1_x&&0==b.pt1_y&&0==b.pt2_x&&0==b.pt2_y)return null;0<=b.pt1_x&&(f={},f[sa]=d+1+"",f[ca]=b.pt1_x,f[ta]=b.pt1_y,f[ua]=b.pt2_x,
f[va]=b.pt2_y,f[wa]=b.pt3_x,f[xa]=b.pt3_y,f[ya]=b.pt4_x,f[za]=b.pt4_y,f[Aa]=k[d],a[c++]=f)}return a}function Ba(a){var d=id("videoPluginCon").offsetHeight;void 0==a?g.setSize({height:"396px",width:"720px"}):g.setSize({height:d+"px",width:d*a+"px"})}function hb(a){var d,b=[];if(void 0==a)return b.push('"0000-0000:0"'),b;a instanceof Array||(a=a.match(/\d{4}-\d{4}/g));for(var f=0;f<a.length;f++){d=a[f];var c=d.split(/[-]/,2);d=parseInt(c[0],10);c=parseInt(c[1],10);0==d&&0==c?b.push(r._getString(d,c,
0)):b.push(r._getString(d,c,1))}return b}function ib(){var a,d=r.getTimeVal(),b={};for(a=0;a<K.length;a++){var c=b,k=Ca[a],l;l=d[K[a]];var h=void 0,n=void 0,e=void 0,g=void 0,m=void 0,m=g=void 0;if(void 0==l)l="";else{void 0==h&&(h=6);n="[";if(1>l.length)n+='"0000-0000"';else for(e=0;e<l.length&&e<h;e++)g=l[e].toString(),m=g.split(/[-,:]/,3),g=parseInt(m[0],10),m=parseInt(m[1],10),g=r._getStringWithoutType(g,m),0<e&&(n+=","),n+='"'+g+'"';l=n+="]"}c[k]=l}return b}function Da(a){if(A)return!1;var d=
gb();if(h!=v||null!=d&&0!=d.length){var b={},f={};b[c]={};b[c][L]={};b[c][L][Ea]=v;if(M){b[c][m]={};B&&(b[c][m][Fa]="true"==Ga.getAttribute("checked")?h:p);C&&(b[c][m][da]="true"==Ha.getAttribute("checked")?h:p);D&&(b[c][m][Ia]="true"==N.getAttribute("checked")?h:p);w&&(b[c][m][Ja]="true"==O.getAttribute("checked")?h:p);if(E){b[c][m][Ka]="true"==La.getAttribute("checked")?h:p;for(var e=2;e<=ea;e++)b[c][m]["AO"+e.toString()+"_enabled"]="true"==id("triggerAlarmOut"+e.toString()).getAttribute("checked")?
h:p}P&&(b[c][m][jb]="true"==kb.getAttribute("checked")?h:p);x&&(b[c][m][Ma]="true"==Q.getAttribute("checked")?h:p);u&&(b[c][m][fa]=F?R:"true"==Na.getAttribute("checked")?h:p)}b[c][ga]=ib();!0==G&&(b[c][y]={},b[c][y][Oa]=S,b[c][y][Pa]=T);var l=Qa&&!ha&&"true"==O.getAttribute("checked"),g=Ra&&!ia&&"true"==N.getAttribute("checked"),n=Sa&&!ja&&"true"==Q.getAttribute("checked");l||g||n?((l||g)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,function(e){!0==e?(b[t]={},b[t][uciMsgAlarm.secName.chn1MsgAlarmInfo]=
{},l&&(b[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=uciMsgAlarm.optValue.enableVal.on),g&&(b[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=uciMsgAlarm.optValue.enableVal.on),showToast(),$.modify(b,function(b){!0==s(b[ERR_CODE])&&(l&&(ha=1),g&&(ia=1),null!=d?(f[c]={},f[c][z]={},f[c][z][H]=d,$.action(f,function(a){!0==s(a[ERR_CODE])&&showToast("success")})):showToast("success"),"function"==typeof a&&void 0!=a&&a())})):(l&&changeCheckInput(O,
!1),g&&changeCheckInput(N,!1))}),n&&showConfirmIpc(label.confirmCaptureOnTip,function(e){b[U]={};b[U][uciPicturePlan.secName.eventConfig]={};!0==e?(n&&(b[U][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=uciPicturePlan.optValue.on),showToast(),$.modify(b,function(b){!0==s(b[ERR_CODE])&&(n&&(ja=1),null!=d?(f[c]={},f[c][z]={},f[c][z][H]=d,$.action(f,function(a){!0==s(a[ERR_CODE])&&showToast("success")})):showToast("success"),"function"==typeof a&&void 0!=a&&a())})):n&&changeCheckInput(Q,
!1)})):(showToast(),$.modify(b,function(b){!0==s(b[ERR_CODE])&&(f[c]={},f[c][z]={},f[c][z][H]=d,$.action(f,function(a){!0==s(a[ERR_CODE])&&showToast("success")}),"function"==typeof a&&void 0!=a&&a())}))}else showAlert(label.addOneRegionFirst)}function Ta(){closeNoteAll();!0==checkNum(id("sensitivityDragLineDragLineInput").value)&&!0==checkNumRange(parseInt(id("sensitivityDragLineDragLineInput").value),100,1)?(k[q]=id("sensitivityDragLineDragLineInput").value,V.setValue(id("sensitivityDragLineDragLineInput").value),
A=!1):(showNote("sensitivityDragLineDragLineInput",errStr.sensitivityErr),A=!0)}function lb(a){closeNote("sensitivityDragLineDragLineInput");k[q]=a}function mb(){I=!0;k[q]=null;null==k[0]&&null==k[1]&&null==k[2]&&null==k[3]&&(id("sensitivityDragLineDragLineInput").value=W,J());g.delIntelligentRegion(PLUGIN_STATE_ON)}function nb(){X=!0;k=[null,null,null,null];id("sensitivityDragLineDragLineInput").value=W;g.delIntelligentRegion(PLUGIN_STATE_MINUS);J()}function J(){var a=document.getElementById("hidebg");
a.style.display="block";var d=getoffset(id("save")).top-getoffset(id("del")).top;if(0==$("#peCon").length||"none"==$("#peCon").css("display"))a.style.height=d+"px";else{var b=getoffset(id("peCon")).top-getoffset(id("del")).top+id("peCon").offsetHeight;a.style.height=(d>b?d:b)+"px"}}function Ua(){document.getElementById("hidebg").style.display="none"}function ob(a){pb.innerHTML=1==a?btn.enableN:btn.close;v=1==a?h:p;!1==g.checkInstalled()?J():0==a?(g.setOSDStatus(0),J()):(g.setOSDStatus(1),null==k[0]&&
null==k[1]&&null==k[2]&&null==k[3]?J():Ua())}function qb(a){rb.innerHTML=1==a?btn.enableN:btn.close;R=1==a?h:p}function sb(){var a,d={};d[c]={};d[c][NAME]=ga;$.query(d,function(b){if(!0==s(b[ERR_CODE]))for(r.reset(),a=0;a<K.length;a++)r.setTimeVal(K[a],hb(b[c][ga][Ca[a]]))})}function Va(a){ka?(id("armingScheduleArrow").className="arrowDown",id("armingScheduleArrow").title=label.slideDown,id("armingScheduleArrowText").innerHTML=label.slideDown,Wa.style.display="none",ka=!1):(id("armingScheduleArrow").className=
"arrowUp",id("armingScheduleArrow").title=label.slideUp,id("armingScheduleArrowText").innerHTML=label.slideUp,Wa.style.display="",ka=!0)}function Xa(a){la?(id("handleArrow").className="arrowDown",id("handleArrow").title=label.slideDown,id("handleArrowText").innerHTML=label.slideDown,Ya.style.display="none",la=!1):(id("handleArrow").className="arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,Ya.style.display="",la=!0)}function Za(a){S=a}function tb(a){T=
a}function ub(a,d){selectInit("soundTypeSelect",a,0,Za,"18");id("soundTypeSelect").resetSel(d)}function vb(){var a=uciLinkageCapability.optName.sound_alarm_capability,d=uciLinkageCapability.optName.msg_push_capability,b=uciLinkageCapability.optName.alarm_out_capability,c=uciLinkageCapability.optName.record_capability,e=uciLinkageCapability.optName.email_capability,g=uciLinkageCapability.optName.ftp_capability,h=uciLinkageCapability.optName.capture_capability,n=function(a){a=$.linkageCapability[a];
return 9>a.length?!1:"1"==a[a.length-9]?!0:!1};D=n(uciLinkageCapability.optName.light_alarm_capability);w=n(a);B=n(d);E=n(b);C=n(c);P=n(e);u=n(g);x=n(h);(M=D||w||B||E||C||P||u||x)?(D||$("#triggerLightAlarm").parent().hide(),w||$("#triggerSoundAlarm").parent().hide(),B||$("#triggerMsgPush").parent().hide(),C||$("#triggerRecord").parent().hide(),E?InsertTriggerAlarmOut("triggerAlarmOut"):$("#triggerAlarmOut").parent().hide(),P||$("#triggerEmail").parent().hide(),u||$("#sendToFtp").hide(),x||$("#triggerCapture").parent().hide()):
id("handleWayDiv").style.display="none"}function wb(){w&&$.audioAlarmCapability&&(G=1==parseInt($.audioAlarmCapability[xb])?!0:!1,Y=1==parseInt($.audioAlarmCapability[yb])?!0:!1,Z=parseInt($.audioAlarmCapability[zb]),ma=$.audioAlarmCapability[na].length);if(!1==G)id("soundInfo").style.display="none";else{id("soundTypeSelect");id("soundTimesSelect");for(var a=[],d=[{str:label.alarmSound,value:0},{str:label.warningSound,value:1},{str:label.waringZone,value:2},{str:label.dangerZone,value:3},{str:label.noParking,
value:4},{str:label.monitorArea,value:5},{str:label.helloWelcome,value:6},{str:label.noTouching,value:7},{str:label.privateZone,value:8},{str:label.dangerWater,value:9},{str:label.dangerHeight,value:10},{str:label.gabbageClassify,value:11},{str:label.intoWorkshop,value:12},{str:label.ebikeForbid,value:13},{str:label.tempWarning,value:14},{str:label.maskWorn,value:15},{str:label.maskRequest,value:16},{str:label.ebikeForbid1,value:17},{str:label.ebikeForbid2,value:18},{str:label.ebikeForbid3,value:19}],
b=0;b<$.audioAlarmCapability[na].length;b++){var f=parseInt($.audioAlarmCapability[na][b]);a.push(f);aa.push(d[f])}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==Y)id("setSoundAlarm").style.display="none";else{openSoundInfo("setSoundAlarm",ma,Z,label.usrdefSound);closeSoundInfo("infoCloseTip",c,aa,ub);for(b=0;b<d.length;b++)0<=$.inArray(b,a)?(devSoundListen("testListen_"+
b,b),devSoundFocus("devsound_"+b,b)):id("devsound_"+b).style.display="none";for(a=0;a<Z;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)}}var c=uciFastMovingDetection.fileName,L=uciFastMovingDetection.secName.detection,ga=uciFastMovingDetection.secName.armingSchedule,m=uciFastMovingDetection.secName.notifyList,
H=uciFastMovingDetection.secType.regionInfo,Ea=uciFastMovingDetection.optName.enabled,Aa=uciFastMovingDetection.optName.sensitivity,Ab=uciFastMovingDetection.optName.id,ca=uciFastMovingDetection.optName.pt1x,ta=uciFastMovingDetection.optName.pt1y,ua=uciFastMovingDetection.optName.pt2x,va=uciFastMovingDetection.optName.pt2y,wa=uciFastMovingDetection.optName.pt3x,xa=uciFastMovingDetection.optName.pt3y,ya=uciFastMovingDetection.optName.pt4x,za=uciFastMovingDetection.optName.pt4y,sa=uciFastMovingDetection.optName.id,
jb=uciFastMovingDetection.optName.emailEnabled,Ka=uciFastMovingDetection.optName.alarmEnabled,da=uciFastMovingDetection.optName.recordEnabled,fa=uciFastMovingDetection.optName.ftpEnabled,Ma=uciFastMovingDetection.optName.captureEnabled,Fa=uciFastMovingDetection.optName.msgPushEnabled,Ja=uciFastMovingDetection.optName.soundAlarmEnabled,Ia=uciFastMovingDetection.optName.lightAlarmEnabled,da=uciFastMovingDetection.optName.recordEnabled,y=uciFastMovingDetection.secName.soundAlarmInfo,xb=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,
yb=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,zb=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,na=uciAlarmAudioTypeCapability.optName.alarmType,Oa=uciFastMovingDetection.optName.soundAlarmType,Pa=uciFastMovingDetection.optName.soundAlarmTimes,oa=uciUsrDefAlarm.fileName,$a=uciUsrDefAlarm.secName.usrDefAudio,Bb=uciUsrDefAlarm.optName.id,pa=uciUsrDefAlarm.optName.name,h=uciFastMovingDetection.optValue.enableVal.on,p=uciFastMovingDetection.optValue.enableVal.off,z=uciFastMovingDetection.actionName.addRegions,
ab=uciImage.fileName,t=uciMsgAlarm.fileName,Qa=0,ha=0,Ra=0,ia=0,U=uciPicturePlan.fileName,Sa=0,ja=0,bb=!0,e,qa,cb,v,pb=id("intelligentDetectionSwitchDes"),g,q=0,k=[],W=50,kb=id("triggerEmail"),Ga=id("triggerMsgPush"),O=id("triggerSoundAlarm"),La=id("triggerAlarmOut"),N=id("triggerLightAlarm"),Na=id("sendFtp"),R,rb=id("sendToFtpSwitchDes"),Q=id("triggerCapture"),Ha=id("triggerRecord");id("sensitivityDragLineDragLineInput");var K=[label.Mon,label.Tue,label.Wen,label.Thu,label.Fri,label.Sta,label.Sun],
Ca=[uciFastMovingDetection.optName.mon,uciFastMovingDetection.optName.tue,uciFastMovingDetection.optName.wed,uciFastMovingDetection.optName.thu,uciFastMovingDetection.optName.fri,uciFastMovingDetection.optName.sat,uciFastMovingDetection.optName.sun],ka=!0,la=!0,Wa=id("timeSchedule"),Ya=id("handleWay"),A=!1,V,I=!1,X=!1,fb=id("name"),ba,r,db=1==parseInt($.moduleSpec[uciFunction.optName.corridorMode])?!0:!1,M,D,w,B,E,C,u,P,x,ea=isNaN(parseInt($.moduleSpec.alarm_out_num))?1:parseInt($.moduleSpec.alarm_out_num),
Y=!1,G=!1,S,T,Z,aa=[],ma=0,F=!1;(function(){var a={};e=0;vb();wb();a[c]={};a[c][NAME]=[L];M&&a[c][NAME].push(m);G&&a[c][NAME].push(y);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(a[t]={},a[t][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);a[c][KEY_TABLE]=[H];!0==Y&&(a[oa]={},a[oa][KEY_TABLE]=[$a]);db&&(a[ab]={},a[ab][NAME]=uciImage.secName.para_switch);$.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);g=new Plugin({id:"videoPluginCon",className:"vedioActiveX",readyHd:function(a){if(PLUGIN_STATE_ON==a&&!0==bb){bb=!1;g.setIntelligentState(1);g.setOSDSpecialStatus(1);a=formatTableData(qa);for(var b in a){var c=a[b];void 0!=c[ca]&&g.showIntelligentRegion(parseInt(c[sa])-1,{pt1_x:c[ca],pt1_y:c[ta],pt2_x:c[ua],pt2_y:c[va],
pt3_x:c[wa],pt3_y:c[xa],pt4_x:c[ya],pt4_y:c[za]})}g.setOSDStatus(cb.state)}}});V=new DragLine({id:"sensitivityDragLine",name:label.sensitivity,cb:lb,lowerBound:1});r=new PlanSet("recPlanGrid",{curType:1});sb();$("ul.lineConfMenu li.snapPicBtn").hide();$("ul.lineConfMenu li.snapPicBtn").click(function(a){eb()});id("closeTip").onclick=function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display="none"})};$.query(a,function(a){if(!0==s(a[ERR_CODE])){qa=a[c][H];
var b=formatTableData(qa),f=0,p;for(p in b){var l=b[p],f=l[Ab]-1;k[f]=l[Aa]}q=f;V.setValue(null==k[f]?W:k[f]);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&1==parseInt(a[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&(F=!0);if(M){B&&(e=a[c][m][Fa]==h,changeCheckInput(Ga,e));C&&(e=a[c][m][da]==h,changeCheckInput(Ha,e));D&&(e=a[c][m][Ia]==h,changeCheckInput(N,e),Ra=1,ia=a[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==
h?1:0);w&&(e=a[c][m][Ja]==h,changeCheckInput(O,e),Qa=1,ha=a[t][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==h?1:0);if(E&&(e=a[c][m][Ka]==h,changeCheckInput(La,e),1<ea)){l=e;for(b=2;b<=ea;b++)aoEnableOpt="AO"+b.toString()+"_enabled",e=a[c][m][aoEnableOpt]==h,changeCheckInput(id("triggerAlarmOut"+b.toString()),e),l=l&&e;l&&changeCheckInput("triggerAOAll",!0)}u&&(F&&x?($("#sendToFtpLine").hide(),R=a[c][m][fa],e=R==h?1:0,new Switch("sendToFtpSwitch",e,qb)):($("#sendToFtpSwitchCon").hide(),
$("#sendToFtpLine").show(),$("#goToFtpConf").hide(),e=a[c][m][fa]==h,changeCheckInput(Na,e)));x&&(e=a[c][m][Ma]==h,F&&u&&(e?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(Q,e),$.moduleSpec[uciFunction.optName.captureEnable]&&(Sa=1,ja=a[U][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==h?1:0))}v=a[c][L][Ea];e=v==h?1:0;cb=new Switch("intelligentDetectionSwitch",e,ob);if(!0==G){if(!0==Y){l={};l=a[oa][$a];b=formatTableData(l);for(p in b)l=b[p],
l[pa]||(l[pa]=label.usrdefSound),aa.push({str:l[pa],value:l[Bb]});uploadSoundFile("fileName",g,ma,Z)}selectInit("soundTypeSelect",aa,0,Za,"18");S=a[c][y][Oa];T=a[c][y][Pa];soundTypeSelect.changeSel(S);soundTimesSelect.changeSel(T)}g.playVideo();if(db){var r=a[uciImage.fileName][uciImage.secName.para_switch][uciImage.optName.rotate_type];a={};a[uciVideo.fileName]={};a[uciVideo.fileName][NAME]=uciVideo.secName.main;$.query(a,function(a){!0==s(a[ERR_CODE])&&(a=a[uciVideo.fileName][uciVideo.secName.main],
a=a.resolution.split("*")[1]/a.resolution.split("*")[0],r==uciImage.optValue.rotOff?Ba():Ba(a),$("object.vedioActiveX").addClass("vedioActiveX_corridor"),id("videoPluginCon").style.background="black")})}$("ul.lineConfMenu li.snapPicBtn").show();showDetailCon()}});id("save").onclick=Da;id("clear").onclick=nb;id("del").onclick=mb;id("clearAll").onclick=function(a){r.reset()};id("armingScheduleArrow").onclick=Va;id("armingScheduleArrowText").onclick=Va;id("handleArrow").onclick=Xa;id("handleArrowText").onclick=
Xa;id("sensitivityDragLineDragLineInput").onblur=Ta;id("goToFtpConf").onclick=function(){showConfirmC(label.cue,label.saveTips,function(a){!0==a?Da(function(){gFtpSwitchPageSign=1;unloadLogin()}):(gFtpSwitchPageSign=1,unloadLogin())},btn.unsave,btn.save,!1)}})();initCheckInput("showInfo",function(a,c){a||0!=c||showAlert(label.confirmRecordOff)});initCheckInput("capture",function(a){F&&u&&(a?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide())});(function(){g.intelligentCallback(function(a){Ta();
!0==X?k=[null,null,null,null]:!0==I&&(k[q]=null);if(A){if(!1==I){g.showHighlight(q,1);return}closeNoteAll();A=!1}else g.showHighlight(parseInt(a),0);switch(parseInt(a)){case 0:q=0;id("regionName").innerHTML=label.regionOne;break;case 1:q=1;id("regionName").innerHTML=label.regionTwo;break;case 2:q=2;id("regionName").innerHTML=label.regionThree;break;case 3:q=3;id("regionName").innerHTML=label.regionFour;break;default:return}!1==X&&!1==I&&(k[q]=null==k[q]?id("sensitivityDragLineDragLineInput").value:
k[q]);null==k[0]&&null==k[1]&&null==k[2]&&null==k[3]||h!=v||Ua();V.setValue(null==k[q]?W:k[q]);X=I=!1})})()}init();
</script><style type="text/css">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.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}</style>