



<div class="detailCon" id="detailCon">
	<div id="downloadPluginCon"></div>
	<ul class="line lineL">
		<li class="line lineI">
			<label class="des desF">{%label.alarmInDev%}</label>
			<div id="alarmInSwitch" class="switchCon">
				<i class="switchBg"></i>
				<i class="switchBall"></i>
			</div>
			<label class="des desH"></label>
		</li>
		<div style="position:relative;*z-index:2;">
			<div id="hidebg"></div>
		</div>
		<li class="line lineI">
			<label class="des desF desLogType">{%label.alarmInDevNum%}:</label>
			<span class="selCon alarmName">
				<span id="alarmNameSel" class="select">
					<span class="value hsValueA"></span>
					<i class="arrow"></i>
				</span>
			</span>
			<label id="showingDevNum" class="des desLogType showingDevNumLabel"></label>
		</li>
		<div style="position:relative;*z-index:1;">
			<li class="line lineI">
				<label class="des desF">{%label.alarmType%}</label>

					<span class="selCon">
						<span id="alarmTypeSel" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
			</li>
		</div>
		<li class="line lineI">
			<label class="des desF">{%label.alarmInAlias%}:</label>
			<input id="alias" type="text" class="text textA1" maxlength="63" />
			<label id="aliasTipStr" for="alias">{%label.alarmInDevTip%}</label>
		</li>
	</ul>

	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.defenceTime%}</label>
			<div class="actionTitleArrowDiv">
				<label class="actionArrowTitle" id="recordArrowText">{%label.slideUp%}</label>
				<i class="arrowUp" title= {%label.slideUp%} id="recordArrow"></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.alarmInTips%}</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>
					</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" 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="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,c){var b="";switch(parseInt(a)){case ENONE:return!0;case IPCENERR:b=errStr.IPCParamInvalid;break;case IPCALAINTYPEERR:b=errStr.alarmInTypeErr;break;case IPCALARMALIASERR:b=errStr.alarmInAliasErr;break;case IPCUBUSCONNFAIL:b=errStr.ipcUbusConnFail;break;case IPCUBUSCALLERR:b=errStr.ipcUbusCallErr;break;case IPCNOTIFYRECORDENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFYFTPENERR:case IPCNOTIFCAPTUREENERR:case IPCNOTIFMSGPUSHENERR:case IPCNOTIFSOUNDALARMENERR:case IPCNOTIFLIGHTALARMENERR:b=
errStr.IPCHandleInalid;break;case IPCTIMEMINERR:b=errStr.ePlanTimeMinErr;break;case IPCTIMECOVERERR:b=errStr.ePlanTimeCoverErr;break;case IPCTIMEMAXERR:b=errStr.ePlanTimeMaxErr;break;case IPCTYPEERR:b=errStr.ePlanTypeErr;break;case IPCUMGUESTNAUTH:b=errStr.invPermissionDenied;break;default:b=errStr.invRequestFail}closeToast();showAlert(b,c);return!1}function Ra(a){var c,b=[];if(void 0==a)return b.push('"0000-0000:0"'),b;a instanceof Array||(a=a.match(/\d{4}-\d{4}/g));for(var d=0;d<a.length;d++){c=
a[d];var f=c.split(/[-]/,2);c=parseInt(f[0],10);f=parseInt(f[1],10);0==c&&0==f?b.push(m._getString(c,f,0)):b.push(m._getString(c,f,1))}return b}function Sa(){var a,c=m.getTimeVal(),b={};for(a=0;a<G.length;a++){var d=b,f=ea[a],l;l=c[G[a]];var g=void 0,k=void 0,r=void 0,e=void 0,h=void 0,h=e=void 0;if(void 0==l)l="";else{void 0==g&&(g=6);k="[";if(1>l.length)k+='"0000-0000"';else for(r=0;r<l.length&&r<g;r++)e=l[r].toString(),h=e.split(/[-,:]/,3),e=parseInt(h[0],10),h=parseInt(h[1],10),e=m._getStringWithoutType(e,
h),0<r&&(k+=","),k+='"'+e+'"';l=k+="]"}d[f]=l}return b}function Ta(){var a={};m.getTimeVal();var c=fa+h,b=ga+h,da=ha+h;a[d]={};a[d][c]={};a[d][da]={};a[d][c][ia]=1==ja.state?g:e;a[d][c][ka]=n.value;a[d][c][la]=$("#alarmTypeSel")[0].value;if(H){a[d][b]={};y&&(a[d][b][ma]="true"==na.getAttribute("checked")?g:e);z&&(a[d][b][oa]="true"==pa.getAttribute("checked")?g:e);A&&(a[d][b][qa]="true"==I.getAttribute("checked")?g:e);s&&(a[d][b][ra]="true"==J.getAttribute("checked")?g:e);if(B)for(a[d][b][sa]="true"==
ta.getAttribute("checked")?g:e,c=2;c<=R;c++)a[d][b]["AO"+c.toString()+"_enabled"]="true"==id("triggerAlarmOut"+c.toString()).getAttribute("checked")?g:e;t&&(a[d][b][ua]="true"==K.getAttribute("checked")?g:e);q&&(a[d][b][S]=C?D:"true"==va.getAttribute("checked")?g:e)}!0==E&&(a[d][u]={},a[d][u][wa]=L,a[d][u][xa]=M);a[d][da]=Sa();var f=ya&&!T&&"true"==J.getAttribute("checked"),l=za&&!U&&"true"==I.getAttribute("checked"),x=Aa&&!V&&"true"==K.getAttribute("checked");f||l||x?((f||l)&&showConfirmIpc(label.confirmAlarmDeviceOnTip,
function(b){a[p]={};a[p][uciMsgAlarm.secName.chn1MsgAlarmInfo]={};!0==b?(f&&(a[p][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]=uciMsgAlarm.optValue.enableVal.on),l&&(a[p][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]=uciMsgAlarm.optValue.enableVal.on),showToast(),$.modify(a,function(a){!0==w(a[ERR_CODE])&&(f&&(T=1),l&&(U=1),showToast("success"))})):(f&&changeCheckInput(J,!1),l&&changeCheckInput(I,!1))}),x&&showConfirmIpc(label.confirmCaptureOnTip,
function(b){a[N]={};a[N][uciPicturePlan.secName.eventConfig]={};!0==b?(x&&(a[N][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]=uciPicturePlan.optValue.on),showToast(),$.modify(a,function(a){!0==w(a[ERR_CODE])&&(x&&(V=1),showToast("success"))})):x&&changeCheckInput(K,!1)})):(showToast(),$.modify(a,function(a){!0==w(a[ERR_CODE])&&showToast("success")}))}function Ba(a){Ca.innerHTML=1==a?btn.enableN:btn.close;D=1==a?g:e}function Da(){var a,c={},b=ha+h;c[d]={};c[d][NAME]=b;$.query(c,
function(c){if(!0==w(c[ERR_CODE]))for(m.reset(),a=0;a<G.length;a++)m.setTimeVal(G[a],Ra(c[d][b][ea[a]]))})}function Ea(){W?(id("recordArrow").className="arrowDown",id("recordArrow").title=label.slideDown,id("recordArrowText").innerHTML=label.slideDown,Fa.style.display="none",W=!1):(id("recordArrow").className="arrowUp",id("recordArrow").title=label.slideUp,id("recordArrowText").innerHTML=label.slideUp,Fa.style.display="",W=!0)}function Ga(){X?(id("handleArrow").className="arrowDown",id("handleArrow").title=
label.slideDown,id("handleArrowText").innerHTML=label.slideDown,Ha.style.display="none",X=!1):(id("handleArrow").className="arrowUp",id("handleArrow").title=label.slideUp,id("handleArrowText").innerHTML=label.slideUp,Ha.style.display="",X=!0)}function Ua(a){h=v[a];Da();Ia()}function Va(a){Ja=1;v=["AI1"];if(1==Ja)Ka.hide(),La.show(),h=v[0],Wa.innerHTML=h;else{La.hide();Ka.show();h=v[0];for(var c=[],b={},d=0;d<v.length;d++)b={},b.str=v[d],b.value=d,c[d]=b;selectInit("alarmNameSel",c,0,Ua)}a()}function Xa(a){var c=
document.getElementById("hidebg");if(0==a)if(c.style.display="block",a=getoffset(id("save")).top-getoffset(id("showingDevNum")).top,0==$("#peCon").length||"none"==$("#peCon").css("display"))c.style.height=a+"px";else{var b=getoffset(id("peCon")).top-getoffset(id("showingDevNum")).top+id("peCon").offsetHeight;c.style.height=(a>b?a:b)+"px"}else c.style.display="none"}function Ba(a){Ca.innerHTML=1==a?btn.enableN:btn.close;D=1==a?g:e}function Ia(){var a=0,c=fa+h,b=ga+h,e={};e[d]={};e[d][NAME]=[c];H&&
e[d][NAME].push(b);!0==E&&e[d][NAME].push(u);!0==F&&(e[Y]={},e[Y][KEY_TABLE]=[Ma]);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&(e[uciPicturePlanCapability.fileName]={},e[uciPicturePlanCapability.fileName][NAME]=uciPicturePlanCapability.secName.capability);$.moduleSpec[uciFunction.optName.msgAlarmSeparateList]&&(e[p]={},e[p][NAME]=uciMsgAlarm.secName.chn1MsgAlarmInfo);$.moduleSpec[uciFunction.optName.captureEnable]&&(e[uciPicturePlan.fileName]={},e[uciPicturePlan.fileName][NAME]=uciPicturePlan.secName.eventConfig);
$.query(e,function(f){if(!0==w(f[ERR_CODE])){Na=f[d][c][ia];a=Na==g?1:0;ja=new Switch("alarmInSwitch",a,Xa);n.value=f[d][c][ka];n.value="undefined"==n.value?"":n.value;Z.style.display=0!=n.value.length?"none":"inline";selectInit("alarmTypeSel",[{str:label.alarmLevelHigh,value:"normally_open"},{str:label.alarmLevelLow,value:"normally_closed"}],"normally_closed");Oa=f[d][c][la];$("#alarmTypeSel")[0].resetSel(Oa);$.moduleSpec[uciFunction.optName.picturePlanCapability]&&1==parseInt(f[uciPicturePlanCapability.fileName][uciPicturePlanCapability.secName.capability][uciPicturePlanCapability.optName.ftpDependOnCapture])&&
(C=!0);if(H){y&&(a=f[d][b][ma]==g,changeCheckInput(na,a));z&&(a=f[d][b][oa]==g,changeCheckInput(pa,a));A&&(a=f[d][b][qa]==g,changeCheckInput(I,a),za=1,U=f[p][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.lightEnabled]==g?1:0);s&&(a=f[d][b][ra]==g,changeCheckInput(J,a),ya=1,T=f[p][uciMsgAlarm.secName.chn1MsgAlarmInfo][uciMsgAlarm.optName.soundEnabled]==g?1:0);if(B&&(a=f[d][b][sa]==g,changeCheckInput(ta,a),1<R)){for(var e=a,h=2;h<=R;h++)aoEnableOpt="AO"+h.toString()+"_enabled",a=f[d][b][aoEnableOpt]==
g,changeCheckInput(id("triggerAlarmOut"+h.toString()),a),e=e&&a;e&&changeCheckInput("triggerAOAll",!0)}q&&(C&&t?($("#sendToFtpLine").hide(),D=f[d][b][S],a=D==g?1:0,new Switch("sendToFtpSwitch",a,Ba)):($("#sendToFtpSwitchCon").hide(),$("#sendToFtpLine").show(),a=f[d][b][S]==g,changeCheckInput(va,a)));t&&(a=f[d][b][ua]==g,C&&q&&(a?$("#sendToFtpSwitchCon").show():$("#sendToFtpSwitchCon").hide()),changeCheckInput(K,a),$.moduleSpec[uciFunction.optName.captureEnable]&&(Aa=1,V=f[N][uciPicturePlan.secName.eventConfig][uciPicturePlan.optName.enabled]==
g?1:0))}if(!0==E){if(!0==F){var e={},e=f[Y][Ma],e=formatTableData(e),k;for(k in e)h=e[k],h[aa]||(h[aa]=label.usrdefSound),O.push({str:h[aa],value:h[Ya]});uploadSoundFile("fileName",ba,P,Q)}selectInit("soundTypeSelect",O,0,Pa,"18");L=f[d][u][wa];M=f[d][u][xa];soundTypeSelect.changeSel(L);soundTimesSelect.changeSel(M)}showDetailCon()}})}function Pa(a){L=a}function Za(a){M=a}function $a(a,c){selectInit("soundTypeSelect",a,0,Pa,"18");id("soundTypeSelect").resetSel(c)}function ab(){var a=uciLinkageCapability.optName.sound_alarm_capability,
c=uciLinkageCapability.optName.msg_push_capability,b=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,k=function(a){a=$.linkageCapability[a];return 25>a.length?!1:"1"==a[a.length-25]?!0:!1};A=k(uciLinkageCapability.optName.light_alarm_capability);s=k(a);y=k(c);B=k(b);z=k(d);q=k(g);Qa=k(e);t=k(h);(H=A||s||y||
B||z||q||Qa||t)?(A||$("#triggerLightAlarm").parent().hide(),s||$("#triggerSoundAlarm").parent().hide(),y||$("#triggerMsgPush").parent().hide(),z||$("#triggerRecord").parent().hide(),B?InsertTriggerAlarmOut("triggerAlarmOut"):$("#triggerAlarmOut").parent().hide(),q||$("#sendToFtp").hide(),t||$("#triggerCapture").parent().hide()):id("handleWayDiv").style.display="none"}function bb(){s&&$.audioAlarmCapability&&(E=1==parseInt($.audioAlarmCapability[cb])?!0:!1,F=1==parseInt($.audioAlarmCapability[db])?
!0:!1,Q=parseInt($.audioAlarmCapability[eb]),P=$.audioAlarmCapability[ca].length);if(!1==E)id("soundInfo").style.display="none";else{id("soundTypeSelect");id("soundTimesSelect");for(var a=[{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[ca].length;c++){var b=parseInt($.audioAlarmCapability[ca][c]);O.push(a[b])}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,Za)}if(!1==F)id("setSoundAlarm").style.display="none";else{openSoundInfo("setSoundAlarm",P,Q,label.usrdefSound);closeSoundInfo("infoCloseTip",d,O,$a);for(c=0;c<P;c++)devSoundListen("testListen_"+c,c),devSoundFocus("devsound_"+c,c);for(a=0;a<Q;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=uciAlarmIn.fileName,fa=uciAlarmIn.secName.alarmInPrefix,ga=uciAlarmIn.secName.alarmInNotifListPrefix,ha=uciAlarmIn.secName.planPrefix,u=uciAlarmIn.secName.soundAlarmInfo,ia=uciAlarmIn.optName.enabled,ka=uciAlarmIn.optName.alias,la=uciAlarmIn.optName.alarmType,sa=uciAlarmIn.optName.AO1Enabled,oa=uciAlarmIn.optName.recordEnabled,S=uciAlarmIn.optName.ftpEnabled,ua=uciAlarmIn.optName.captureEnabled,ma=uciAlarmIn.optName.msgPushEnabled,
ra=uciAlarmIn.optName.soundAlarmEnabled,qa=uciAlarmIn.optName.lightAlarmEnabled,g=uciAlarmIn.optValue.enableVal.on,e=uciAlarmIn.optValue.enableVal.off,cb=uciAlarmAudioTypeCapability.optName.eventSeparateAudioAlarmSupport,db=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmSupport,eb=uciAlarmAudioTypeCapability.optName.usrDefAudioAlarmMaxNum,ca=uciAlarmAudioTypeCapability.optName.alarmType,wa=uciAlarmIn.optName.soundAlarmType,xa=uciAlarmIn.optName.soundAlarmTimes,Y=uciUsrDefAlarm.fileName,Ma=uciUsrDefAlarm.secName.usrDefAudio,
Ya=uciUsrDefAlarm.optName.id,aa=uciUsrDefAlarm.optName.name;parseInt($.moduleSpec[uciFunction.optName.msgAlarm]);var R=isNaN(parseInt($.moduleSpec.alarm_out_num))?1:parseInt($.moduleSpec.alarm_out_num),H,A,s,y,B,z,q,Qa,t,F=!1,E=!1,L,M,Q,P,O=[],ba,ja=null,Na,Oa,W=!0,X=!0,D,Ja,v={},h,Ka=$(".alarmName"),La=$(".showingDevNumLabel"),n=id("alias"),Z=id("aliasTipStr"),Wa=id("showingDevNum"),ta=id("triggerAlarmOut"),pa=id("triggerRecord"),na=id("triggerMsgPush"),J=id("triggerSoundAlarm"),I=id("triggerLightAlarm"),
va=id("sendFtp"),Ca=id("sendToFtpSwitchDes"),K=id("triggerCapture"),Fa=id("timeSchedule"),Ha=id("handleWay"),G=[label.Mon,label.Tue,label.Wen,label.Thu,label.Fri,label.Sta,label.Sun],ea=[uciAlarmIn.optName.mon,uciAlarmIn.optName.tue,uciAlarmIn.optName.wed,uciAlarmIn.optName.thu,uciAlarmIn.optName.fri,uciAlarmIn.optName.sat,uciAlarmIn.optName.sun],m,p=uciMsgAlarm.fileName,ya=0,T=0,za=0,U=0,N=uciPicturePlan.fileName,Aa=0,V=0,C=!1;(function(){ab();bb();!0==F&&(ba=new Plugin({id:"downloadPluginCon",className:"downloadActiveX",
downloadReadyHd:function(a){$.find("object.downloadActiveX")[0].style.visibility="hidden"}}),!1==ba.checkInstalled()&&($.find("label.vedioInstallTip")[0].style.visibility="hidden",showAlert(errStr.sLclPluginInstallTip)));m=new PlanSet("recPlanGrid",{curType:1});Va(function(){Da();Ia()});n.onclick=function(){Z.style.display="none"};n.onblur=function(){0==this.value.length&&(Z.style.display="inline")};id("save").onclick=Ta;id("recordArrow").onclick=Ea;id("handleArrow").onclick=Ga;id("recordArrowText").onclick=
Ea;id("handleArrowText").onclick=Ga;id("clearAll").onclick=function(a){m.reset()};initCheckInput("showInfo",function(a,c){a||0!=c||showAlert(label.confirmRecordOff)});initCheckInput("capture",function(a){C&&q&&(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}label.desLogType{font-size:13px;color:#666;line-height:32px}#aliasTipStr{color:#666;font-size:13px;left:158px;line-height:30px!important;position:absolute;top:217px;*top:222px}ul.line li.lineI{margin-bottom:8px;width:410px;padding:5px 0}ul.line{font-size:0;list-style:none;width:720px}ul.line li.lineR{display:inline-block;*display:inline;*zoom:1;height:100%;font-size:0;vertical-align:middle;float:right}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.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.desSoundName{font-size:13px;color:#333;line-height:40px;width:240px;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:250px;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}#downloadPluginCon{height:0}.downloadActiveX{visibility:visible;height:1px;width:1px}ul.Line label.desM{font-size:12px;color:#666;line-height:12px;float:right;width:620px;height:30px;line-height:30px}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.handleWay ul.Line label.sendFtpDes{display:inline-block;margin-left:4px;margin-right:4px;width:140px}</style>