$(document).ready(function(){$.event.props=$.event.props.join("|").replace("layerX|layerY|","").split("|");global.taskListObj=$("#popTaskList")});window.onload=function(){onLoadOk()};document.oncontextmenu=new Function("return false;");var global={taskListObj:""};function onLoadOk(){document.getElementById("deleteAllTask").className="menu-nav disable";cef.gtask("loadPopHtmlOk")}function refreshList(b){if(b==null||b.length==0||b==""){$("#popTaskList").html("")}else{var d={list:b};var a=template("taskPop_list_template",d);$("#popTaskList").html(a)}refreshTopMenu()}function c(d){var b=event||window.event;b=b.target;d=$(d);if(d.hasClass("disable")){return}if(b.className==="liDel"){var f=d.attr("id");var a='{"ids":"'+f+'","isDoingTask":'+true+"}";cef.param=a;cef.gtask("deletePopTask");refreshTopMenu()}else{if(b.className==="liPause"){var f=d.attr("id");cef.param=f;cef.gtask("pausePopTask");refreshTopMenu()}else{if(b.className==="liContinue"){var f=d.attr("id");cef.param=f;cef.gtask("continuePopTask");refreshTopMenu()}}}}function deleteAllTask(){var b="";global.taskListObj.find("li").each(function(){b=b+$(this).attr("id");b=b+"_"});var a='{"ids":"'+b+'","isDoingTask":'+true+"}";cef.param=a;cef.gtask("deletePopTask");refreshTopMenu()}function openTaskDetail(){if($("#openTaskDetail").hasClass("disable")){return}cef.gtask("openTaskDetail")}function refreshTopMenu(){var a=global.taskListObj.find("li").length;if(a!=0){$("#deleteAllTask").removeClass("disable")}else{$("#deleteAllTask").addClass("disable")}}function updateTaskItem(a){if(a==""&&a==null){return}var g=a.id;var d=$("#"+g);var e=a.content;if(e==null||e==""){d.remove();refreshTopMenu();return}data={taskContent:e};var f=template("task_content_template",data);if(d.length==0){var b='<li id="'+g+'" onclick="c(this)">'+f+"</li>";global.taskListObj.append(b);refreshTopMenu();return}d.html(f)}function updateThunderP2sSpeed(a){var d=a.isZero;var b=a.csSpeed;if(!d){$("#speedText").text(":  +"+b)}else{$("#speedText").text("!")}};