//////////////////////////JiaYingPager开始/////////////////////////////////// function JiaYingPager() { this.isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1; this.pageTitle = document.title.length > 30 ? document.title.substring(0, 30) : document.title; this.referrer = document.referrer; this.searchEngine = ""; this.searchEngineNo = ""; this.searchEngineLangNo = 1; this.keyWord = ""; this.pageURL = encodeURI(document.location); this.agentName = encodeURI(navigator.appName); this.osVer = encodeURI(window.navigator.userAgent); this.agent = encodeURI(navigator.userAgent); this.browserLang = this.isInternetExplorer ? encodeURI(navigator.browserLanguage) : encodeURI("unknown"); this.screenX = screen.width; this.screenY = screen.height; this.searchEngineArr = new Array("", "google.cn/", "google.com/", "baidu.com/", "3721.com/", "yisou.com/", "yahoo.com.cn/", "yahoo.com/", "sogou.com/", "sina.com.cn/", "iask.com/", "tom.com/", "163.com/", "soso.com/", "qq.com/", "msn.com/", "zhongsou.com/", "googlesyndication.com/"); this.searchEngineWord = new Array("", "google.cn/", "google.com/", "baidu.com/", "baidu.com/", "3721.com/", "3721.com/", "yisou.com/", "yahoo.com.cn/", "yahoo.com/", "sogou.com/", "sina.com.cn/", "iask.com/", "tom.com/", "163.com/", "soso.com/", "qq.com/", "msn.com/", "zhongsou.com/"); this.searchEnginePara = new Array("", "q=", "q=", "wd=", "word=", "name=", "p=", "p=", "p=", "p=", "query=", "k=", "k=", "word=", "q=", "w=", "w=", "q=", "w="); this.searchEngineLang = new Array(0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1); this.getSearchEngine = JiaYingPager_getSearchEngine; this.getKeyWord = JiaYingPager_getKeyWord; this.getTitle = JiaYingPager_getPageTitle; } /** * get search engine name if exists. */ function JiaYingPager_getSearchEngine() { for (var i = 1; i < this.searchEngineArr.length; i++) { //alert(this.referrer+ ' '+this.searchEngineArr[i]); if (this.referrer.indexOf(this.searchEngineArr[i]) >= 0) { this.searchEngineNo = i; this.searchEngineLangNo = this.searchEngineLang[i]; this.searchEngine = this.searchEngineArr[i]; return this.searchEngine; } } this.searchEngine = ""; return this.searchEngine; } /** * change the search key from utf8 to gb2312 **/ var gb2312result=""; function UTF8ToGB2312(ss) { gb2312result = ""; var str1=""; var str=ss; try { str = decodeURI(str) for(var i=0;i= 0) { //this.keyWord = this.searchEngineLang[i] + referrerArr[j].substr(this.searchEnginePara[i].length); //this.keyWord = referrerArr[j].substr(this.searchEnginePara[i].length); if( this.searchEngineLang[i]==0 ) this.keyWord = UTF8ToGB2312( referrerArr[j].substr(this.searchEnginePara[i].length) ); else this.keyWord = referrerArr[j].substr(this.searchEnginePara[i].length); return this.keyWord; } } } } this.keyWord = ""; return this.keyWord; } /** * get the url of current page */ function JiaYingPager_getPageURL() { return this.pageURL; } /** * get the title of current page */ function JiaYingPager_getPageTitle() { return this.pageTitle; } ///////////////////////////JiaYingPager结束///////////////////////////////// //可以打包为js文件; var jiaying_x0=0,jiaying_y0=0,jiaying_x1=0,jiaying_y1=0; var jiaying_offx=3,jiaying_offy=3; var jiaying_moveable=false; //var jiaying_hover='#336699',jiaying_normal='orange';//color; var jiaying_hover='#B7B7B7',jiaying_normal='';//color; var jiaying_index=990000;//z-index; //开始拖动; function jiayingStartDrag(obj) { if(event.button==1) { //锁定标题栏; obj.setCapture(); //定义对象; var win = obj.parentNode; var sha = win.nextSibling; //记录鼠标和层位置; jiaying_x0 = event.clientX; jiaying_y0 = event.clientY; jiaying_x1 = parseInt(win.style.left); jiaying_y1 = parseInt(win.style.top); //记录颜色; jiaying_normal = obj.style.backgroundColor; //改变风格; obj.style.backgroundImage = ''; obj.style.backgroundColor = jiaying_hover; win.style.borderColor = jiaying_hover; obj.nextSibling.style.color = jiaying_hover; //sha.style.left = jiaying_x1 + jiaying_offx; //sha.style.top = jiaying_y1 + jiaying_offy; sha.style.left = jiaying_x1 ; sha.style.top = jiaying_y1 ; jiaying_moveable = true; } } //拖动; function jiayingDrag(obj) { if(jiaying_moveable) { var win = obj.parentNode; var sha = win.nextSibling; win.style.left = jiaying_x1 + event.clientX - jiaying_x0; win.style.top = jiaying_y1 + event.clientY - jiaying_y0; sha.style.left = parseInt(win.style.left) ;//+ jiaying_offx; sha.style.top = parseInt(win.style.top) ;//+ jiaying_offy; } } //停止拖动; function jiayingStopDrag(obj) { if(jiaying_moveable) { var win = obj.parentNode; var sha = win.nextSibling; var msg = obj.nextSibling; win.style.borderColor = jiaying_normal; //obj.style.backgroundImage = 'url(http://chat.7k35.com/chat/img_chat/title_bg9.jpg)'; obj.style.backgroundColor = jiaying_normal; msg.style.color = jiaying_normal; sha.style.left = parseInt(obj.parentNode.style.left) + jiaying_offx; sha.style.top = parseInt(obj.parentNode.style.top) + jiaying_offy; obj.releaseCapture(); jiaying_moveable = false; } } //获得焦点; function jiayingGetFocus(obj) { if(obj.style.zIndex!=jiaying_index) { jiaying_index = jiaying_index + 2; var idx = jiaying_index; obj.style.zIndex=idx; obj.nextSibling.style.zIndex=idx-1; } } //最小化; function jiayingMin(obj) { var win = obj.parentNode.parentNode; var sha = win.nextSibling; var tit = obj.parentNode; var msg = tit.nextSibling; var flg = msg.style.display=="none"; if(flg) { win.style.height = parseInt(msg.style.height) + parseInt(tit.style.height) + 2*2; sha.style.height = win.style.height; msg.style.display = "block"; obj.innerHTML = "0"; } else { win.style.height = parseInt(tit.style.height) + 2*2; sha.style.height = win.style.height; obj.innerHTML = "2"; msg.style.display = "none"; } } //创建一个对象; function jiayingXWin(id,w,h,l,t,tit,msg) { jiaying_index = jiaying_index+2; this.id = id; this.width = w; this.height = h; this.left = l; this.top = t; this.zIndex = jiaying_index; this.title = tit; this.message = msg; this.obj = null; this.bulid = jiayingBulid; this.bulid(); } //netscape浏览器兼容 function netscapeInsertHTML(where, html) { var e=this.ownerDocument.createRange(); e.setStartBefore(this); e=e.createContextualFragment(html); switch (where) { case 'beforeBegin': this.parentNode.insertBefore(e, this);break; case 'afterBegin': this.insertBefore(e, this.firstChild); break; case 'beforeEnd': this.appendChild(e); break; case 'afterEnd': if(!this.nextSibling) this.parentNode.appendChild(e); else this.parentNode.insertBefore(e, this.nextSibling); break; } } //初始化; function jiayingBulid() { var str = "" + "
" +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +"
" + this.title + "
 "+ this.message+" 
" + "
"; if( navigator.appName.indexOf("Netscape") >= 0 ) { HTMLElement.prototype.insertAdjacentHTML = netscapeInsertHTML; //document.body.insertAdjacentHTML("afterBegin",str); } document.body.insertAdjacentHTML("afterBegin",str); } //显示隐藏窗口 function jiayingShowHide(id,dis){ var bdisplay = (dis==null)?((document.getElementById("xMsg"+id).style.display=="")?"none":""):dis document.getElementById("xMsg"+id).style.display = bdisplay; //document.getElementById("xMsg"+id+"bg").style.display = bdisplay; } function jiayingInitQueryForm() { var w = 300; var h = 180; var l = ( document.body.clientWidth - w ) / 2; var t = ( document.body.clientHeight - h ) / 2; var strHTML = ""; strHTML += ""; strHTML += " "; strHTML += " "; strHTML += "
<\/td>"; strHTML += "
Hello! Welcome to our site! Can I help you?
<\/td>"; strHTML += " <\/tr>"; strHTML += "
"; strHTML += " "; strHTML += "
"; strHTML += " "; strHTML += " <\/td>"; strHTML += " <\/td>"; strHTML += " "; strHTML += " "; strHTML += " <\/td>"; strHTML += " <\/tr>"; strHTML += " <\/table><\/td>"; strHTML += " <\/tr>"; strHTML += "<\/table>"; var f_query = new jiayingXWin( "_jy_query",w,h,l,t,"Receive Message",strHTML ); } function showJiayingQueryForm(eprId,eprUserId,msg) { var obj = document.getElementById("xMsg_jy_query"); if( obj == null ) { jiayingInitQueryForm(); } else { jiayingShowHide("_jy_query",""); } obj = document.getElementById("xMsg_jy_query_msg"); if (obj != null) obj.innerHTML = msg; obj = document.getElementById("xMsg_jy_query_eprId"); if (obj != null) obj.value = eprId; obj = document.getElementById("xMsg_jy_query_eprUserId"); if (obj != null) obj.value = eprUserId; } function queryFormAcceptForChat() { var eprId = document.getElementById("xMsg_jy_query_eprId").value; var eprUserId = document.getElementById("xMsg_jy_query_eprUserId").value; if(eprUserId==null || eprUserId=="") { jiayingOpenSelectWin(eprId); //打开选择客服窗口 } else { jiayingOpenChatWin(eprId,eprUserId,''); //打开对话窗口 } //jiayingFlashObj.chatResponse(eprId,eprUserId,visitorId,0); jiayingShowHide("_jy_query","none");//隐藏窗口 } function autoShowQueryForm() { var obj = document.getElementById("xMsg_jy_query"); if( obj == null ) { jiayingInitQueryForm(); } obj = document.getElementById("xMsg_jy_query_eprUserId"); if (obj != null) obj.value = ""; jiayingShowHide("_jy_query","");//显示窗口 } function jiayingOpenSelectWin(eprId) { var visitorId = getJiaYingUserId(); window.open ('http://chat.7k35.com/chat/jiayingSelectForm_en.jsp?eprId='+eprId+'&visitorId='+visitorId,'','height=300,width=380,top=100,left=100,toolbar=no,menubar=no,resizable=no,scrollbars=no, location=no, status=no, statusbar=no'); } function jiayingOpenChatWin(eprId,eprUserId,eprUserName) { var visitorId = getJiaYingUserId(); window.open ('http://chat.7k35.com/chat/jiayingChatForm_en.htm?eprId='+eprId+'&eprUserId='+eprUserId+'&eprUserName='+escape(eprUserName)+'&visitorId='+visitorId,'','height=450,width=585,top=100,left=100,toolbar=no,menubar=no,resizable=no,scrollbars=no, location=no, status=no, statusbar=no'); } function jiayingOpenLeaveMsgWin(eprId,eprUserId,eprUserName) { var visitorId = getJiaYingUserId(); window.open ('http://chat.7k35.com/chat/jiayingLeaveMsg_en.jsp?eprId='+eprId+'&eprUserId='+eprUserId+'&eprUserName='+escape(eprUserName)+'&visitorId='+visitorId,'jiaying_leave_msg_window','height=360,width=500,top=100,left=200,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no'); } function getScrollTop() { var ScrollTop; if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') { ScrollTop = document.documentElement.scrollTop; } else if (typeof document.body != 'undefined') { ScrollTop = document.body.scrollTop; } return ScrollTop; } function jiayingScXWin() { //query form var f_query = document.getElementById("xMsg_jy_query"); if( f_query != null) { f_query.style.top=getScrollTop()+200; //document.getElementById("xMsg_jy_querybg").style.top=getScrollTop()+jiaying_offy+200; } } setInterval('jiayingScXWin();', 800); //自动显示请求对话窗口 setTimeout(autoShowQueryForm,5000); ////////////////////////////////////////////////// var jiayingFlashObj; //swf's id //flash id function getJiaYingFlashID(swfID) { if (navigator.appName.indexOf("Microsoft") > -1) { jiayingFlashObj = window[swfID]; } else { jiayingFlashObj = document[swfID]; } } //////////////////////////////////////////////////////// function getCookie(name) { var offset = document.cookie.indexOf(name+"="); if (offset != -1) { offset += name.length+1; var end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; return document.cookie.substring(offset, end); } else return ""; } ///////////////the interface of flash/////////////////// function debugMsg(strCmd,strBody) { //document.all["txtRecvMsg"].value = document.all["txtRecvMsg"].value+"\n cmd:"+strCmd+" body:"+strBody; } function connectOK(strBody) { //document.all["txtRecvMsg"].value = document.all["txtRecvMsg"].value+"\n connect succ:"+strBody; } function connectFail(strBody) { //document.all["txtRecvMsg"].value = document.all["txtRecvMsg"].value+"\n connect fail:"+strBody; } function serverClose(strBody) { //document.all["txtRecvMsg"].value += "\n server close."; } function recvMsg(strBody) { try { //jiaying001&plksomeday&u_1157955504906_2739&不是。。 var sarray=new Array(); sarray=strBody.split('&'); //var userName = getDestUserName(); //if ( userName=='') //{ // userName = sarray[1]; //} var msg = sarray[3]; showJiayingQueryForm(sarray[0],sarray[1],msg); } catch (e) { } } function askForChat(strBody) { // document.all["txtRecvMsg"].value = document.all["txtRecvMsg"].value+"\n ask for chat:"+strBody; var eprId = getCompanyId(); var visitorId = getJiaYingUserId(); var eprUserId = getDestUserId(); var sarray=new Array(); try { sarray=strBody.split('&'); //alert( sarray[0] +' '+sarray[1] +' '+sarray[2] +' '+sarray[3]+' '+ sarray[4]); if( sarray[4] == "1" ) { showJiayingQueryForm(sarray[0],sarray[1],sarray[3]); } else if( sarray[4] == "2" ) { jiayingOpenChatWin(sarray[0],sarray[1],''); } } catch(e) {} } function getCompanyId() { return "lederen"; } function getJiaYingUserId() { var id=getCookie("jiaying_user0919"); if( id == null || id == "" ) { var rightNow = new Date(); var uid = rightNow.getTime() +''+Math.floor(Math.random() * (9999)); document.cookie="jiaying_user0919="+uid+"; expires=Thu, 6 Jan 2299 12:05:36 UTC; path=/"; id=uid; } return id; } function getDestUserId() { return ""; } function getLoginURL() { return escape(document.referrer); } function getDestURL() { return escape(window.location); } function sendText() { var eprId = getCompanyId(); var srcId = getJiaYingUserId(); var destId = getDestUserId(); var strmsg = document.all["txtSendMsg"].value; // alert('send msg'+strmsg); jiayingFlashObj.sendMsg(eprId,srcId,destId,strmsg,1); } function beginChat() { var eprId = getCompanyId(); var srcId = getJiaYingUserId(); var destId = getDestUserId(); jiayingFlashObj.beginChat(eprId,srcId,destId); } ///////////////////////////////////////////////// function writeJiayingFlashObject() { var pager = new JiaYingPager(); var str = ""; str += ""; str += ""; str += ""; str += ""; str += ""; str += ""; str += ""; str += ""; document.write(str); } writeJiayingFlashObject(); getJiaYingFlashID('JiaYing_NC_Line'); function closeFlashConn() { try { jiayingFlashObj.closeConn(); } catch (e) { } } function moveJiaYingPanel(x, y) { if (document.all) { document.getElementById("divJiaYingPanel").style.pixelLeft += x; document.getElementById("divJiaYingPanel").style.pixelTop += y; } else if (document.layers) { document.getElementById("divJiaYingPanel").left += x; document.getElementById("divJiaYingPanel").top += y; } }; function showJiaYingPanel( isShow ) { if( isShow ) { document.getElementById("divJiaYingPanel").style.display = ""; } else { document.getElementById("divJiaYingPanel").style.display = "none"; } } window.onunload = closeFlashConn; var skinID = 9; //帮助面版样式 var JYreFreshTime = 500; //单位是ms if (!document.layers) 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 (!document.layers) document.write('
') //LoadJYPanel(); setTimeout("LoadJYPanel()",JYreFreshTime); //JSFX_FloatTopDiv(); ///////////////////////////////////////////////////////////////////////// function jiayingScPanel() { var startX = 1; var startY = 100; var f_panel = document.getElementById("divJiaYingPanel"); if( f_panel != null) { f_panel.style.left=startX; f_panel.style.top=getScrollTop()+startY; } } setInterval('jiayingScPanel();', 500); //////////////////////////////////////////////////////////////////////////// function LoadJYPanel() { var strPanelIcon = "http://chat.7k35.com/chat/img_chat/kf_icon.jpg"; var Body = ''; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + '
leder optoelec.
在线服务
'; Body = Body + ''; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + ' '; Body = Body + '
'; Body = Body + ' '; Body = Body + ' '; Body = Body + ' online service
'; Body = Body + '
'; Body = Body + ' '; Body = Body + ' '; Body = Body + ' MSN service
'; Body = Body + '
Power By 7K35
'; var obj = document.getElementById("JYPanelBody"); obj.innerHTML = Body; }