");
var eWebEditorActiveX;
function ok(){
if (!dialogArguments.CheckActiveXVersion()){
var arr = showModalDialog("installactivex.htm", dialogArguments, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");
return;
}
var s_File = ""
if (sAction!="paste"){
s_File = d_file.value;
if (!IsExt(s_File, "doc")){
alert(lang["DlgWordInvalidFile"]);
return;
}
}
var n_OptimizeMode = 1;
if (d_opt2.checked){
n_OptimizeMode = 2;
}
var b_opt1vml = d_opt1vml.checked;
var b_opt1absolute = d_opt1absolute.checked;
var b_opt1eq = d_opt1eq.checked;
var b_opt1margin = d_opt1margin.checked;
var b_opt1space = d_opt1space.checked;
var b_opt2image = d_opt2image.checked;
var b_opt2table = d_opt2table.checked;
var b_opt2eq = d_opt2eq.checked;
var b_opt2indent = d_opt2indent.checked;
var b_opt2ptobr = d_opt2ptobr.checked;
var s_PostUrl = getSitePath() + getWebEditorRootPath() + "/" + config.ServerExt + "/upload." + config.ServerExt + "?action=local&type=local&style=" + config.StyleName + "&cusdir=" + config.CusDir;
divProcessing.style.display="";
if (eWebEditorActiveX){eWebEditorActiveX=null}
eWebEditorActiveX = new ActiveXObject("eWebEditorClient.eWebEditor");
if (sAction!="paste"){
eWebEditorActiveX.ImportWord(s_File, s_PostUrl, n_OptimizeMode, b_opt1vml, b_opt1absolute, b_opt1eq, b_opt1margin, b_opt1space, b_opt2image, b_opt2table, b_opt2eq, b_opt2indent, b_opt2ptobr);
}else{
eWebEditorActiveX.PasteWord(s_PostUrl, n_OptimizeMode, b_opt1vml, b_opt1absolute, b_opt1eq, b_opt1margin, b_opt1space, b_opt2image, b_opt2table, b_opt2eq, b_opt2indent, b_opt2ptobr);
}
window.setTimeout("CheckActiveXStatus()", 100);
}
function CheckActiveXStatus(){
if (eWebEditorActiveX.Status!="ok"){
window.setTimeout("CheckActiveXStatus()", 100);
return;
}
var s_Error = eWebEditorActiveX.Error;
if (s_Error!=""){
var s_ErrorCode = s_Error.substring(0,s_Error.indexOf(":"));
switch(s_ErrorCode){
case "InvalidFile":
alert(lang["DlgWordInvalidFile"]);
break;
default:
alert(s_Error);
}
divProcessing.style.display="none";
return;
}
var s_Style = eWebEditorActiveX.Style;
if (d_opt2.checked){
s_Style = "";
}
var s_Body = eWebEditorActiveX.Body;
var s_OriginalFiles = eWebEditorActiveX.OriginalFiles;
var s_SavedFiles = eWebEditorActiveX.SavedFiles;
if (s_OriginalFiles){
var a_Original = s_OriginalFiles.split("|");
var a_Saved = s_SavedFiles.split("|");
for (var i=0; i