function preSubmit(){if(hasUploading())return showAndExit("文件上传中，请稍候…");var n=$("#mutiUser:visible").length>0;if(UpdateEditorElement(),n){if($("#rbAssigned").prop("checked")&&$("#cbUser,#cbRole,#cbUnit,#cbRel").filter(":checked").length==0)return showAndExit("请指定接收人！")}else if($.trim($("#tbUser").val())=="")return showAndExit("请指定接收人！");return $.trim($("#tbSubject").val())==""?showAndExit("请输入主题！"):CKEDITOR.instances.ckContent.getData()==""?showAndExit("请输入内容！"):(fromDataPage("msgs.aspx")&&parentable()&&(parent.dataChanged=!0),$("#__EVENTARGUMENT").val(n+":"+getUploaderValue("#uploader")),!0)}function autoSubject(){var n=$("#tbSubject"),t=n.attr("auto");t&&n.val(t)}function showMore(){if(!isPc){showUserTree("tbUser");return}$("#trSignle").hide();$("#mutiUser,#exclude").css("display","block");var n=$("#tbUser").val();n.length>0&&($("#tbUsers").val(n),$("#cbUser").prop("checked",!0));CKEDITOR.instances.ckContent.resize("100%",214);tryFitParent()}function sent(){hideLoading();$("#resultArea").show();$("#mainArea").hide()}function toContinue(){$("#resultArea").hide();$("#mainArea").show();tryFitParent()}$(function(){$.browser.isMobile?MakeEditor("#ckContent",$(window).width()<=320?"Min":"Compact",235,!1,!1):MakeEditor("#ckContent","Lesser",294,!1,!1);InitUploader(".valArea");$("#tbSubject,#tbUser").poshytip();$("#tbUsers,#tbRoles,#tbUnits,#tbNoUsers").focus(function(){$(this).prevAll(":checkbox:first").prop("checked",!0)});$("#related :checkbox,#ddlLevels").not("#cbRel").change(function(){$("#cbRel").prop("checked",!0);!$(this).is("#cbLevel")&&$(this).isIn("#spanLevels")&&$("#cbLevel").prop("checked",!0)});setTimeout(function(){AutoComplete($(":text[acfid],textarea[acfid]"));$("#tbUsers").val()==""?$("#tbUsers").focus():setTimeout(function(){CKEDITOR.instances.ckContent.focus()},300)},50)})