/*------------------------------------------------------*/
/* 修改控件的配置信息 */
/* version:2.5.1 */
/* 2020.09.07版本 跟随 联通数字科技有限公司20210105 产品发送 */
/* */
/*------------------------------------------------------*/
//64位控件的calssid
var classidx64="A64E3073-2016-4baf-A89D-FFE1FAA10EF1";
//32位控件的classid
var classid="A64E3073-2016-4baf-A89D-FFE1FAA10ED1";
//32位控件包的路径
var codebase="officecontrol/ofctnewclsid.cab#version=6,0,1,0";
//64位控件包的路径
var codebase64="officecontrol/ofctnewclsidx64.cab#version=6,0,1,0";
//设置高度
var height="800px";
//设置宽度
var width="100%";
//买断授权密钥如果不是买断可以不用写
var MakerCaption="联通数字科技有限公司";
//买断授权密钥如果不是买断可以不用写
var MakerKey="C1AB790358ECC36C0F26DB985E43769912D15699";
//密钥
var ProductCaption="联通数字科技有限公司";
//密钥
var ProductKey="46839E48E0B10E99B17E82F35A3E5371F2C07BC0";
//解除时间密钥
var NoExpireKey="";
/*
谷歌浏览器事件接管但此接管事件只支持低版本的谷歌(45以下版本不包含45)和火狐(52以下版本不包含52)
*/
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);
}
}
}
/*------------------------------------------------------*/
/* 以下内容 请勿修改,否则可能出错 */
/*------------------------------------------------------*/
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;
}
if (browser=="IE"){
if(window.navigator.platform=="Win32"){
document.write(' ');
document.write(' ');
document.write('');
}
if(window.navigator.platform=="Win64"){
document.write(' ');
document.write(' ');
document.write('');
}
}
else if (browser=="firefox"){
document.write(' ');
}else if(browser=="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();
// }
// }
//ie,谷歌,火狐传值
var ntkoBrowser={
ntkoSetReturnValueToParentPage:function(data1,text1){
var ntkojb= ntkoBrowser.NtkoJudgingBrowsers();
if(ntkojb){
window.opener.ieattachEventntko(data1,text1);
}else{
window.external.SetReturnValueToParentPage(data1,text1);
}
},
NtkoJudgingBrowsers:function(){
try{
var ntkobtop=window.opener.top.browser;
return true;
}catch(err){
return false;
}
},
}
//触发父页面传值的功能
var NtkoUrlTest = window.location.href;
if(NtkoUrlTest!=null&&NtkoUrlTest!=""){
var ntkoarry=new Array();
ntkoarry.push(NtkoUrlTest);
ntkoBrowser.ntkoSetReturnValueToParentPage("ntkoSendDataToChildtext",ntkoarry);
}