function OnLoadCfgNetAlarm(){var c=document.getElementById("id_net_alarm");var d=document.getElementById("net_trigger_out");var b=document.getElementById("net_trigger_record");var a=document.getElementById("id_net_ptz");CreateListNetAlarm(c,6,new Array("CH","Enable","IP address","Name","Hold time(s)","Trigger"),g_channelList.length);GenCheckGroup(d,true,g_alarmoutList,STR_SENSOR_IN_TO_ALARM_OUT,4,Btrigger);GenCheckGroup(b,true,g_channelList,STR_SENSOR_IN_TO_RECORD,4,Btrigger);SensorTriggerPTZ(a,3,new Array("","Type","No."),g_channelList.length);Align()}function CreateListNetAlarm(g,a,b,j){var d=/msie/i.test(navigator.userAgent);var h=g.outerHTML.toLowerCase();var c=h.indexOf("</tbody>");h=h.substr(0,c);h+="<tr class = 'table_head_bgcolor'>";for(var e=0;e<a;e++){h+='<td style = "text-align:center">'+b[e]+"</td>"}h+="</tr>";for(var e=1;e<j+1;e++){if(d){h+="<tr>";h+='<td style = "text-align:center; width:30px;">'+e+"</td>";h+='<td><input type = "checkbox" style = "width:70px" name = "net_enable" onchange = "g_bChange = true;"/></td>';h+='<td><input type = "text" style = "width:130px" name = "net_ip_address" onchange = "g_bChange = true;"/></td>';h+='<td><input type = "text" style = "width:150px" name = "net_alarm_name" onchange = "g_bChange = true;"/></td>';h+='<td><select style = "width:100px" onchange = "g_bChange = true;" name = "net_hold_time"></select></td>';h+='<td align = "center" style = "width:160px"><input style = "width:130px" type = "button" value = "Trigger" onclick = "OnDisOrHidNet('+e+')"/></td>';h+="</tr>"}else{h+="<tr>";h+='<td style = "text-align:center; width:30px;">'+e+"</td>";h+='<td style = "text-align:center; width:70px;"><input type = "checkbox" style = "width:30px" name = "net_enable" onchange = "g_bChange = true;"/></td>';h+='<td><input type = "text" style = "width:130px" name = "net_ip_address" onchange = "g_bChange = true;"/></td>';h+='<td><input type = "text" style = "width:150px" name = "net_alarm_name" onchange = "g_bChange = true;"/></td>';h+='<td><select style = "width:100px" onchange = "g_bChange = true;" name = "net_hold_time"></select></td>';h+='<td align = "center" style = "width:160px"><input style = "width:130px" type = "button" value = "Trigger" onclick = "OnDisOrHidNet('+e+')"/></td>';h+="</tr>"}}h+="</tbody></table>";if(d){var f=g.parentElement}else{var f=g.parentNode}f.innerHTML=h;for(var e=1;e<j+1;e++){GenSelectListEx(document.getElementsByName("net_hold_time")[e-1],g_alarmOutHoldTime)}g=f.childNodes[0]}function OnDisOrHidNet(a){div_net_trigger.style.display="";id_cp_net.style.display="";net_index_num.innerHTML="<b>Channel "+a+"</b>";g_curchannel_net=a-1;for(k=0;k<g_bUpdataChannel.length;k++){if(k!=a-1){g_bUpdataChannel[k]=0}else{g_bUpdataChannel[k]=1}}Align()};