/*------------------------------------------------------*/ /* 修改控件的配置信息 */ /* version:1.7.3 */ /* number:002 */ /*------------------------------------------------------*/ //64位控件的calssid var classidx64="A64E3073-2016-4baf-A89D-FFE1FAA10EE0"; //32位控件的classid var classid="A64E3073-2016-4baf-A89D-FFE1FAA10EC0"; //32位控件包的路径 var codebase="officecontrol/OfficeControl.cab#version=6.0.0.1"; //64位控件包的路径 var codebase64="officecontrol/OfficeControlx64.cab#version=6,0,0,1"; //设置高度 var height="800px"; //设置宽度 var width="100%"; //买断授权密钥如果不是买断可以不用写 var MakerCaption=""; //买断授权密钥如果不是买断可以不用写 var MakerKey=""; //密钥 var ProductCaption=""; //密钥 var ProductKey=""; //解除时间密钥 var NoExpireKey=""; /*------------------------------------------------------*/ /* 以下内容 请勿修改,否则可能出错 */ /*------------------------------------------------------*/ var userAgent = navigator.userAgent, rMsie = /(msie\s|trident.*rv:)([\w.]+)/, rFirefox = /(firefox)\/([\w.]+)/, rOpera = /(opera).+version\/([\w.]+)/, rChrome = /(chrome)\/([\w.]+)/, rSafari = /version\/([\w.]+).*(safari)/; var browser; var version; var ua = userAgent.toLowerCase(); function uaMatch(ua) { var match = rMsie.exec(ua); if (match != null) { return { browser : "IE", version : match[2] || "0" }; } var match = rFirefox.exec(ua); if (match != null) { return { browser : match[1] || "", version : match[2] || "0" }; } var match = rOpera.exec(ua); if (match != null) { return { browser : match[1] || "", version : match[2] || "0" }; } var match = rChrome.exec(ua); if (match != null) { return { browser : match[1] || "", version : match[2] || "0" }; } var match = rSafari.exec(ua); if (match != null) { return { browser : match[2] || "", version : match[1] || "0" }; } if (match != null) { return { browser : "", version : "0" }; } } var browserMatch = uaMatch(userAgent.toLowerCase()); if (browserMatch.browser) { browser = browserMatch.browser; version = browserMatch.version; } /* 谷歌浏览器事件接管 */ function ntkosavetourl(type,code,html) { //alert("SaveToURL成功回调"); } function ntkopublishashtml(type,code,html){ //alert("Onpublishashtmltourl成功回调"); } function ntkopublishaspdf(type,code,html){ //alert("Onpublishaspdftourl成功回调"); } function ntkosaveasotherurl(type,code,html){ //alert("SaveAsOtherformattourl成功回调"); } function ntkoondocumentopened(type,code){ //alert("Ondocumentopened成功回调"); if(cmd==5){ if(datavalue==1){ ntko.ShowTipMessage("注意","已经接收到父页面传过来的值,请注意文档中内容的变化"); ntkoDataToChild(datatext); } } } if (browser=="IE"){ if(window.navigator.platform=="Win32"){ document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } if(window.navigator.platform=="Win64"){ document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } } else if (browser=="firefox"){ document.write(''); document.write('尚未安装NTKO Web FireFox跨浏览器插件 '); document.write(' '); }else if(browser=="chrome"){ document.write('尚未安装NTKO Web Chrome跨浏览器插件 '); document.write(''); }else if (Sys.opera){ alert("sorry,ntko web印章暂时不支持opera!"); }else if (Sys.safari){ alert("sorry,ntko web印章暂时不支持safari!"); } window.onunload =function(){ var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); if(ntkojb){ window.opener.ntkoCloseEvent(); } } window.onbeforeunload=function(){ if(cmd==4){ ntkoSendDataToParentPage(); } } //ie,谷歌,火狐传值 var ntkoBrowser={ ntkoSetReturnValueToParentPage:function(data1,text1){ var ntkojb= ntkoBrowser.NtkoJudgingBrowsers(); if(ntkojb){ window.opener.ieattachEventntko(data1,text1); }else{ window.external.SetReturnValueToParentPage(data1,text1); } }, NtkoBrower:function(){ if(browser=="IE"){ return false; } if(browser=="firefox"){ if(userAgent.indexOf("Windows NT 5.1") > -1){ return false; } if(version>="50"){ return true; }else{ return false; } } if(browser=="chrome"){ if(userAgent.indexOf("Windows NT 5.1") > -1){ return false; } if(version>="45"){ return true; }else{ return false; } } }, NtkoJudgingBrowsers:function(){ try{ var ntkobtop=window.opener.top.browser; return true; }catch(err){ return false; } } }