

<div class="detailCon">
	<div id="ptzToggleCon" class="ptzToggle ptzToggleShowIcon"></div>
	<div class="ptzBorderConfCon  IESIXFMLM3" id="ptzControlCon"></div>
	<div style="position:relative;*z-index:1;">
		<div id="hidebg"></div>
	</div>
	<div id="videoPluginCon">
		<ul class="line">
			<div id="popNote" class="popNote">
				<div class="popTitle" id="popTitle">
					<i id="closeTip" style="float:right;"></i>
					<span id="titleText"></span>
				</div>
				<div class="popContent" id ="popContent">
					<div class="popContentError disNone" id="popContentError"></div>
					<div class="popContentCorrect" id="popContentCorrect">
						<span class="check" id="check">{%label.check%}</span>
						<i class="completeIcon"></i>
						<span class="name" id="name"></span>
					</div>
				</div>
				<iframe frameborder="0" class="kinescopeNoteIframe"></iframe>
			</div>
		</ul>
	</div>
	<ul class="line lineConfMenu lineBottom">
		<li class="snapPicLi snapPicBtn" title="{%label.snapPic%}"></li>
	</ul>
	<div class="actionBarDiv" id="regionSetting">
		<div class="configDiv" id="configDiv">
			<ul class="line" id="dragLineWrap">
				<li class="dragLine">
					<div id="sensitivityDragLine" class="ipcDragLineDiv"></div>
				</li>
			</ul>
		</div>
	</div>
	<div class="actionBarDiv" id="handleWayDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.handleWay%}</label>
			<div class="actionTitleArrowDiv">
				<label class="actionArrowTitle" id="handleArrowText">{%label.slideUp%}</label>
				<i class="arrowUp" title= {%label.slideUp%} id="handleArrow"></i>
			</div>
		</div>
		<div class="handleWay" id="handleWay">
			<ul class="Line">
				<li class="Line lineE" id="recordLine">
					<i name="showInfo" id="triggerRecord" class="chObj" value="0"></i>
					<label class="des desA">{%label.triggerRecordF%}</label>
					<label class="des desM">{%label.triggerRecordTips%}</label>
				</li>
				<li class="Line lineE" id="captureLine">
					<i name="capture" id="triggerCapture" class="chObj" value="1"></i>
					<label class="des desA">{%label.triggerCapture%}</label>
					<label class="des desM">{%label.captureTips%}</label>
				</li>
				<ul class="line" id="sendToFtp">
					<li class="Line" id="sendToFtpLine">
						<i name="showInfo" id="sendFtp" class="chObj" value="2"></i>
						<label class="des desA">{%label.sendFtp%}</label>
						<label class="des desM">{%label.ftpTips%}</label>
					</li>
					<li class="Line lineTypeSel" id="sendToFtpSwitchCon">
						<label class="des desTypeSel sendFtpDes">{%label.sendFtp%}</label>
						<div id="sendToFtpSwitch" class="switchCon">
							<i class="switchBg"></i>
							<i class="switchBall"></i>
						</div>
						<label id="sendToFtpSwitchDes" class="des desH">{%btn.close%}</label>
						<input id="goToFtpConf" type="button" class="subBtnB btnA goToFtpConf" value="{%btn.goToFtpConf%}" />
					</li>
				</ul>
				<li class="Line lineE" id="msgPushLine">
					<i name="showInfo" id="triggerMsgPush" class="chObj" value="3"></i>
					<label class="des desA">{%label.msgPush%}</label>
					<label class="des desM">{%label.msgPushTips%}</label>
				</li>
				<li class="Line lineE" id="alarmOutLine">
					<i name="showInfo" id="triggerAlarmOut" class="chObj" value="4"></i>
					<label class="des desA">{%label.triggerAlarmDevice%}</label>
					<label class="des desM">{%label.triggerAlarmDeviceTips%}</label>
				</li>
				<li class="Line lineE" id="lightAlarmLine">
					<i name="showInfo" id="triggerLightAlarm" class="chObj" value="5"></i>
					<label class="des desA">{%label.lightAlarm%}</label>
					<label class="des desM">{%label.lightAlarmTips%}</label>
				</li>
				<li class="Line lineE" id="soundAlarmLine">
					<i name="showInfo" id="triggerSoundAlarm" class="chObj" value="6"></i>
					<label class="des desA">{%label.soundAlarm%}</label>
					<label class="des desM">{%label.soundAlarmTips%}</label>
				</li>
			</ul>
			<ul class="line" id="soundInfo">
				<li class="Line lineTypeSel soundTypeCon" id="soundType">
					<label class="des desTypeSel">{%label.soundAlarmType%}</label>
					<span class="selCon">
						<span id="soundTypeSelect" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
					<input id="setSoundAlarm" type="button" value="{%btn.configSet%}" class="subBtnB btnConfSet" />
				</li>
				<li class="Line lineTypeSel soundTypeCon" id="soundTimes">
					<label class="des desTypeSel">{%label.soundAlarmTimes%}</label>
					<span class="selCon">
						<span id="soundTimesSelect" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
				</li>
			</ul>
		</div>
	</div>
	<!-- 功能按钮 -->
	<div class="funcBtnCon">
		<input id="save" type="button" value="{%btn.save%}" class="subBtn btnA"/>
	</div>
</div>
<div id="soundInfoEditCon" class="tableEditLyCon">
	<div class="tableEditCon tableEditConT">
		<div class="innerCon">
			<h4 class="title soundInfoInnerCon">{%label.soundAlarmSet%}</h4>
			<i id="infoCloseTip"></i>
			<ul class="line">
				<li class="Line lineSoundInfoHead">
					<div class="ipcDragLineDiv">
						<label id="soundList" class="des desC desList">{%label.soundList%}</label>
						<div class="fileDiv">
							<input type="button" value="{%btn.uploadFile%}" style="display:none" class="subBtn btnUpload" />
							<input type="file" class="file" name="filename" style="display:none" id="fileName" />
						</div>
					</div>
				</li>
			</ul>
			<div class="tableSoundInfo" id="SoundInfoShowCon">
				<ul class="line">
					<li class="Line lineSoundInfoSubHead" id="devsound_0">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.alarmSound%}</label>
							<input id="testListen_0" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_1">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.warningSound%}</label>
							<input id="testListen_1" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_2">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.waringZone%}</label>
							<input id="testListen_2" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_3">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerZone%}</label>
							<input id="testListen_3" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_4">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.noParking%}</label>
							<input id="testListen_4" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_5">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.monitorArea%}</label>
							<input id="testListen_5" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_6">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.helloWelcome%}</label>
							<input id="testListen_6" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_7">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.noTouching%}</label>
							<input id="testListen_7" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_8">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.privateZone%}</label>
							<input id="testListen_8" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_9">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerWater%}</label>
							<input id="testListen_9" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_10">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.dangerHeight%}</label>
							<input id="testListen_10" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_11">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.gabbageClassify%}</label>
							<input id="testListen_11" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_12">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.intoWorkshop%}</label>
							<input id="testListen_12" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_13">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid%}</label>
							<input id="testListen_13" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_14">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.tempWarning%}</label>
							<input id="testListen_14" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_15">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.maskWorn%}</label>
							<input id="testListen_15" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_16">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.maskRequest%}</label>
							<input id="testListen_16" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_17">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid1%}</label>
							<input id="testListen_17" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_18">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid2%}</label>
							<input id="testListen_18" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="devsound_19">
						<div class="ipcDragLineDiv">
							<label class="des desSoundName">{%label.ebikeForbid3%}</label>
							<input id="testListen_19" type="button" value="{%btn.testListen%}" class="subBtnB btnDevSoundTest testIcon" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_0" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit0" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text0" for="usrdef_edit0" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename0" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete0" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test0" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel0" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save0" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_1" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit1" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text1" for="usrdef_edit1" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename1" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete1" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test1" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel1" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save1" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
					<li class="Line lineSoundInfoSub" id="usrdef_2" style="display:none">
						<div class="ipcDragLineDiv">
							<input id="usrdef_edit2" type="text" class="text textSoundName" value="" maxlength="32" style="display:none"/>
							<label id="usrdef_text2" for="usrdef_edit2" class="des desSoundName">{%label.usrdefSound%}</label>
							<input id="usrdef_rename2" type="button" value="{%btn.rename%}" class="subBtnB btnRename renameIcon" style="display:none"/>
							<input id="usrdef_delete2" type="button" value="{%btn.del%}" class="subBtnB btnDel clearIcon" style="display:none"/>
							<input id="usrdef_test2" type="button" value="{%btn.testListen%}" class="subBtnB btnUsrdefSoundTest testIcon" style="display:none"/>
							<input id="usrdef_cancel2" type="button" value="{%btn.cancel%}" class="subBtnB btnCancel" style="display:none"/>
							<input id="usrdef_save2" type="button" value="{%btn.ok%}" class="subBtn btnSave" style="display:none"/>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<iframe frameborder="0" class="innerIframe"></iframe>
	</div>
</div>
<script type="text/javascript">function init(){function n(a,b){var c="";switch(parseInt(a)){case ENONE:return!0;case IPCSMDENABLEERR:c=errStr.IPCParamInvalid;break;case EINVARG:c=errStr.IPCParamInvalid;break;case IPCSMDSENSITIVITYERR:c=errStr.sensitivityErr;break;case IPCUMGUESTNAUTH:c=errStr.invPermissionDenied;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFYRECORDENERR:case IPCNOTIFYFTPENERR:case IPCNOTIFMSGPUSHENERR:case IPCNOTIFCAPTUREENERR:case IPCNOTIFSOUNDALARMENERR:c=errStr.IPCHandleInalid;break;case IPCSMDREGIONEILLEGAL:c=
errStr.regionIllegal;break;case IPCSMDREGIONNUMERR:c=errStr.regionNumErr;break;case IPCARMINGSCHEDULEEOVERFLOW:c=errStr.armingScheduleOverflow;break;case IPCARMINGSCHEDULEMIX:c=errStr.armingScheduleMix;break;case IPCARMINGSCHEDULEILLEGAL:c=errStr.armingScheduleIllegal;break;default:c=errStr.invRequestFail}closeToast();showAlert(c,b);return!1}function da(){clearTimeout(P);P=$.setTimeout(function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display="none"})},
5E3)}function Ka(){e.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(P),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 c=e.getPicFileStoragePath(),b=c.lastIndexOf("\\"),b=c.substr(b+1);popContentCorrect.style.display="inline-block";popContentError.style.display="none";titleText.innerHTML=label.snapPicSuccess;La.innerHTML=b;check.onclick=function(){e.openFileStorageFolder(c)};da()}$("#popNote").animate({bottom:"0px"});id("popNote").style.display="inline-block";log(a);7==parseInt(a)&&da()})}function ea(a){var b=id("videoPluginCon").offsetHeight;void 0==a?e.setSize({height:"396px",
width:"720px"}):e.setSize({height:b+"px",width:b*a+"px"})}function fa(a){if(Q)return!1;var b={};b[d]={};b[d][q]={};b[d][q][ga]=C;b[d][q][ha]=v;D&&(b[d][f]={},w&&(b[d][f][ia]="true"==ja.getAttribute("checked")?g:h),x&&(b[d][f][ka]="true"==la.getAttribute("checked")?g:h),y&&(b[d][f][ma]="true"==E.getAttribute("checked")?g:h),r&&(b[d][f][na]="true"==F.getAttribute("checked")?g:h),z&&(b[d][f][oa]="true"==pa.getAttribute("checked")?g:h),s&&(b[d][f][Ma]="true"==triggerEmail.getAttribute("checked")?g:h),
t&&(b[d][f][qa]="true"==G.getAttribute("checked")?g:h),p&&(b[d][f][R]=A?H:"true"==ra.getAttribute("checked")?g:h));!0==B&&(b[d][u]={},b[d][u][sa]=I,b[d][u][ta]=J);var c=ua&&!S&&"true"==F.getAttribute("checked"),k=va&&!T&&"true"==E.getAttribute("checked"),e=wa&&!U&&"true"==G.getAttribute("checked");c||k||e?((c||k)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,function(d){!0==d?(b[m]={},b[m][uciMsgAlarm.secName.chn1MsgAlarmInfo]={},c&&(b[m][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=
uciMsgAlarm.optValue.enableVal.on),k&&(b[m][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=uciMsgAlarm.optValue.enableVal.on),showToast(),$.modify(b,function(b){!0==n(b[ERR_CODE])&&(c&&(S=1),k&&(T=1),showToast("success"),"function"==typeof a&&void 0!=a&&a())})):(c&&changeCheckInput(F,!1),k&&changeCheckInput(E,!1))}),e&&showConfirmIpc(label.confirmCaptureOnTip,function(c){b[K]={};b[K][uciPicturePlan.secName.eventConfig]={};!0==c?(e&&(b[K][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=
uciPicturePlan.optValue.on),showToast(),$.modify(b,function(b){!0==n(b[ERR_CODE])&&(e&&(U=1),showToast("success"),"function"==typeof a&&void 0!=a&&a())})):e&&changeCheckInput(G,!1)})):(showToast(),$.modify(b,function(b){!0==n(b[ERR_CODE])&&(showToast("success"),"function"==typeof a&&void 0!=a&&a())}))}function Na(){closeNoteAll();!0==checkNum(id("sensitivityDragLineDragLineInput").value)&&!0==checkNumRange(parseInt(id("sensitivityDragLineDragLineInput").value),100,1)?(v=id("sensitivityDragLineDragLineInput").value,
V.setValue(id("sensitivityDragLineDragLineInput").value),Q=!1):(showNote("sensitivityDragLineDragLineInput",errStr.sensitivityErr),Q=!0)}function Oa(a){closeNote("sensitivityDragLineDragLineInput");v=a}function xa(){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 Pa(a){Qa.innerHTML=1==a?btn.enableN:btn.close;C=1==a?g:h;!1==e.checkInstalled()?xa():0==a?(e.setOSDStatus(0),xa()):(e.setOSDStatus(1),document.getElementById("hidebg").style.display="none")}function Ra(a){Sa.innerHTML=1==a?btn.enableN:btn.close;H=1==a?g:h}function ya(a){W?(id("handleArrow").className="arrowDown",id("handleArrow").title=label.slideDown,id("handleArrowText").innerHTML=label.slideDown,za.style.display="none",W=!1):(id("handleArrow").className=
"arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,za.style.display="",W=!0)}function Aa(a){I=a}function Ta(a){J=a}function Ua(a,b){selectInit("soundTypeSelect",a,0,Aa,"18");id("soundTypeSelect").resetSel(b)}function X(){e.playVideo();$("ul.lineConfMenu li.snapPicBtn").show();showDetailCon()}function Va(){var a=uciLinkageCapability.optName.sound_alarm_capability,b=uciLinkageCapability.optName.msg_push_capability,c=uciLinkageCapability.optName.alarm_out_capability,
k=uciLinkageCapability.optName.record_capability,d=uciLinkageCapability.optName.email_capability,e=uciLinkageCapability.optName.ftp_capability,g=uciLinkageCapability.optName.capture_capability,f=function(a){a=$.linkageCapability[a];return 18>a.length?!1:"1"==a[a.length-18]?!0:!1};y=f(uciLinkageCapability.optName.light_alarm_capability);r=f(a);w=f(b);z=f(c);x=f(k);s=f(d);p=f(e);t=f(g);(D=y||r||w||z||x||s||p||t)?(y||$("#triggerLightAlarm").parent().hide(),r||$("#triggerSoundAlarm").parent().hide(),
w||$("#triggerMsgPush").parent().hide(),x||$("#triggerRecord").parent().hide(),z||$("#triggerAlarmOut").parent().hide(),s||$("#triggerEmail").parent().hide(),p||$("#sendToFtp").hide(),t||$("#triggerCapture").parent().hide()):id("handleWayDiv").style.display="none"}function Wa(){r&&$.audioAlarmCapability&&(B=1==parseInt($.audioAlarmCapability[Xa])?!0:!1,L=1==parseInt($.audioAlarmCapability[Ya])?!0:!1,M=parseInt($.audioAlarmCapability[Za]),Y=$.audioAlarmCapability[Z].length);if(!1==B)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[Z].length;c++){var k=parseInt($.audioAlarmCapability[Z][c]);a.push(k);N.push(b[k])}selectInit("soundTimesSelect",[{str:label.once,value:1},{str:label.twice,value:2},{str:label.threetimes,value:3},{str:label.fourtimes,value:4},{str:label.fivetimes,value:5}],1,Ta)}if(!1==
L)id("setSoundAlarm").style.display="none";else{openSoundInfo("setSoundAlarm",Y,M,label.usrdefSound);closeSoundInfo("infoCloseTip",d,N,Ua);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<M;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 d=uciDamageDetection.fileName,q=uciDamageDetection.secName.detection,f=uciDamageDetection.secName.notifyList,u=uciDamageDetection.secName.soundAlarmInfo,ga=uciDamageDetection.optName.enabled,ha=uciDamageDetection.optName.sensitivity,ia=uciDamageDetection.optName.msgPushEnabled,ka=uciDamageDetection.optName.recordEnabled,Ma=uciDamageDetection.optName.emailEnabled,oa=uciDamageDetection.optName.alarmEnabled,R=uciDamageDetection.optName.ftpEnabled,qa=uciDamageDetection.optName.captureEnabled,
na=uciDamageDetection.optName.soundAlarmEnabled,ma=uciDamageDetection.optName.lightAlarmEnabled,g=uciDamageDetection.optValue.enableVal.on,Xa=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,Ya=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,Za=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,Z=uciAlarmAudioTypeCapability.optName.alarmType,h=uciDamageDetection.optValue.enableVal.off,sa=uciDamageDetection.optName.soundAlarmType,ta=uciDamageDetection.optName.soundAlarmTimes,
aa=uciUsrDefAlarm.fileName,Ba=uciUsrDefAlarm.secName.usrDefAudio,$a=uciUsrDefAlarm.optName.id,ba=uciUsrDefAlarm.optName.name,Ca=!0,Da,C,Qa=id("intelligentDetectionSwitchDes"),e,m=uciMsgAlarm.fileName,ua=0,S=0,va=0,T=0,K=uciPicturePlan.fileName,wa=0,U=0,v=50,V;id("sensitivityDragLineDragLineInput");var W=!0;id("configDiv");var za=id("handleWay"),pa=id("triggerAlarmOut"),la=id("triggerRecord"),ja=id("triggerMsgPush"),F=id("triggerSoundAlarm"),E=id("triggerLightAlarm"),ra=id("sendFtp"),H,Sa=id("sendToFtpSwitchDes"),
G=id("triggerCapture"),La=id("name"),P,Q=!1,Ea=1==parseInt($.moduleSpec[uciFunction.optName.corridorMode])?!0:!1,D,y,r,w,z,x,p,s,t,L=!1,B=!1,I,J,M,N=[],Y=0,Fa=$.moduleSpec[uciFunction.optName.new_version_capability_list],Ga=Fa&&0<=$.inArray(uciImage.fileName,Fa),Ha=!1,Ia=!1,Ja=null,A=!1,l=id("ptzToggleCon"),O=$(".ptzBorderConfCon"),ca=!0;(function(){var a={},b=0;Va();Wa();a[d]={};a[d][NAME]=[q];D&&a[d][NAME].push(f);B&&a[d][NAME].push(u);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(a[m]=
{},a[m][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);!0==L&&(a[aa]={},a[aa][KEY_TABLE]=[Ba]);Ea&&(a[uciImage.fileName]={},a[uciImage.fileName][NAME]=uciImage.secName.para_switch);Ga&&(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);var c="vedioActiveX";$.BSHOWPTZCTRL?(new PtzControl("ptzControlCon",1),c="ptzVideoActiveX vedioActiveX",$("ul.lineConfMenu").addClass("havePtz")):($("#ptzToggleCon").hide(),$("#ptzControlCon").hide());e=new Plugin({id:"videoPluginCon",className:c,readyHd:function(a){PLUGIN_STATE_ON==a&&!0==Ca&&(Ca=!1,e.setIntelligentState(1),e.setOSDSpecialStatus(1),e.setOSDStatus(Da.state),
Ia&&setDomSize($(".vedioActiveX")[0],Ja))}});V=new DragLine({id:"sensitivityDragLine",name:label.sensitivity,cb:Oa,lowerBound:1});$("ul.lineConfMenu li.snapPicBtn").hide();$("ul.lineConfMenu li.snapPicBtn").click(function(a){Ka()});id("closeTip").onclick=function(){$("#popNote").animate({bottom:"-150px"},void 0,void 0,function(){id("popNote").style.display="none"})};l.onclick=function(){ca?(O.hide(),ca=!1,$(l).removeClass("ptzToggleShowIcon").addClass("ptzToggleHideIcon"),l.style.left="757px",$("ul.lineConfMenu").css("width",
"702px"),e.setSize({height:"396px",width:"704px"}),e.checkInstalled()||(O.css("width","0px"),e.showInstalledTip())):(O.show(),ca=!0,l.style.left="549px",$(l).removeClass("ptzToggleHideIcon").addClass("ptzToggleShowIcon"),$("ul.lineConfMenu").css("width","494px"),e.setSize({height:"372px",width:"496px"}),e.checkInstalled()||(O.css("width","204px"),e.showInstalledTip()))};$.query(a,function(a){if(!0==n(a[ERR_CODE])){v=a[d][q][ha];V.setValue(v);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&
1==parseInt(a[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&(A=!0);D&&(w&&(b=a[d][f][ia]==g,changeCheckInput(ja,b)),x&&(b=a[d][f][ka]==g,changeCheckInput(la,b)),y&&(b=a[d][f][ma]==g,changeCheckInput(E,b),va=1,T=a[m][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==g?1:0),r&&(b=a[d][f][na]==g,changeCheckInput(F,b),ua=1,S=a[m][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==
g?1:0),z&&(b=a[d][f][oa]==g,changeCheckInput(pa,b)),p&&(A&&t?($("#sendToFtpLine").hide(),H=a[d][f][R],b=H==g?1:0,new Switch("sendToFtpSwitch",b,Ra)):($("#sendToFtpSwitchCon").hide(),$("#sendToFtpLine").show(),$("#goToFtpConf").hide(),b=a[d][f][R]==g,changeCheckInput(ra,b))),t&&(b=a[d][f][qa]==g,A&&p&&(b?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(G,b),$.moduleSpec[uciFunction.optName.captureEnable]&&(wa=1,U=a[K][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==
g?1:0)));C=a[d][q][ga];b=C==g?1:0;Da=new Switch("intelligentDetectionSwitch",b,Pa);if(!0==B){if(!0==L){var c={},c=a[aa][Ba],c=formatTableData(c),h;for(h in c){var l=c[h];l[ba]||(l[ba]=label.usrdefSound);N.push({str:l[ba],value:l[$a]})}uploadSoundFile("fileName",e,Y,M)}selectInit("soundTypeSelect",N,0,Aa,"18");I=a[d][u][sa];J=a[d][u][ta];soundTypeSelect.changeSel(I);soundTimesSelect.changeSel(J)}if(Ea){var s=a[uciImage.fileName][uciImage.secName.para_switch][uciImage.optName.rotate_type];h={};h[uciVideo.fileName]=
{};h[uciVideo.fileName][NAME]=uciVideo.secName.main;$.query(h,function(a){!0==n(a[ERR_CODE])&&(a=a[uciVideo.fileName][uciVideo.secName.main],a=a.resolution.split("*")[1]/a.resolution.split("*")[0],s==uciImage.optValue.rotOff?ea():ea(a),$("object.vedioActiveX").addClass("vedioActiveX_corridor"),id("videoPluginCon").style.background="black")})}$("ul.lineConfMenu li.snapPicBtn").show();Ga?1==parseInt(a[uciImageCapability.fileName][uciImageCapability.secType.capability][uciImageCapability.optName.stitch])?
(Ha=!0,a={},a[uciImageCapability.fileName]={},a[uciImageCapability.fileName][NAME]=[],a[uciImageCapability.fileName][NAME].push(uciImageCapability.optName.stitch),$.query(a,function(a){!0==n(a[ERR_CODE])&&Ha&&(Ia=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==n(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");Ja={height:b,paddingTop:a,paddingBottom:a};X()}}))})):X():X()}});id("save").onclick=fa;id("handleArrow").onclick=ya;id("handleArrowText").onclick=ya;id("sensitivityDragLineDragLineInput").onblur=Na;id("goToFtpConf").onclick=function(){showConfirmC(label.cue,label.saveTips,function(a){!0==a?fa(function(){gFtpSwitchPageSign=
1;unloadLogin()}):(gFtpSwitchPageSign=1,unloadLogin())},btn.unsave,btn.save,!1)}})();initCheckInput("showInfo",function(a,b){a||0!=b||showAlert(label.confirmRecordOff)});initCheckInput("capture",function(a){A&&p&&(a?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide())})}init();
</script><style type="text/css">div.ptzToggle{height:64px;width:12px;position:absolute;cursor:pointer;top:268px;left:549px;z-index:1}div.peCol span.select{font-size:0!important}span.peSelect{width:124px!important;_width:116px!important;font-size:14px!important}#orgDC{width:662px}.displayNone{display:none!important}#regionSetting{margin-top:20px}i.peTypeRd{width:25px!important;height:25px!important}i.timeSeled{background:url(../web-static/images/timeSeled.png) center no-repeat!important}i.timeUnSeled{background:url(../web-static/images/timeUnSeled.png) center no-repeat!important}i.mdtUnSeled{background:url(../web-static/images/mdtUnSeled.png) center no-repeat!important}i.mdtSeled{background:url(../web-static/images/mdtSeled.png) center no-repeat!important}#timingLabel{margin-right:35px;display:inline-block;*display:inline;*zoom:1}#mdtLabel{margin-right:347px;*margin-right:340px;display:inline-block;*display:inline;*zoom:1}label.typeSeled{color:#fff!important}div.handleWay ul.Line label.des{display:inline;vertical-align:middle;margin-left:8px}div.handleWay ul.Line label.sendFtpDes{display:inline-block;margin-left:4px;margin-right:4px;width:140px}ul.Line label.desM{font-size:12px;color:#666;line-height:12px}input.goToFtpConf{margin-left:24px;padding:0 12px}div.peCon{left:136px;top:560px;_left:-30px;_top:-10px}div.peCon div.peConDetail div.peCol4{display:none}ul.line li.lineR{display:inline-block;*display:inline;*zoom:1;height:100%;font-size:0;vertical-align:middle;float:right}ul.line li.lineE1{width:100%;padding-top:5px}ul.line li.lineE2{width:100%;margin-bottom:24px}ul.line label.des{display:inline;vertical-align:middle}ul.line label.desA{color:#333;margin-right:16px}li.Line i.checkDisabled{background:url(../../web-static/images/check_disable.png) center no-repeat}li.Line i.checkedDisabled{background:url(../../web-static/images/checked_disable.png) center no-repeat}div.fileDiv{height:30px;overflow:hidden;position:relative;vertical-align:middle}div.fileDiv input.file{font-size:16px;top:0;right:0;opacity:0;filter:alpha(opacity:0);cursor:pointer;position:absolute;vertical-align:top;z-index:1}div.tableEditLyCon{height:0;z-index:300;width:770px}div.tableEditConT{width:640px;height:640px}div.tableSoundInfo{width:616px;height:505px}ul.line li.lineTypeSel{padding:5px 0;_height:32px;width:100%;margin-left:24px}ul.line li.lineSoundInfoHead{width:100%;margin-bottom:16px;height:30px}ul.line li.lineSoundInfoSubHead{border:1px solid #e1e3e6;width:592px;height:40px}ul.line li.lineSoundInfoSub{border:1px solid #e1e3e6;border-top:0;width:592px;height:40px}ul.line label.desTypeSel{font-size:12px;color:#7a8999;width:53px;margin-left:4px;margin-right:17px;letter-spacing:1.1px;line-height:16px}ul.line label.desSoundName{font-size:13px;color:#333;line-height:40px;width:300px;margin-left:16px;text-align:left}ul.line label.desList{margin-right:352px}input.btnConfSet{border-radius:2px;font-size:13px;width:82px;height:30px;margin-left:16px}input.textSoundName{width:238px;margin-left:16px;margin-top:5px}input.btnUpload{border-radius:2px;font-size:13px;width:120px;height:30px;margin-right:24px}input.btnDevSoundTest{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:190px;margin-right:16px}input.btnRename{border-radius:2px;font-size:13px;width:83px;height:26px;margin-top:7px;margin-left:81px;margin-right:4px}input.btnDel{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:4px;margin-right:4px}input.btnUsrdefSoundTest{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:4px;margin-right:16px}input.btnCancel{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:172px;margin-right:4px}input.btnSave{border-radius:2px;font-size:13px;width:70px;height:26px;margin-top:7px;margin-left:4px;margin-right:16px}input.testIcon{background-image:url(../../web-static/images/play_normal.png);background-repeat:no-repeat;background-position:8px 4px;*background-position:4px 2px;padding:0 16px 0 28px;*padding:2px 2px 0 18px;height:26px}input.testIcon:hover{background-image:url(../../web-static/images/play_pressed.png)}input.renameIcon{background-image:url(../../web-static/images/edit_normal.png);background-repeat:no-repeat;background-position:8px 4px;*background-position:4px 2px;padding:0 16px 0 28px;*padding:2px 2px 0 18px;height:26px}input.renameIcon:hover{background-image:url(../../web-static/images/edit_pressed.png)}iframe.innerIframe{border:0;height:640px;width:640px;position:absolute;opacity:0;filter:alpha(opacity=0);top:0;left:0;z-index:-1}#infoCloseTip{background:transparent url("../../web-static/images/closeTip.png") no-repeat scroll 0 12px;width:24px;height:26px;display:inline-block;cursor:pointer}ul.line label.disable{color:#999}ul.line li.linesup{height:30px;line-height:30px;vertical-align:middle;margin-top:6px;font-size:12px;color:#7a8999;padding-bottom:13px}ul.line li.linesub{height:30px;line-height:30px;margin-top:8px;vertical-align:middle;font-size:12px;color:#7a8999}</style>