function OnloadWebCfg(){var g=document.getElementById("tr_local_record");var a=document.getElementById("tr_local_rec_save_path");var j=document.getElementById("tr_local_rec_channel");var m=document.getElementById("tr_local_rec_ch");var d=document.getElementById("tr_rec_audio_channel");var f=document.getElementById("tr_rec_audio_ch");var k=/msie/i.test(navigator.userAgent);g_bChange=false;ApplyXmlLang("cfg_local.xml");var i=document.getElementById("local_rec_ch");var b=document.getElementById("local_rec_audio_ch");GenCheckGroup(i,true,g_channelList,STR_RECORD_CLIP_OPEN,8,Bchange);GenCheckGroup(b,true,g_audioList,STR_RECORD_AUDIO_OPEN,8,Bchange);var e=/win32/i.test(navigator.platform);if(!e){g.style.display="none";a.style.display="none";j.style.display="none";m.style.display="none";d.style.display="none";f.style.display="none"}var l=CreateConfigReqXml(local_config_array);if(g_xmlDoc!=null){delete g_xmlDoc;g_xmlDoc=null}g_xmlDoc=FormatToXmlDOM(l);var c=g_xmlDoc.getElementsByTagName("command");c[0].setAttribute("name",STR_LM_GET_CONFIG);if(k){l=g_xmlDoc.xml}else{l=serializeXml(g_xmlDoc);delete g_oSerializer;g_oSerializer=null}var h=WebClient.ExcuteLocalCmd(l);if(h==""){return false}if(g_xmlDoc!=null){delete g_xmlDoc;g_xmlDoc=null}g_xmlDoc=FormatToXmlDOM(h);g_xmlDoc.async=false;UpdateValues(g_xmlDoc.documentElement.getElementsByTagName("command")[0].getElementsByTagName("parameter"),true);var i=document.getElementById("local_rec_ch");var b=document.getElementById("local_rec_audio_ch");UpdateCheckItems(i);UpdateCheckItems(b);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};