

<div class="detailCon">
	<ul class="line">
		<li class="line lineA">
			<label class="des desA">{%menuStr.tamperDetection%}</label>
			<div id="tamperSwitch" class="switchCon">
				<i class="switchBg"></i>
				<i class="switchBall"></i>
			</div>
			<label id="tamperSwitchDes" class="des desH">{%btn.close%}</label>
		</li>
	</ul>
	<div style="position:relative;*z-index:1;">
		<div id="hidebg"></div>
	</div>
	<div class="actionBarDiv armingScheduleID" id="armingScheduleDiv">
		<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.tamperDetTips%}</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="top">
		<div class="actionTitleDiv"></div>
		<div class="configDiv">
			<ul class="line lineL1">
				<li class="dragLine">
					<div id="sensitivityDragLine" class="ipcDragLineDiv"></div>
					<label class="des desH"></label>
				</li>
			</ul>
			<ul class="line lineR">
				<li id="constantAlarmSwitch" class="dragLine">
					<label class="des desA">{%label.constantAlarm%}</label>
					<div id="constantAlarm" class="switchCon">
						<i class="switchBg"></i>
						<i class="switchBall"></i>
					</div>
					<label class="des desH"></label>
				</li>
			</ul>
			<div class="height"></div>
		</div>
	</div>
	<div class="actionBarDiv actionDiv" id="handleWayDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.handleWay%}</label>
			<div class="actionTitleArrowDiv">
				<label class="actionArrowTitle" id="handleArrowText">{%label.slideDown%}</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="captureLine">
					<i name="capture" id="triggerCapture" class="chObj" value="0"></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="1"></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="msgPush" class="chObj" value="2"></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="triggerAlarmDevice" class="chObj" value="3"></i>
					<label class="des desA">{%label.triggerAlarmDevice%}</label>
					<label class="des desM">{%label.triggerAlarmDeviceTips%}</label>
				</li>
				<li class="Line lineE">
					<i name="showInfo" id="triggerLight" class="chObj" value="4"></i>
					<label class="des desA">{%label.lightAlarm%}</label>
					<label class="des desM">{%label.lightAlarmTips%}</label>
				</li>
				<li class="Line lineLast">
					<i name="showInfo" id="triggerSound" class="chObj" value="5"></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" class="subBtn btnA" value="{%btn.save%}" />
	</div>
</div>
<div id="soundInfoEditCon" class="tableEditLyCon">
	<div class="tableEditCon tableEditConT">
		<div class="innerCon">
			<h4 class="title" style="width:592px">{%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 w(a,b){var e="";switch(parseInt(a)){case ENONE:return!0;case IPCTDNUMERR:e=errStr.IPCRangeOver;break;case IPCTDENERR:e=errStr.IPCParamInvalid;break;case IPCUMGUESTNAUTH:e=errStr.invPermissionDenied;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFMSGPUSHENERR:e=errStr.IPCHandleInalid;break;default:e=errStr.invRequestFail}closeToast();showAlert(e,b);return!1}function ia(a){if(!Q){var b={};b[c]={};b[c][k]={};b[c][k][ja]=D;b[c][k][ka]=E;1==R&&(b[c][k][la]=
F);if(S){b[c][h]={};x&&(b[c][h][ma]="true"==na.getAttribute("checked")?g:f);y&&(b[c][h][oa]="true"==G.getAttribute("checked")?g:f);r&&(b[c][h][pa]="true"==H.getAttribute("checked")?g:f);if(z){b[c][h][qa]="true"==ra.getAttribute("checked")?g:f;for(var e=2;e<=T;e++)b[c][h]["AO"+e.toString()+"_enabled"]="true"==id("triggerAlarmDevice"+e.toString()).getAttribute("checked")?g:f}p&&(b[c][h][U]=A?I:"true"==sa.getAttribute("checked")?g:f);s&&(b[c][h][ta]="true"==J.getAttribute("checked")?g:f)}!0==q&&(b[c][t]=
{},b[c][t][ua]=K,b[c][t][va]=L);!0==M&&(b[c][V]=Ga());var B=wa&&!W&&"true"==H.getAttribute("checked"),d=xa&&!X&&"true"==G.getAttribute("checked"),C=ya&&!Y&&"true"==J.getAttribute("checked");B||d||C?((B||d)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,function(e){!0==e?(b[n]={},b[n][uciMsgAlarm.secName.chn1MsgAlarmInfo]={},B&&(b[n][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=uciMsgAlarm.optValue.enableVal.on),d&&(b[n][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=
uciMsgAlarm.optValue.enableVal.on),showToast(),$.modify(b,function(b){!0==w(b[ERR_CODE])&&(showToast("success"),B&&(W=1),d&&(X=1),"function"==typeof a&&void 0!=a&&a())})):(B&&changeCheckInput(H,!1),d&&changeCheckInput(G,!1))}),C&&showConfirmIpc(label.confirmCaptureOnTip,function(e){b[N]={};b[N][uciPicturePlan.secName.eventConfig]={};!0==e?(C&&(b[N][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=uciPicturePlan.optValue.on),showToast(),$.modify(b,function(b){!0==w(b[ERR_CODE])&&
(showToast("success"),C&&(Y=1),"function"==typeof a&&void 0!=a&&a())})):C&&changeCheckInput(J,!1)})):(showToast(),$.modify(b,function(b){!0==w(b[ERR_CODE])&&showToast("success");"function"==typeof a&&void 0!=a&&a()}))}}function za(a){Ha.innerHTML=1==a?btn.enableN:btn.close;E=1==a?g:f;var b=document.getElementById("hidebg");0==a?(b.style.display="block",b.style.height=getoffset(id("save")).top-getoffset(id("top")).top+"px",$("#sensitivityDragLineDragLineStrip").css({"*z-index":"-1"})):(b.style.display=
"none",$("#sensitivityDragLineDragLineStrip").css({"*z-index":"0"}))}function Ia(a){Ja.innerHTML=1==a?btn.enableN:btn.close;I=1==a?g:f}function Ka(a){D=a;Z.setValue(a);!0==checkNum(a)&&!0==checkNumRange(parseInt(a),100,1)?Q=!1:(showNote("sensitivityDragLineDragLineInput",errStr.sensitivityErr),Q=!0)}function Aa(a){aa?(id("handleArrow").className="arrowDown",id("handleArrow").title=label.slideDown,id("handleArrowText").innerHTML=label.slideDown,handleWay.style.display="none",aa=!1):(id("handleArrow").className=
"arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,handleWay.style.display="",aa=!0)}function Ba(a){K=a}function La(a){L=a}function Ma(a,b){selectInit("soundTypeSelect",a,0,Ba,"18");id("soundTypeSelect").resetSel(b)}function Na(a){F=0==a?f:g}function Oa(a){var b,e=[];if(void 0==a)return e.push('"0000-0000:0"'),e;a instanceof Array||(a=a.match(/\d{4}-\d{4}/g));for(var c=0;c<a.length;c++){b=a[c];var d=b.split(/[-]/,2);b=parseInt(d[0],10);d=parseInt(d[1],10);
0==b&&0==d?e.push(l._getString(b,d,0)):e.push(l._getString(b,d,1))}return e}function Ga(){var a,b=l.getTimeVal(),e={};for(a=0;a<O.length;a++){var c=e,d=Ca[a],g;g=b[O[a]];var h=void 0,m=void 0,u=void 0,f=void 0,k=void 0,k=f=void 0;if(void 0==g)g="";else{void 0==h&&(h=6);m="[";if(1>g.length)m+='"0000-0000"';else for(u=0;u<g.length&&u<h;u++)f=g[u].toString(),k=f.split(/[-,:]/,3),f=parseInt(k[0],10),k=parseInt(k[1],10),f=l._getStringWithoutType(f,k),0<u&&(m+=","),m+='"'+f+'"';g=m+="]"}c[d]=g}return e}
function Pa(){var a,b={};b[c]={};b[c][NAME]=V;$.query(b,function(b){if(!0==w(b[ERR_CODE]))for(l.reset(),a=0;a<O.length;a++)l.setTimeVal(O[a],Oa(b[c][V][Ca[a]]))})}function Da(a){ba?(id("armingScheduleArrow").className="arrowDown",id("armingScheduleArrow").title=label.slideDown,id("armingScheduleArrowText").innerHTML=label.slideDown,Ea.style.display="none",ba=!1):(id("armingScheduleArrow").className="arrowUp",id("armingScheduleArrow").title=label.slideUp,id("armingScheduleArrowText").innerHTML=label.slideUp,
Ea.style.display="block",ba=!0)}function Qa(){var a=parseInt($.detectionCapability[uciDetectionCapability.optName.tamperDetectionCapability]),b=parseInt($.tamperDetectionCapability[uciDetectionCapability.optName.armingScheduleSupport]);a&&b&&(M=!0)}function Ra(){var a=uciLinkageCapability.optName.sound_alarm_capability,b=uciLinkageCapability.optName.msg_push_capability,e=uciLinkageCapability.optName.alarm_out_capability,c=uciLinkageCapability.optName.record_capability,d=uciLinkageCapability.optName.email_capability,
g=uciLinkageCapability.optName.ftp_capability,h=uciLinkageCapability.optName.capture_capability,f=function(b){b=$.linkageCapability[b];return 2>b.length?!1:"1"==b[b.length-2]?!0:!1};y=f(uciLinkageCapability.optName.light_alarm_capability);r=f(a);x=f(b);z=f(e);ca=f(c);p=f(g);da=f(d);s=f(h);(S=y||r||x||z||ca||p||da||s)?(y||$("#triggerLight").parent().hide(),r||$("#triggerSound").parent().hide(),x||$("#msgPush").parent().hide(),ca||$("#triggerRecord").parent().hide(),z?InsertTriggerAlarmOut("triggerAlarmDevice"):
$("#triggerAlarmDevice").parent().hide(),p||$("#sendToFtp").hide(),da||$("#sendEmail").parent().hide(),s||$("#triggerCapture").parent().hide()):id("handleWayDiv").style.display="none"}function Sa(){r&&$.audioAlarmCapability&&(q=1==parseInt($.audioAlarmCapability[Ta])?!0:!1,v=1==parseInt($.audioAlarmCapability[Ua])?!0:!1,P=parseInt($.audioAlarmCapability[Va]),soundTypeNum=$.audioAlarmCapability[ea].length);if(!1==q)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}],e=0;e<$.audioAlarmCapability[ea].length;e++){var d=parseInt($.audioAlarmCapability[ea][e]);a.push(d);fa.push(b[d])}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,La)}if(!1==v)id("setSoundAlarm").style.display=
"none";else{openSoundInfo("setSoundAlarm",soundTypeNum,P,label.usrdefSound);closeSoundInfo("infoCloseTip",c,b,Ma);for(e=0;e<b.length;e++)0<=$.inArray(e,a)?(devSoundListen("testListen_"+e,e),devSoundFocus("devsound_"+e,e)):id("devsound_"+e).style.display="none";for(a=0;a<P;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=uciTamperDetection.fileName,k=uciTamperDetection.secName.tamperDet,h=uciTamperDetection.secName.tamperNotifList,ka=uciTamperDetection.optName.enabled,ja=uciTamperDetection.optName.digital_sensitivity,la=uciTamperDetection.optName.constantAlarmEnabled,qa=uciTamperDetection.optName.AO1Enabled,oa=uciTamperDetection.optName.light_alarm_enabled,pa=uciTamperDetection.optName.sound_alarm_enabled,ma=uciTamperDetection.optName.msgPushEnabled,ta=uciTamperDetection.optName.captureEnabled,
U=uciMotionDetection.optName.ftpEnabled,g=uciTamperDetection.optValue.enableVal.on,f=uciTamperDetection.optValue.enableVal.off,t=uciTamperDetection.secName.soundAlarmInfo,ua=uciTamperDetection.optName.soundAlarmType,va=uciTamperDetection.optName.soundAlarmTimes,Ta=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,Ua=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,Va=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,ea=uciAlarmAudioTypeCapability.optName.alarmType,
ga=uciUsrDefAlarm.fileName,Fa=uciUsrDefAlarm.secName.usrDefAudio,Wa=uciUsrDefAlarm.optName.id,ha=uciUsrDefAlarm.optName.name,n=uciMsgAlarm.fileName,wa=0,W=0,xa=0,X=0,N=uciPicturePlan.fileName,ya=0,Y=0,S,y,r,x,z,ca,p,da,s,T=isNaN(parseInt($.moduleSpec.alarm_out_num))?1:parseInt($.moduleSpec.alarm_out_num),v=!1,q=!1,K,L,P,fa=[],d,E,Ha=id("tamperSwitchDes"),Z,D,Q=!1,aa=!0;id("sendEmail");var ra=id("triggerAlarmDevice"),na=id("msgPush"),H=id("triggerSound"),G=id("triggerLight"),F,sa=id("sendFtp"),I,Ja=
id("sendToFtpSwitchDes"),J=id("triggerCapture"),q=v=!1;parseInt($.moduleSpec.personalized_audio_alarm);var R=$.detectionCapability&&(parseInt($.detectionCapability[uciDetectionCapability.optName.constantAlarmCapability],2)>>0)%2,A=!1,V=uciTamperDetection.secName.armingSchedule,O=[label.Mon,label.Tue,label.Wen,label.Thu,label.Fri,label.Sta,label.Sun],Ca=[uciTamperDetection.optName.mon,uciTamperDetection.optName.tue,uciTamperDetection.optName.wed,uciTamperDetection.optName.thu,uciTamperDetection.optName.fri,
uciTamperDetection.optName.sat,uciTamperDetection.optName.sun],l,ba=!0,Ea=id("timeSchedule"),M=!1;(function(){var a={};d=0;Ra();Sa();1==parseInt($.detectionCapability[uciDetectionCapability.secName.tamperDetectionCapability])&&Qa();a[c]={};a[c][NAME]=[k,h];!0==q&&(a[c][NAME]=[k,h,t]);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(a[n]={},a[n][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);$.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);Z=new DragLine({id:"sensitivityDragLine",name:label.sensitivity,cb:Ka,lowerBound:1});!0==M?(l=new PlanSet("recPlanGrid",{curType:1}),Pa(),$("#top").remove("id"),$("#armingScheduleDiv").remove("id"),$(".armingScheduleID").attr("id","top")):$("#armingScheduleDiv").addClass("hideShowCon");
!0==v&&(a[ga]={},a[ga][KEY_TABLE]=[Fa],plugin=new Plugin({id:"downloadPluginCon",className:"downloadActiveX",downloadReadyHd:function(b){$.find("object.downloadActiveX")[0].style.visibility="hidden"}}));$.query(a,function(b){if(!0==w(b[ERR_CODE]))if(!0==$.local)new Switch("tamperSwitch",0,za);else{E=b[c][k][ka];d=E==g?1:0;new Switch("tamperSwitch",d,za);D=b[c][k][ja];Z.setValue(D);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&1==parseInt(b[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&
(A=!0);1==R&&(F=b[c][k][la],d=F==g?1:0,constantAlarm=new Switch("constantAlarm",d,Na));if(S&&(p&&(A&&s?($("#sendToFtpLine").hide(),I=b[c][h][U],d=I==g?1:0,new Switch("sendToFtpSwitch",d,Ia)):($("#sendToFtpSwitchCon").hide(),$("#sendToFtpLine").show(),$("#goToFtpConf").hide(),d=b[c][h][U]==g,changeCheckInput(sa,d))),s&&(d=b[c][h][ta]==g,A&&p&&(d?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(J,d),$.moduleSpec[uciFunction.optName.captureEnable]&&(ya=1,Y=b[N][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==
g?1:0)),x&&(d=b[c][h][ma]==g,changeCheckInput(na,d)),y&&(d=b[c][h][oa]==g,changeCheckInput(G,d),xa=1,X=b[n][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==g?1:0),r&&(d=b[c][h][pa]==g,changeCheckInput(H,d),wa=1,W=b[n][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==g?1:0),z&&(d=b[c][h][qa]==g,changeCheckInput(ra,d),1<T))){for(var a=d,f=2;f<=T;f++)aoEnableOpt="AO"+f.toString()+"_enabled",d=b[c][h][aoEnableOpt]==g,changeCheckInput(id("triggerAlarmDevice"+
f.toString()),d),a=a&&d;a&&changeCheckInput("triggerAOAll",!0)}if(!0==q){if(!0==v){var a={},a=b[ga][Fa],a=formatTableData(a),l;for(l in a)f=a[l],f[ha]||(f[ha]=label.usrdefSound),fa.push({str:f[ha],value:f[Wa]});uploadSoundFile("fileName",plugin,soundTypeNum,P)}selectInit("soundTypeSelect",fa,0,Ba,"18");K=b[c][t][ua];L=b[c][t][va];soundTypeSelect.changeSel(K);soundTimesSelect.changeSel(L)}showDetailCon()}});1!=R&&(id("constantAlarmSwitch").style.display="none");initCheckInput("capture",function(a){A&&
p&&(a?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide())});initCheckInput("showInfo",null);id("save").onclick=ia;id("handleArrowText").onclick=Aa;id("handleArrow").onclick=Aa;id("goToFtpConf").onclick=function(){showConfirmC(label.cue,label.saveTips,function(a){!0==a?ia(function(){gFtpSwitchPageSign=1;unloadLogin()}):(gFtpSwitchPageSign=1,unloadLogin())},btn.unsave,btn.save,!1)};!0==M&&(id("clearAll").onclick=function(a){l.reset()},id("armingScheduleArrow").onclick=Da,id("armingScheduleArrowText").onclick=
Da)})();initCheckInput("showInfo",null);!1==q&&(id("soundInfo").style.display="none");!1==v&&(id("setSoundAlarm").style.display="none")}init();
</script><style type="text/css">div.configDiv li.direction{display:inline-block;font-size:0;vertical-align:middle;height:30px;margin-left:60px;padding:5px 0}div.peCol span.select{font-size:0!important}span.peSelect{width:124px!important;_width:116px!important;font-size:14px!important}#orgDC{width:662px}.displayNone{display:none!important}i.peTypeRd{width:25px!important;height:25px!important}i.timeSeled{background:url(../web-static/images/timeSeled.png) center no-repeat!important}i.timeUnSeled{background:url(../web-static/images/timeUnSeled.png) center no-repeat!important}i.mdtUnSeled{background:url(../web-static/images/mdtUnSeled.png) center no-repeat!important}i.mdtSeled{background:url(../web-static/images/mdtSeled.png) center no-repeat!important}#timingLabel{margin-right:35px;display:inline-block;*display:inline;*zoom:1}#mdtLabel{margin-right:347px;*margin-right:340px;display:inline-block;*display:inline;*zoom:1}label.typeSeled{color:#fff!important}div.peCon{left:136px;top:60px;_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;margin-top:-20px}div.handleWay ul.Line label.des{display:inline;vertical-align:middle;margin-left:8px}div.handleWay ul.Line label.desA{font-size:13px;color:#333;line-height:30px;width:500px}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)}input.goToFtpConf{margin-left:24px;padding:0 12px}div.handleWay ul.Line label.sendFtpDes{display:inline-block;margin-left:4px;margin-right:4px;width:140px}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}.hideShowCon{display:none}</style>