function OnloadWebCfg(){var h=document.getElementById("tr_local_record");var b=document.getElementById("tr_local_rec_save_path");var m=document.getElementById("tr_local_rec_channel");var r=document.getElementById("tr_local_rec_ch");var e=document.getElementById("tr_rec_audio_channel");var g=document.getElementById("tr_rec_audio_ch");var n=/msie/i.test(navigator.userAgent);g_bChange=false;ApplyXmlLang("cfg_local.xml");var l=document.getElementById("local_rec_ch");var c=document.getElementById("local_rec_audio_ch");GenCheckGroup(l,true,g_TotalChannelList,STR_RECORD_CLIP_OPEN,8,Bchange);var p=new Array();for(var k=0;k<g_local_ch_num;k++){if(k<g_audioList.length){p[k]=g_audioList[k]}else{p[k]=new CSelectOptionInfo(channel_string+(k-1),k)}}for(k=g_local_ch_num;k<g_local_ch_num+g_net_ch_num;k++){p[k]=new CSelectOptionInfo(channel_string+(k-1),k)}GenCheckGroup(c,true,p,STR_RECORD_AUDIO_OPEN,8,Bchange);if(g_audioList.length<g_local_ch_num){var q=document.getElementsByName("record_audio_open");for(var a=g_audioList.length;a<g_local_ch_num;a++){q[a].disabled=true}}var f=/win32/i.test(navigator.platform);if(!f){e.style.display="none";g.style.display="none"}var o=CreateConfigReqXml(local_config_array);if(g_xmlDoc!=null){delete g_xmlDoc;g_xmlDoc=null}g_xmlDoc=FormatToXmlDOM(o);var d=g_xmlDoc.getElementsByTagName("command");d[0].setAttribute("name",STR_LM_GET_CONFIG);if(n){o=g_xmlDoc.xml}else{o=serializeXml(g_xmlDoc);delete g_oSerializer;g_oSerializer=null}var j=WebClient.ExcuteLocalCmd(o);if(j==""){return false}if(g_xmlDoc!=null){delete g_xmlDoc;g_xmlDoc=null}g_xmlDoc=FormatToXmlDOM(j);g_xmlDoc.async=false;UpdateValues(g_xmlDoc.documentElement.getElementsByTagName("command")[0].getElementsByTagName("parameter"),true);var l=document.getElementById("local_rec_ch");var c=document.getElementById("local_rec_audio_ch");if(n){UpdateCheckItems(l);UpdateCheckItems(c)}else{UpdateCheckItems(l)}Align()}function OnSaveWebCfg(){if(!g_bChange){var b=document.getElementById("webconfig_errortips");SaveError(b,cfg_nochange_tip)}else{UpdateValues(g_xmlDoc.documentElement.getElementsByTagName("command")[0].getElementsByTagName("parameter"),false);var a=g_xmlDoc.getElementsByTagName("command");a[0].setAttribute("name",STR_LM_SET_CONFIG);var c=/msie/i.test(navigator.userAgent);if(c){xmlConfigReq=g_xmlDoc.xml}else{xmlConfigReq=serializeXml(g_xmlDoc);delete g_oSerializer;g_oSerializer=null}WebClient.ExcuteLocalCmd(xmlConfigReq);var b=document.getElementById("webconfig_errortips");SaveOk(b);g_bChange=false}}function LoadDefaultLocalcfg(){if(GetDefaultLocalcfg(local_config_array)){var a=g_xmlDoc.documentElement.getElementsByTagName("command")[0].getElementsByTagName("parameter");var c=document.getElementById("local_rec_ch");var b=document.getElementById("local_rec_audio_ch");UpdateValues(a,true);UpdateCheckItems(c);UpdateCheckItems(b);g_bChange=true}}function GetDefaultLocalcfg(c){var e=CreateConfigReqXml(c,STR_LM_GET_DEFAULT_CONFIG);var a=WebClient.ExcuteLocalCmd(e);if(a==""){return false}var d;d=FormatToXmlDOM(a);d.async=false;var b=d.documentElement.getElementsByTagName("command")[0];delete d;if(b.attributes.getNamedItem("name").nodeValue!=STR_LM_GET_DEFAULT_CONFIG){window.alert("get default config failed!");return false}if(g_xmlDoc!=null){delete g_xmlDoc;g_xmlDoc=null}g_xmlDoc=FormatToXmlDOM(a);return true};