var g_pageLoadFunc=0;function GotoMainPage(){HideDIVs();document.getElementById("work_area").style.display="";document.getElementById("div_main_menu").style.display="";g_xmlhttp.open("get","body_html/body_mainmenu.html",false);SafeHttpSend(g_xmlhttp,null);if(g_xmlhttp.readyState!=4){return}var a;a=g_xmlhttp.responseText;document.getElementById("div_main_menu").innerHTML=a;var b=document.getElementById("logo_text");if(g_bUseLogo){b.innerHTML=g_logoRemote}ApplyXmlLang("main_menu.xml");GotoLive()}function CallPageLoadFunc(d){WebClient.SetVisible(0);var c=document.getElementById("div_ocx");var a=document.getElementById("ocx_alt_label");c.style.width="0px";c.style.height="0px";WebClient.style.width="0px";WebClient.style.height="0px";a.style.display="none";var b="<request>\r\n";b+='<command name="'+STR_GET_LAST_STREAM_ERROR+'">\r\n';b+="</command>\r\n";b+="</request>";g_pageLoadFunc=d;StartWait();SetNofityCallback(OnCallPageLoadFuncEnd);WebClient.ExcuteCmdAsyn(b)}function OnCallPageLoadFuncEnd(a){StopWait();if(g_pageLoadFunc!=0){g_pageLoadFunc()}}function GotoLive(){var b=/msie/i.test(navigator.userAgent);if(document.getElementById("live_js")==null){if(b){g_xmlhttp.open("get","script/live.js",false);SafeHttpSend(g_xmlhttp,null);if(g_xmlhttp.readyState==4){DynAppendJS("live_js",g_xmlhttp.responseText);var a=new Array("cfg_main.js","ctrl_generator.js");LoadMultiJSSync(a);GotoLivePage()}}else{if(g_xmlhttp.readyState==4){GotoLivePage()}}}else{if(b){GotoLivePage()}else{if(g_xmlhttp.readyState==4){GotoLivePage()}}}}function GotoSearch(){if(document.getElementById("playback_js")==null){g_xmlhttp.open("get","script/playback.js",false);SafeHttpSend(g_xmlhttp,null);if(g_xmlhttp.readyState==4){DynAppendJS("playback_js",g_xmlhttp.responseText);GotoSearchPage()}}else{GotoSearchPage()}}function GotoBackup(){if(document.getElementById("backup_js")==null){g_xmlhttp.open("get","script/backup.js",false);SafeHttpSend(g_xmlhttp,null);if(g_xmlhttp.readyState==4){DynAppendJS("backup_js",g_xmlhttp.responseText);GotoBackupPage()}}else{GotoBackupPage()}}function GotoConfig(){var a=new Array("cfg_main.js","ctrl_generator.js","device_param.js");StartWait();LoadMultiJSSync(a);GotoConfigPage()}function GotoAdvance(){var a=new Array("cfg_main.js","advance.js");LoadMultiJSSync(a);GotoAdvancePage()}function GotoInfo(){if(document.getElementById("information_js")==null){g_xmlhttp.open("get","script/information.js",false);SafeHttpSend(g_xmlhttp,null);if(g_xmlhttp.readyState==4){DynAppendJS("information_js",g_xmlhttp.responseText);StartWait();LoadMultiJSSync(new Array("backup.js","ctrl_generator.js","ctrl_calendar.js","ctrl_time.js"));GotoInfoPage()}}else{GotoInfoPage()}}function selected(b){var c=document.getElementById("main_ul").getElementsByTagName("li");for(var a=1;a<c.length;a++){c[a].getElementsByTagName("span")[0].style.display="none";c[a].getElementsByTagName("a")[0].style.display="block"}c[c.length-1-b].getElementsByTagName("a")[0].style.display="none";c[c.length-1-b].getElementsByTagName("span")[0].style.display="block"}var g_lastNav=null;var g_lastNavSec=null;function NavSelected(a){var c=document.getElementById("div_config_index");var d=document.getElementById("div_info_index");if(g_curConfigIndex==-1){return}if(g_lastNav){if(a.parentNode.parentNode.id.substr(0,3)!=g_lastNav.id){g_lastNav.className="";if(g_lastNav.parentNode.className.substr(0,3).toUpperCase()=="L12"){document.getElementById(g_lastNav.id+"d").style.display="none"}}}if(g_lastNavSec){g_lastNavSec.className=""}a.className="active";if(a.id.substr(0,1)=="m"){if(a.parentNode.className.substr(0,3).toUpperCase()=="L12"){var b=document.getElementById(a.id+"d");if(b.style.display=="none"){b.style.display=""}else{b.style.display="none"}b.getElementsByTagName("a")[0].className="active";g_lastNavSec=b.getElementsByTagName("a")[0]}g_lastNav=a}if(a.id.substr(0,1)=="f"){g_lastNavSec=a}if(c.firstChild!=null){c.actualHeight=c.firstChild.offsetHeight}if(d.firstChild!=null){d.actualHeight=d.firstChild.offsetHeight}}function searchNavS(a){if(g_lastNav){g_lastNav.className=""}a.className="active";g_lastNav=a}function EdgeCtrl(b,a){};