

<div class="detailCon">
	<div style="position:relative;*z-index:1;">
		<div id="hidebg"></div>
	</div>
	<div class="actionBarDiv">
		<div class="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.sceneChangeTips%}</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 u(a,b){var c="";switch(parseInt(a)){case ENONE:return!0;case IPCSMDENABLEERR:c=errStr.IPCParamInvalid;break;case EINVARG:c=errStr.IPCParamInvalid;break;case IPCUMGUESTNAUTH:c=errStr.invPermissionDenied;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFYRECORDENERR:case IPCNOTIFYFTPENERR:c=errStr.IPCHandleInalid;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 Fa(a){var b,c=[];if(void 0==a)return c.push('"0000-0000:0"'),c;a instanceof Array||(a=a.match(/\d{4}-\d{4}/g));for(var d=0;d<a.length;d++){b=a[d];var e=b.split(/[-]/,2);b=parseInt(e[0],10);e=parseInt(e[1],10);0==b&&0==e?c.push(k._getString(b,e,0)):c.push(k._getString(b,e,1))}return c}function Ga(){var a,b=k.getTimeVal(),c={};for(a=0;a<D.length;a++){var d=c,e=ea[a],g;g=b[D[a]];var h=void 0,
m=void 0,p=void 0,f=void 0,l=void 0,l=f=void 0;if(void 0==g)g="";else{void 0==h&&(h=6);m="[";if(1>g.length)m+='"0000-0000"';else for(p=0;p<g.length&&p<h;p++)f=g[p].toString(),l=f.split(/[-,:]/,3),f=parseInt(l[0],10),l=parseInt(l[1],10),f=k._getStringWithoutType(f,l),0<p&&(m+=","),m+='"'+f+'"';g=m+="]"}d[e]=g}return c}function fa(a){if(!R){var b={};b[d]={};b[d][q]={};b[d][h]={};b[d][E]={};b[d][q][ga]=F;b[d][q][ha]=G;if(H){b[d][h]={};w&&(b[d][h][ia]="true"==ja.getAttribute("checked")?g:f);x&&(b[d][h][ka]=
"true"==la.getAttribute("checked")?g:f);y&&(b[d][h][ma]="true"==I.getAttribute("checked")?g:f);r&&(b[d][h][na]="true"==J.getAttribute("checked")?g:f);if(z){b[d][h][oa]="true"==pa.getAttribute("checked")?g:f;for(var c=2;c<=S;c++)b[d][h]["AO"+c.toString()+"_enabled"]="true"==id("triggerAlarmOut"+c.toString()).getAttribute("checked")?g:f}A&&(b[d][h][qa]="true"==ra.getAttribute("checked")?g:f);s&&(b[d][h][sa]="true"==K.getAttribute("checked")?g:f);n&&(b[d][h][T]=B?L:"true"==ta.getAttribute("checked")?
g:f)}b[d][E]=Ga();!0==C&&(b[d][t]={},b[d][t][ua]=M,b[d][t][va]=N);var e=wa&&!U&&"true"==J.getAttribute("checked"),v=xa&&!V&&"true"==I.getAttribute("checked"),k=ya&&!W&&"true"==K.getAttribute("checked");e||v||k?((e||v)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,function(c){!0==c?(b[l]={},b[l][uciMsgAlarm.secName.chn1MsgAlarmInfo]={},e&&(b[l][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=uciMsgAlarm.optValue.enableVal.on),v&&(b[l][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=
uciMsgAlarm.optValue.enableVal.on),showToast(),$.modify(b,function(b){!0==u(b[ERR_CODE])&&(e&&(U=1),v&&(V=1),showToast("success"),"function"==typeof a&&void 0!=a&&a())})):(e&&changeCheckInput(J,!1),v&&changeCheckInput(I,!1))}),k&&showConfirmIpc(label.confirmCaptureOnTip,function(c){!0==c?(b[O]={},b[O][uciPicturePlan.secName.eventConfig]={},k&&(b[O][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=uciPicturePlan.optValue.on),showToast(),$.modify(b,function(b){!0==u(b[ERR_CODE])&&
(k&&(W=1),showToast("success"),"function"==typeof a&&void 0!=a&&a())})):k&&changeCheckInput(K,!1)})):(showToast(),$.modify(b,function(b){!0==u(b[ERR_CODE])&&(showToast("success"),"function"==typeof a&&void 0!=a&&a())}))}}function Ha(a){Ia.innerHTML=1==a?btn.enableN:btn.close;G=1==a?g:f;if(0==a){a=document.getElementById("hidebg");a.style.display="block";var b=getoffset(id("save")).top-getoffset($("div.actionBarDiv")[0]).top;if(0==$("#peCon").length||"none"==$("#peCon").css("display"))a.style.height=
b+"px";else{var c=getoffset(id("peCon")).top-getoffset($("div.actionBarDiv")[0]).top+id("peCon").offsetHeight;a.style.height=(b>c?b:c)+"px"}}else document.getElementById("hidebg").style.display="none"}function Ja(a){Ka.innerHTML=1==a?btn.enableN:btn.close;L=1==a?g:f}function La(a){F=a;X.setValue(a);!0==checkNum(a)&&!0==checkNumRange(parseInt(a),100,1)?R=!1:(showNote("sensitivityDragLineDragLineInput",errStr.sensitivityErr),R=!0)}function Ma(){var a,b={};b[d]={};b[d][NAME]=E;$.query(b,function(b){if(!0==
u(b[ERR_CODE]))for(k.reset(),a=0;a<D.length;a++)k.setTimeVal(D[a],Fa(b[d][E][ea[a]]))})}function za(a){Y?(id("armingScheduleArrow").className="arrowDown",id("armingScheduleArrow").title=label.slideDown,id("armingScheduleArrowText").innerHTML=label.slideDown,timeSchedule.style.display="none",Y=!1):(id("armingScheduleArrow").className="arrowUp",id("armingScheduleArrow").title=label.slideUp,id("armingScheduleArrowText").innerHTML=label.slideUp,timeSchedule.style.display="",Y=!0)}function Aa(a){Z?(id("handleArrow").className=
"arrowDown",id("handleArrow").title=label.slideDown,id("handleArrowText").innerHTML=label.slideDown,handleWay.style.display="none",Z=!1):(id("handleArrow").className="arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,handleWay.style.display="",Z=!0)}function Ba(a){M=a}function Na(a){N=a}function Oa(a,b){selectInit("soundTypeSelect",a,0,Ba,"18");id("soundTypeSelect").resetSel(b)}function Pa(){var a=uciLinkageCapability.optName.sound_alarm_capability,b=uciLinkageCapability.optName.msg_push_capability,
c=uciLinkageCapability.optName.alarm_out_capability,d=uciLinkageCapability.optName.record_capability,e=uciLinkageCapability.optName.email_capability,g=uciLinkageCapability.optName.ftp_capability,h=uciLinkageCapability.optName.capture_capability,f=function(a){a=$.linkageCapability[a];return 15>a.length?!1:"1"==a[a.length-15]?!0:!1};y=f(uciLinkageCapability.optName.light_alarm_capability);r=f(a);w=f(b);z=f(c);x=f(d);A=f(e);n=f(g);s=f(h);(H=y||r||w||z||x||A||n||s)?(y||$("#triggerLightAlarm").parent().hide(),
r||$("#triggerSoundAlarm").parent().hide(),w||$("#triggerMsgPush").parent().hide(),x||$("#triggerRecord").parent().hide(),z?InsertTriggerAlarmOut("triggerAlarmOut"):$("#triggerAlarmOut").parent().hide(),A||$("#triggerEmail").parent().hide(),n||$("#sendToFtp").hide(),s||$("#triggerCapture").parent().hide()):id("handleWayDiv").style.display="none"}function Qa(){r&&$.audioAlarmCapability&&(C=1==parseInt($.audioAlarmCapability[Ra])?!0:!1,P=1==parseInt($.audioAlarmCapability[Sa])?!0:!1,aa=parseInt($.audioAlarmCapability[Ta]),
Ca=$.audioAlarmCapability[ba].length);if(!1==C)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[ba].length;c++){var e=parseInt($.audioAlarmCapability[ba][c]);a.push(e);Q.push(b[e])}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,Na)}if(!1==P)id("setSoundAlarm").style.display="none";else{openSoundInfo("setSoundAlarm",Ca,aa,label.usrdefSound);closeSoundInfo("infoCloseTip",d,Q,Oa);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<aa;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=uciSceneDetection.fileName,q=uciSceneDetection.secName.detection,E=uciSceneDetection.secName.armingSchedule,h=uciSceneDetection.secName.notifyList,ha=uciSceneDetection.optName.enabled,ga=uciSceneDetection.optName.sensitivity,qa=uciSceneDetection.optName.emailEnabled,T=uciSceneDetection.optName.ftpEnabled,oa=uciSceneDetection.optName.alarmEnabled,ia=uciSceneDetection.optName.msgPushEnabled,
na=uciSceneDetection.optName.soundAlarmEnabled,ma=uciSceneDetection.optName.lightAlarmEnabled,ka=uciSceneDetection.optName.recordEnabled,sa=uciSceneDetection.optName.captureEnabled,g=uciSceneDetection.optValue.enableVal.on,f=uciSceneDetection.optValue.enableVal.off,t=uciSceneDetection.secName.soundAlarmInfo,ua=uciSceneDetection.optName.soundAlarmType,va=uciSceneDetection.optName.soundAlarmTimes,Ra=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,Sa=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,
Ta=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,ba=uciAlarmAudioTypeCapability.optName.alarmType,ca=uciUsrDefAlarm.fileName,Da=uciUsrDefAlarm.secName.usrDefAudio,Ua=uciUsrDefAlarm.optName.id,da=uciUsrDefAlarm.optName.name,e,G,Ia=id("intelligentDetectionSwitchDes"),X,F,ra=id("triggerEmail"),ja=id("triggerMsgPush"),J=id("triggerSoundAlarm"),pa=id("triggerAlarmOut"),I=id("triggerLightAlarm"),ta=id("sendFtp"),L,Ka=id("sendToFtpSwitchDes"),K=id("triggerCapture"),la=id("triggerRecord"),D=
[label.Mon,label.Tue,label.Wen,label.Thu,label.Fri,label.Sta,label.Sun],ea=[uciSceneDetection.optName.mon,uciSceneDetection.optName.tue,uciSceneDetection.optName.wed,uciSceneDetection.optName.thu,uciSceneDetection.optName.fri,uciSceneDetection.optName.sat,uciSceneDetection.optName.sun],Y=!0,Z=!0,R=!1,H,y,r,w,z,x,n,A,s,S=isNaN(parseInt($.moduleSpec.alarm_out_num))?1:parseInt($.moduleSpec.alarm_out_num),P=!1,C=!1,M,N,aa,Q=[],Ca=0,l=uciMsgAlarm.fileName,wa=0,U=0,xa=0,V=0,O=uciPicturePlan.fileName,ya=
0,W=0,k,Ea=0,Ea=0,B=!1;(function(){var a={};e=0;Pa();Qa();a[d]={};a[d][NAME]=[q,h];H&&a[d][NAME].push(h);C&&a[d][NAME].push(t);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(a[l]={},a[l][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);!0==P&&(a[ca]={},a[ca][KEY_TABLE]=[Da]);$.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);X=new DragLine({id:"sensitivityDragLine",name:label.sensitivity,cb:La,lowerBound:1});k=new PlanSet("recPlanGrid",{curType:1});Ma();$.query(a,function(a){if(!0==u(a[ERR_CODE])){G=a[d][q][ha];e=G==g?1:0;new Switch("intelligentDetectionSwitch",e,Ha);F=a[d][q][ga];X.setValue(F);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&1==parseInt(a[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&
(B=!0);if(H){w&&(e=a[d][h][ia]==g,changeCheckInput(ja,e));x&&(e=a[d][h][ka]==g,changeCheckInput(la,e));y&&(e=a[d][h][ma]==g,changeCheckInput(I,e),xa=1,V=a[l][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==g?1:0);r&&(e=a[d][h][na]==g,changeCheckInput(J,e),wa=1,U=a[l][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==g?1:0);if(z&&(e=a[d][h][oa]==g,changeCheckInput(pa,e),1<S)){for(var c=e,f=2;f<=S;f++)aoEnableOpt="AO"+f.toString()+"_enabled",e=a[d][h][aoEnableOpt]==
g,changeCheckInput(id("triggerAlarmOut"+f.toString()),e),c=c&&e;c&&changeCheckInput("triggerAOAll",!0)}A&&(e=a[d][h][qa]==g,changeCheckInput(ra,e));n&&(B&&s?($("#sendToFtpLine").hide(),L=a[d][h][T],e=L==g?1:0,new Switch("sendToFtpSwitch",e,Ja)):($("#sendToFtpSwitchCon").hide(),$("#sendToFtpLine").show(),$("#goToFtpConf").hide(),e=a[d][h][T]==g,changeCheckInput(ta,e)));s&&(e=a[d][h][sa]==g,B&&n&&(e?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(K,e),$.moduleSpec[uciFunction.optName.captureEnable]&&
(ya=1,W=a[O][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==g?1:0))}if(!0==C){if(!0==P){var c={},c=a[ca][Da],c=formatTableData(c),k;for(k in c)f=c[k],f[da]||(f[da]=label.usrdefSound),Q.push({str:f[da],value:f[Ua]})}selectInit("soundTypeSelect",Q,0,Ba,"18");M=a[d][t][ua];N=a[d][t][va];soundTypeSelect.changeSel(M);soundTimesSelect.changeSel(N)}showDetailCon()}});id("save").onclick=fa;id("clearAll").onclick=function(a){k.reset()};id("armingScheduleArrow").onclick=za;id("armingScheduleArrowText").onclick=
za;id("handleArrow").onclick=Aa;id("handleArrowText").onclick=Aa;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||Ea!=b||showAlert(label.confirmRecordOff)});initCheckInput("capture",function(a){B&&n&&(a?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide())})}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:190px;_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>