var cfg_live_header=new Array(str_ch,str_showname,str_name);function OnLoadCfgLive(){var c=document.getElementById("id_live_cfg");var g=document.getElementById("live_all_cfg");var f=document.getElementById("id_live_all");var b=document.getElementById("dwell_time");ApplyXmlLang("cfg_live.xml");CreateListLive(c,3,cfg_live_header,g_channelList.length);GenSelectListEx(b,g_dwellList);var d=CreateConfigReqXml(channel_config_array);var a=WebClient.ExcuteCmd(d);if(a==""){return}g_xmlDoc.async=false;g_xmlDoc=FormatToXmlDOM(a);var e=g_xmlDoc.documentElement.getElementsByTagName("command")[0].getElementsByTagName("parameter");UpdateValues(e,true);cfgCopy2All(g,c,f);Align()}function LoadDefaultCfgLive(){if(GetDefaultCfg(channel_config_array)){var d=document.getElementById("live_all_cfg");var c=document.getElementById("id_live_all");var a=document.getElementById("id_live_cfg");var b=g_xmlDoc.documentElement.getElementsByTagName("command")[0].getElementsByTagName("parameter");UpdateValues(b,true);cfgCopy2All(d,a,c);g_bChange=true}}function CreateListLive(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 = "width:50px;text-align:center">'+e+"</td>";h+='<td><input type = "checkbox"  name = "show_channel_name" style = "width:200px;text-align:center;" onchange = "g_bChange = true;"/></td>';h+='<td><input type = "text" style = "width:460px" name = "channel_name"onkeydown = "return LenCheck(this,event,const_camara_name_max_len);" onkeyup = "return KeyupCheck(this,const_camara_name_max_len);" onchange = "g_bChange = true;"/></td>';h+="</tr>"}else{h+="<tr>";h+='<td style = "width:50px;text-align:center">'+e+"</td>";h+='<td><input type = "checkbox"  name = "show_channel_name" style = "width:200px;text-align:center;" onchange = "g_bChange = true;"/></td>';h+='<td><input type = "text" style = "width:460px" name = "channel_name"onkeydown = "return LenCheck(this,event,const_camara_name_max_len);" onkeyup = "return KeyupCheck(this,const_camara_name_max_len);" onchange = "g_bChange = true;"/></td>';h+="</tr>"}}h+="</tbody></table>";if(d){var f=g.parentElement}else{var f=g.parentNode}f.innerHTML=h;g=f.childNodes[0]}function ConstLivelen(){var e="";var d="";var a=document.getElementById("channelconfig_errortips");var b=document.getElementsByName("channel_name");var c=true;for(i=0;i<g_channelList.length;i++){channel_name_len=b[i].value.length;if(channel_name_len>const_camara_name_max_len){e=str_live_channelnamelen+cannot_more_than_tip+const_device_name_len+character;c=false}if(channel_name_len==0){d=str_live_channelnamelen+str_empty_tip;c=false}}if(!c){a.style.color="red";a.innerHTML=save_error_tip+e+d;g_bChange=false;return false}a.innerHTML="";a.display="none";return true};