//document.write(""); var LimtSiteSiteName_CenterBox=["chat.jc35.com","chat.hbzhan.com","chat.afzhan.com","chat.gkzhan.com","chat.ybzhan.cn","chat.a-bm.cn","chat.chem17.com"]; //大框金色的这些还在用20200508 function setCookie(name, value, expireday) { var exp = new Date(); exp.setTime(exp.getTime() + expireday*24*60*60*1000); document.cookie = name+"="+escape(value)+"; expires"+"="+exp.toGMTString(); } function getCookie(name) { var cookieArr = document.cookie.match(new RegExp(name+"=[a-zA-Z0-9]*", "gi")); if(cookieArr != null && cookieArr.length>0){ var cookieVal = cookieArr[0].split("="); if(cookieVal[0] == name) { return unescape(cookieVal[1]); } } } function DelCookies(name) { var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval=getCookie(name); if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString() + ";path=/"; } function CloseKFCenter() { setCookie("KfCenterBox_29092", 1, 365); jQuery("#KFCenterScreen").hide(); if(jQuery("#KFRightScreen")==null||jQuery("#KFRightScreen").length < 1){ //rightBoxShow(); //if("chat.foodjx.com"=="chat.hbzhan.com" ||"chat.foodjx.com"=="chat.afzhan.com" ||"chat.foodjx.com"=="chat.gkzhan.com" ||"chat.foodjx.com"=="chat.ybzhan.cn"){ rightNewBoxShow(); //1.环保站搞个新的客服框飘着20200430 2.工控看见后表示也想要20200507 3.仪表也要20200709 4.安防站也要20220525 //} //else{ // rightBoxShow(); //} } } function OpenChatBox(url) { OpenChatBox22(url); } function OpenChatBox22(url) { CloseKFCenter(); var iHeight = 698; var iWidth = 980; if(window.screen.availWidth>=1920) { iWidth = 980; iHeight = 740; } else if(window.screen.availWidth>1599 && window.screen.availWidth<1920 ) { iWidth = 790; iHeight = 620; } else if(window.screen.availWidth>1439 && window.screen.availWidth<1600 ) { iWidth = 710; iHeight = 620; } else if(window.screen.availWidth>1365 && window.screen.availWidth<1440 ) { iWidth = 670; iHeight = 530; } var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置; window.open(url, 'window1', 'height=' + iHeight + ', width=' + iWidth + ', top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no,resizable=no, location=no, status=no'); //window.open(url, window, 'dialogWidth:700px; dialogHeight:600px;help:1;status:1;resizeable:0;'); } //获取窗口高度 function getWindowHeight() { var windowHeight = 0; if (typeof (window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else { if (document.body && document.body.clientHeight) { windowHeight = document.body.clientHeight; } } } return windowHeight; } //获取窗口宽度 function getWindowWidth() { var windowWidth = 0; if (typeof (window.innerWidth) == 'number') { windowWidth = window.innerWidth; } else { if (document.documentElement && document.documentElement.clientWidth) { windowWidth = document.documentElement.clientWidth; } else { if (document.body && document.body.clientWidth) { windowWidth = document.body.clientWidth; } } } return windowWidth; } function ResetDivpostion() { var _move = false; var _x, _y; var index_x, index_y; var IsMobileVs=false; try { if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { IsMobileVs=true; } } catch (e) { } jQuery("#KFCenterScreen").bind("mousedown", downIndex); jQuery(document).bind("mousemove", mmove); jQuery(document).bind("mouseup", mup); if(!IsMobileVs){ jQuery("#KFCenterScreen").css("cursor", "move"); } function mmove(event) { if (_move) { var x = event.pageX - _x; var y = event.pageY - _y; if(x>getWindowWidth()-10) x=getWindowWidth()-10 if(y>getWindowHeight()-10) y=getWindowHeight()-10 if(!IsMobileVs){ jQuery("#KFCenterScreen").css({ top: y, left: x }); } showDiv(x, y); } } function mup() { _move = false; } function downIndex(event) { _move = true; _x = event.pageX - parseInt(jQuery("#KFCenterScreen").css("left")); _y = event.pageY - parseInt(jQuery("#KFCenterScreen").css("top")); } function showDiv(x, y) { setCookie("KfCenterBoxLeft_29092", x, 365); setCookie("KfCenterBoxTop_29092", y, 365); } } function showNewCenterBox_Ybzhan() { var abc = "\
"; jQuery("body").prepend(abc); if ('chat.foodjx.com' == 'chat.hbzhan.com'){ if (jQuery(".rightPhone").length > 0) { var telinfo=jQuery(".rightPhone").text(); jQuery(".rightPhone").hide(); if(telinfo!=""){ jQuery("#Xwt_dialog_telephone").html("采购热线:"+telinfo+""); jQuery("#Xwt_dialog_telephone").show(); } }else { jQuery("#Xwt_dialog_telephone").hide(); } } if ('chat.foodjx.com' == 'chat.ybzhan.cn'){ if ('1' == '0') { jQuery("#Xwt_dialog_telephone").html("仪表网采购:13732256760,15058111445"); jQuery("#Xwt_dialog_telephone").show(); } else { jQuery("#Xwt_dialog_telephone").hide(); } } if ('chat.foodjx.com' == 'chat.gkzhan.com'){ if ('1' == '0') { jQuery("#Xwt_dialog_telephone").html("采购热线:15857100067"); jQuery("#Xwt_dialog_telephone").show(); } else { jQuery("#Xwt_dialog_telephone").hide(); } } if ('chat.foodjx.com' == 'chat.afzhan.com'){ if ('1' == '0') { jQuery("#Xwt_dialog_telephone").html("采购热线:15158897575"); jQuery("#Xwt_dialog_telephone").show(); } else { jQuery("#Xwt_dialog_telephone").hide(); } } if ('chat.foodjx.com' == 'chat.foodjx.com'){ if ('1' == '0') { jQuery("#Xwt_dialog_telephone").html("采购热线:13634112423"); jQuery("#Xwt_dialog_telephone").show(); } else { jQuery("#Xwt_dialog_telephone").hide(); } } if ('chat.foodjx.com' == 'chat.zyzhan.com'){ if ('1' == '0') { jQuery("#Xwt_dialog_telephone").html("采购热线:18258217482"); jQuery("#Xwt_dialog_telephone").show(); } else { jQuery("#Xwt_dialog_telephone").hide(); } } if (jQuery("#gxhxwtmobile").length > 0) { var telinfo=jQuery("#gxhxwtmobile").text(); jQuery("#gxhxwtmobile").hide(); if(telinfo!=""){ jQuery("#Xwt_dialog_telephone").html("咨询热线:"+telinfo+""); jQuery("#Xwt_dialog_telephone").show(); } } setTimeout("showOtherMess()", 10000); } function showNewCenterBox() { var abc = "\ "; jQuery("body").prepend(abc); if ('chat.foodjx.com' == 'chat.hbzhan.com'){ if (jQuery(".rightPhone").length > 0) { jQuery(".rightPhone").css("bottom", "275px"); jQuery(".rightPhone").css("right", "110px"); } } setTimeout("showOtherMess()",10000) } function ShowOrHideNewCenterBox(p) { if (p==1) { jQuery(".Xwt-dialog-content").show(); //jQuery(".Xwt-dialog-btns").show(); jQuery(".Xwt-dialog-form").show(); jQuery(".Minimize").show(); jQuery(".Restore").hide(); } else { jQuery(".Xwt-dialog-content").hide(); //jQuery(".Xwt-dialog-btns").hide(); jQuery(".Xwt-dialog-form").hide(); jQuery(".Minimize").hide(); jQuery(".Restore").show(); } } function editoronkeyup() { if (event.keyCode == 13) { ToMessages(); return false; } } function ToMessages() { var mess = jQuery("#newcenterText").val(); mess=mess.replace(/\r\n/g, "").replace(/\n/g, ""); if (mess.indexOf("请输入您的问题") == -1) SendToMessages(mess); else SendToMessages(""); //alert("请输入您的问题!"); } function SendToMessages(messages) { var strUrlReferrer = ""; //来源网址 var u = navigator.userAgent; if (/swan\//.test(window.navigator.userAgent) || /^webswan-/.test(window.name)) { strUrlReferrer += "?bdminiprogram=1"; } var chatUrl = "https://chat.foodjx.com/Chat/ChatIndex/34019?Weburl=" + strUrlReferrer+"&NewMessages="+encodeURI(messages); if (!!u.match(/AppleWebKit.*Mobile.*/)) { chatUrl = "https://chat.foodjx.com/Chat/MobileChatIndex/34019?Weburl=" + strUrlReferrer+"&NewMessages="+encodeURI(messages); } PostData(); var iHeight = 698; var iWidth = 980; if(window.screen.availWidth>=1920) { iWidth = 980; iHeight = 740; } else if(window.screen.availWidth>1599 && window.screen.availWidth<1920 ) { iWidth = 790; iHeight = 620; } else if(window.screen.availWidth>1439 && window.screen.availWidth<1600 ) { iWidth = 710; iHeight = 620; } else if(window.screen.availWidth>1365 && window.screen.availWidth<1440 ) { iWidth = 670; iHeight = 530; } var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置; window.open(chatUrl, 'window1', 'height=' + iHeight + ', width=' + iWidth + ', top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no,resizable=no, location=no, status=no'); jQuery("#newcenterText").val("请输入您的问题..."); return false; } function showOtherMess() { setTimeout("jQuery('#messdivs').scrollTop(238);",500) jQuery("#message2222").show(200); } function showYqingMess() { setTimeout("jQuery('#messdivs').scrollTop(338);",500) jQuery("#message3333").show(200); } function ChatBoxClick(){ SendToMessages(""); } jQuery(document).ready(function () { var IsMobileVs=false; try { if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { IsMobileVs=true; } } catch (e) { } if (!IsMobileVs && 'chat.foodjx.com' != 'chat.chem17.com') { // 其他站不要中间弹出框,显示右下角弹框 //if ('chat.foodjx.com' == 'chat.a-bm.cn' ||'chat.foodjx.com' == 'chat.ybzhan.cn' || 'chat.foodjx.com' == 'chat.hbzhan.com' || 'chat.foodjx.com' == 'chat.chem17.com') showNewCenterBox_Ybzhan(); //else // showNewCenterBox(); return false; } if (jQuery("#KFCenterScreen")==null||jQuery("#KFCenterScreen").length < 1) { if(typeof getCookie("KfCenterBox_29092") != "undefined"){ return; } var abc = ""; if(!IsMobileVs ||!IsLimtSite('chat.foodjx.com',LimtSiteSiteName_CenterBox)){ abc += ""; } else { abc+=""; } var topMargin = 0; var leftMargin = 0; //gkzhan样式微调 靠右显示 'chat.foodjx.com'=='chat.gkzhan.com'&& if( 'chat.foodjx.com'=='chat.gkzhan.com'){ topMargin=getWindowHeight() / 2 -186; leftMargin = getWindowWidth() / 2 +306; } else if(IsLimtSite('chat.foodjx.com',LimtSiteSiteName_CenterBox)){ topMargin=getWindowHeight() / 2 - 170 / 2; leftMargin = getWindowWidth() / 2 - 400 / 2; } else { topMargin=getWindowHeight() / 2 - 140 / 2; leftMargin= getWindowWidth() / 2 - 359 / 2; } jQuery("body").prepend(abc); if (jQuery("#KFCenterScreen") != null) { jQuery("#KFCenterScreen .accept,#btnaccept").click(function() { var strUrlReferrer = ""; var u = navigator.userAgent; if (/swan\//.test(window.navigator.userAgent) || /^webswan-/.test(window.name)) { strUrlReferrer += "?bdminiprogram=1"; } var chatUrl = "https://chat.foodjx.com/Chat/ChatIndex/34019?Weburl=" + strUrlReferrer; if (!!u.match(/AppleWebKit.*Mobile.*/)) { chatUrl = "https://chat.foodjx.com/Chat/MobileChatIndex/34019?Weburl=" + strUrlReferrer; } OpenChatBox(chatUrl); return false; }); jQuery("#KFCenterScreen .next,#btnnext").click(function() { CloseKFCenter(); return false; }); ResetDivpostion(); //if( 'chat.foodjx.com'=='chat.chem17.com'){ // topMargin=getWindowHeight() / 2 - 170 / 2; // jQuery("#KFCenterScreen").css("right", "5px"); // jQuery("#KFCenterScreen").css("top", topMargin+"px"); //} //else //{ if (typeof getCookie("KfCenterBoxLeft_29092") != "undefined" && !IsMobileVs) { var leftpx = getCookie("KfCenterBoxLeft_29092"); jQuery("#KFCenterScreen").css("left", leftpx + "px"); } else if (!IsMobileVs) { jQuery("#KFCenterScreen").css("left", leftMargin + "px"); } if (!(/msie/.test(navigator.userAgent.toLowerCase())) || (/msie/.test(navigator.userAgent.toLowerCase())) && ('undefined' == typeof(document.body.style.maxHeight))) { if (typeof getCookie("KfCenterBoxTop_29092") != "undefined" && !IsMobileVs) { var toppx = getCookie("KfCenterBoxTop_29092"); jQuery("#KFCenterScreen").css("top", toppx + "px"); if (IsLimtSite('chat.foodjx.com', LimtSiteSiteName_CenterBox)) { jQuery("#KFCenterScreen").animate({ height: '170px' }, 1000); } else { jQuery("#KFCenterScreen").animate({ height: '140px' }, 1000); } } else if (!IsMobileVs) { jQuery("#KFCenterScreen").css("top", topMargin + "px"); if (IsLimtSite('chat.foodjx.com', LimtSiteSiteName_CenterBox)) { jQuery("#KFCenterScreen").animate({ height: '170px' }, 1000); } else { jQuery("#KFCenterScreen").animate({ height: '140px' }, 1000); } } } //} jQuery("#KFCenterScreen").show(); jQuery(window).resize(function() { DelCookies("KfCenterBoxLeft_29092"); DelCookies("KfCenterBoxTop_29092"); if ('chat.foodjx.com' == 'chat.gkzhan.com') { topMargin = getWindowHeight() / 2 - 186; leftMargin = getWindowWidth() / 2 + 306; //} else if ('chat.foodjx.com' == 'chat.chem17.com') { // topMargin = getWindowHeight() / 2 - 170 / 2; // jQuery("#KFCenterScreen").css("right", "5px"); // jQuery("#KFCenterScreen").css("top", topMargin + "px"); } else if (IsLimtSite('chat.foodjx.com', LimtSiteSiteName_CenterBox)) { leftMargin = getWindowWidth() / 2 - 400 / 2; } else { leftMargin = getWindowWidth() / 2 - 359 / 2; } //if (!IsMobileVs &&'chat.foodjx.com' != 'chat.chem17.com') { jQuery("#KFCenterScreen").css("left", leftMargin + "px"); //} if (!(jQuery.browser.msie) || (jQuery.browser.msie) && (jQuery.browser.version != "6.0")) { if (IsLimtSite('chat.foodjx.com', LimtSiteSiteName_CenterBox)) { topMargin = getWindowHeight() / 2 - 170 / 2; } else { topMargin = getWindowHeight() / 2 - 140 / 2; } if (!IsMobileVs) { jQuery("#KFCenterScreen").css("top", topMargin + "px"); } } }); } } }); function IsLimtSite(BeSiteName,SiteName){ return true; for(var i=0;i < SiteName.length;i++){ if(BeSiteName==SiteName[i]){ return true; } } return false; } //以下自动发送邀请框程序 var webDefinitionKey=""; var CustomerAppID=""; var CallDefinitionKey=""; var _timer=0; var _ContactionSuccess=false; jQuery(document).ready(function () { if(parseInt(2)!=2) return; if(getCookie("MyDefinitionKey")!=null) { var temp=getCookie("MyDefinitionKey").split(','); var uservice=29092; for (var i = 0; i < temp.length; i++) { if (temp[i] == uservice) { sttCall(); //先执行一遍 setInterval(sttCall, 5000); return ; } } } setTimeout(BeginCtebvis,10000); }); function BeginCtebvis(){ var randomSubStr=""; var exp = new Date(); var chars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']; for(var i = 0; i < 18 ; i ++) { var id = Math.floor(Math.random()*35); randomSubStr+= chars[id]; } var haveSend=0; if (getCookie("CookDefinitionKey") == null) { webDefinitionKey='Z'+29092+'Z'+randomSubStr; setCookie("CookDefinitionKey", webDefinitionKey, 1); } else { webDefinitionKey=getCookie("CookDefinitionKey"); haveSend=1; } //webDefinitionKey='Z'+29092+'Z'+randomSubStr; if (haveSend == 0) { var NowDataTime=exp.getTime(); var NowTitle=encodeURI(document.title); var link = encodeURI(window.location.href); if(link.indexOf('.aspx')>=0)//非静态页不发送 return; //有用户不想要,临时关闭下 if('chat.foodjx.com'.indexOf('.chem17.')>=0&&'29092'=='269363') return; var StrPostUrl="//chat.foodjx.com/Chat/Ctebvis?webDefinitionKey="+webDefinitionKey+"&CustomerUserId="+34019+"&Title="+NowTitle+"&link="+link+"&v="+NowDataTime; var script = document.createElement("script"); script.src=StrPostUrl; document.body.appendChild(script); document.body.removeChild(script); } setInterval(sttCall, 3000); } function callNotContaction(k, u, r) { //未发起响应,或者阻止响应 //console.log(k+";"+u+";"+r); } function callSuccessPK() { //响应成功,发起联系 doSuccessPK(); //如果通知游客成功 停止继续执行,直到页面被重新载入. _ContactionSuccess = true; } function callContactionError() { //参数异常,或者执行出错 // console.log("发生异常!"); } function callStopGet() { _ContactionSuccess = false; _timer = 10086; // console.log("关闭动作"); } function callResult(r, k, u) { switch (parseInt(r)) { case 1: callStopGet(); setCookie("cResult" + k + u, r, 1); break; case 3: callSuccessPK(); setCookie("cResult" + k + u, r, 1); break; case 4: callStopGet(); setCookie("cResult" + k + u, r, 1); break; } } function sttCall() { if (_ContactionSuccess == true) return; _timer++; var cookDefinitionKey = ""; var cookKeyAppId = ""; if (getCookie("CookDefinitionKey") != null) { cookDefinitionKey = getCookie("CookDefinitionKey"); } else { //console.log("CookDefinitionKeyNULL!"); return; } if (getCookie("CookKeyAppId") != null) { cookKeyAppId = getCookie("CookKeyAppId"); } else { // console.log("CookKeyAppIdNull!"); return; } if (getCookie("cResult" + cookDefinitionKey + cookKeyAppId) != null) { var value = getCookie("cResult" + cookDefinitionKey + cookKeyAppId); switch (parseInt(value)) { case 3: callSuccessPK(); _ContactionSuccess = true; break; default: _ContactionSuccess = true; _timer = 10086; break; } return; } // 36*5=180s 超过3分钟无响应视为挂机,放弃接下来的接口操作. if (_timer < 36 && _timer > 3) { var exp = new Date(); var NowDataTime = exp.getTime(); //创建标签(createElement) var script = document.createElement("script"); //添加地址 var scriptUrl = "https://chat.foodjx.com/Chat/GetKFpkVS?webDefinitionKey=" + cookDefinitionKey + "&cusUserId=" + cookKeyAppId + "&v=" + NowDataTime; script.src = scriptUrl; //添加给body的(成为body包涵的孩子) document.body.appendChild(script); document.body.removeChild(script); } } function cookieEnabledFalse() { //console.log("用户禁用或拒绝 Cookie"); } function cookEnableTrue(y, k, a) { CustomerAppID = y; CallDefinitionKey = k; if (getCookie("MyDefinitionKey") == null) { setCookie("MyDefinitionKey", y, 1); } else { var newKey = getCookie("MyDefinitionKey"); DelCookies("MyDefinitionKey"); setCookie("MyDefinitionKey", newKey + "," + y, 1); } if (getCookie("CookDefinitionKey") == null) { setCookie("CookDefinitionKey", k, 1); } if (getCookie("CookKeyAppId") == null) { setCookie("CookKeyAppId", a, 1); } //console.log("Cookie正常;"+y+";"+k); } function PostData() { var cookDefinitionKey = ""; var cookKeyAppId = ""; if (getCookie("CookDefinitionKey") != null) { cookDefinitionKey = getCookie("CookDefinitionKey"); } else { //console.log("CookDefinitionKeyNULL!"); return; } if (getCookie("CookKeyAppId") != null) { cookKeyAppId = getCookie("CookKeyAppId"); } else { // console.log("CookKeyAppIdNull!"); return; } var PostURl = "https://chat.foodjx.com/Chat/TempVistorSata?webDefinitionKey=" + cookDefinitionKey + "&cusUserId=" + cookKeyAppId; DelCookies("cResult" + cookDefinitionKey + cookKeyAppId); setCookie("cResult" + cookDefinitionKey + cookKeyAppId, 1, 1); jQuery.post(PostURl); } function doSuccessPK() { if ( 'chat.foodjx.com' != 'chat.chem17.com') { showYqingMess(); return; } if (document.getElementById("KFCenterScreenYQK")) { var element = document.getElementById("KFCenterScreenYQK"); document.body.removeChild(element); } var abc = ""; abc += ""; var topMargin = getWindowHeight() / 2 - 140 / 2; var leftMargin = getWindowWidth() / 2 - 359 / 2; jQuery("body").prepend(abc); //if( 'chat.foodjx.com'=='chat.chem17.com'){ // topMargin=getWindowHeight() / 2 - 170 / 2; // jQuery("#KFCenterScreenYQK").css("right", "5px"); // jQuery("#KFCenterScreenYQK").css("top", topMargin+"px"); //} //else //{ leftMargin = getWindowWidth() / 2 - 359 / 2; jQuery("#KFCenterScreenYQK").css("left", leftMargin + "px"); if (!(jQuery.browser.msie) || (jQuery.browser.msie) && (jQuery.browser.version != "6.0")) { topMargin = getWindowHeight() / 2 - 140 / 2; jQuery("#KFCenterScreenYQK").css("top", topMargin + "px"); } //} jQuery("#KFCenterScreen").hide(); jQuery("#KFCenterScreenYQK").show(); } function openyqkaaaa() { if (jQuery("#KFCenterScreenYQK") != null) { var strUrlReferrer = ""; PostData(); var u = navigator.userAgent; if (/swan\//.test(window.navigator.userAgent) || /^webswan-/.test(window.name)) { strUrlReferrer += "?bdminiprogram=1"; } var chatUrl = "https://chat.foodjx.com/Chat/ChatIndex/34019?Weburl=" + strUrlReferrer; if (!!u.match(/AppleWebKit.*Mobile.*/)) { chatUrl = "https://chat.foodjx.com/Chat/MobileChatIndex/34019?Weburl=" + strUrlReferrer; } jQuery("#KFCenterScreenYQK").hide(); CloseKFCenter(); var iHeight = 698; var iWidth = 980; if(window.screen.availWidth>=1920) { iWidth = 980; iHeight = 740; } else if(window.screen.availWidth>1599 && window.screen.availWidth<1920 ) { iWidth = 790; iHeight = 620; } else if(window.screen.availWidth>1439 && window.screen.availWidth<1600 ) { iWidth = 710; iHeight = 620; } else if(window.screen.availWidth>1365 && window.screen.availWidth<1440 ) { iWidth = 670; iHeight = 530; } var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置; window.open(chatUrl, 'window1', 'height=' + iHeight + ', width=' + iWidth + ', top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no,resizable=no, location=no, status=no'); } } function CloseAPPKFCenter(){ jQuery("#KFCenterScreenYQK").hide(); CloseKFCenter(); }