var kf375u_web_host='http://se1.375u.com/';
var kf375u_companyid='0f2762e682c093be72552a7695b6a4b5';
var kf375u_styleid='1';
var kf375u_cookie_id='';
var kf375u_status_now='';
var kf375u_statustime=5000;
var kf375u_view_time='2017-11-07 11:36:02';
var kf375u_page=escape(document.location.href);
var kf375u_referrer=escape(document.referrer);
var kf375u_charset='utf-8';
var kf375u_lastScrollY=0;
var kf375u_popshow='false';
var kf375u_popshow_one='false';
var kf375u_popshow_time='3000';
var kf375u_div_float_margin='right';
var kf375u_div_float_margin_width='40';
var kf375u_div_float_margin_height='400';
var kf375u_div_float_html='
';
var kf375u_div_float_style='1';
var kf375u_div_pop_margin='left';
var kf375u_div_pop_margin_width='280';
var kf375u_div_pop_margin_height='280';
var kf375u_div_pop_html ='
Welcome to Kntech!
What can i do for you?
';
function kf375u_SetCookie(name,value,days){
if (days!=null){
var expiration = new Date();
expiration.setTime(expiration.getTime() + days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + expiration.toGMTString() + ";path=" + "/";
}else{
document.cookie = name + "="+ escape (value) + ";path=" + "/";
}
}
function kf375u_GetCookie(name){
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return null;
}
if (kf375u_GetCookie('kf375u_cookie_id'+kf375u_companyid+kf375u_styleid)==null){
var kf375u_cookie_id='4608119722';
var kf375u_type='insert';
kf375u_SetCookie('kf375u_cookie_id'+kf375u_companyid+kf375u_styleid,kf375u_cookie_id,365);
kf375u_SetCookie('kf375u_view'+kf375u_companyid+kf375u_styleid,'1');
}else if(kf375u_GetCookie('kf375u_view'+kf375u_companyid+kf375u_styleid)==null){
var kf375u_cookie_id=kf375u_GetCookie('kf375u_cookie_id'+kf375u_companyid+kf375u_styleid);
var kf375u_type='update_status';
kf375u_SetCookie('kf375u_view'+kf375u_companyid+kf375u_styleid,'1');
}else{
var kf375u_cookie_id=kf375u_GetCookie('kf375u_cookie_id'+kf375u_companyid+kf375u_styleid);
var kf375u_type='update';
kf375u_SetCookie('kf375u_view'+kf375u_companyid+kf375u_styleid,Number(kf375u_GetCookie('kf375u_view'+kf375u_companyid+kf375u_styleid))+1);
if (kf375u_popshow_one=='true'){kf375u_popshow='false';}
}
function kf375u_status(){
var kf375u_srcurl = kf375u_web_host+"xmlhttp/save_visitor_status.php?";
kf375u_srcurl+= "type="+kf375u_type;
kf375u_srcurl+= "&companyid="+kf375u_companyid;
kf375u_srcurl+= "&cookieid="+kf375u_cookie_id;
kf375u_srcurl+= "&viewtime="+kf375u_view_time;
kf375u_srcurl+= "&kfstatus="+kf375u_status_now;
kf375u_srcurl+= "&kfcharset="+kf375u_charset;
kf375u_srcurl+= "&page="+kf375u_page;
kf375u_srcurl+= "&referrer="+kf375u_referrer;
kf375u_srcurl+= "&timeStamp="+new Date().getTime();
var kf375u_js_obj = document.createElement("script");
kf375u_js_obj.type = "text/javascript" ;
kf375u_js_obj.setAttribute("src" , kf375u_srcurl);
document.body.appendChild(kf375u_js_obj);
kf375u_status_now=''; setTimeout("kf375u_status()",kf375u_statustime);
}
function kf375u_retrun_status(list,type,status,popcontent){
document.getElementById("kf375u_div_float").style.visibility = '';
kf375u_type=type;
var kf375u_status_retrun=status;
var kf375u_popcontent_retrun=popcontent;
if (kf375u_popcontent_retrun==''){var kf375u_popcontent_retrun='What can i do for you?';}
if (kf375u_status_retrun=='1'){
if(document.getElementById("kf375u_div_pop")){
document.getElementById("kf375u_div_pop").style.visibility = '';
document.getElementById("kf375u_div_pop_content").innerHTML = kf375u_popcontent_retrun;
}else{}
}
if (kf375u_status_retrun=='3'){
kf375u_hide('kf375u_div_pop');
kf375u_openwindow();
}
if (kf375u_status_retrun=='6'){
kf375u_hide('kf375u_div_float');
kf375u_hide('kf375u_div_pop');
kf375u_popshow='false';
}
}
function kf375u_hide(div_id){
try {
if (div_id=='kf375u_div_float'){document.getElementById("kf375u_div_float").style.visibility = "hidden";}
if (div_id=='kf375u_div_pop'){document.getElementById("kf375u_div_pop").style.visibility = "hidden";}
}catch(e){}
}
function kf375u_closepop(){
kf375u_hide('kf375u_div_pop');
kf375u_status_now='2';
}
function kf375u_openwindow(serve_id){
if (serve_id=='' || serve_id==undefined){
var url=kf375u_web_host+'?show=chat¶rr='+kf375u_companyid+'-'+kf375u_styleid+'--'+kf375u_cookie_id;
}else{
var url=kf375u_web_host+'?show=chat¶rr='+kf375u_companyid+'-'+kf375u_styleid+'-'+serve_id+'-'+kf375u_cookie_id;
}
var name='';
var iWidth=800;
var iHeight=555;
var iTop = (window.screen.availHeight-30-iHeight)/2;
var iLeft = (window.screen.availWidth-10-iWidth)/2;
window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
kf375u_hide('kf375u_div_pop');
kf375u_SetCookie('kf375u_pop_show'+kf375u_companyid+kf375u_styleid,'false');
}
function kf375u_creatediv(div_id,align,alignpx,valign,valignpx,width,height,visibility,html){
var kf375u_div = document.createElement("div");
kf375u_div.id = div_id;
if (align=='right'){kf375u_div.style.right = alignpx+'px';}
if (align=='left'){kf375u_div.style.left = alignpx+'px';}
if (valign=='top'){kf375u_div.style.top = valignpx+'px';}
if (valign=='bottom'){kf375u_div.style.bottom = valignpx+'px';}
if (width!=''){kf375u_div.style.width = width+'px';}
if (height!=''){kf375u_div.style.height = height+'px';}
kf375u_div.style.position = "absolute";
kf375u_div.style.zIndex = 9999;
kf375u_div.style.visibility = visibility;
kf375u_div.innerHTML = html;
document.body.appendChild(kf375u_div);
}
function kf375u_moveWithScroll(){
if(typeof window.pageYOffset != 'undefined') {
nowY = window.pageYOffset;
}else if(typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
nowY = document.documentElement.scrollTop;
}else if(typeof document.body != 'undefined') {
nowY = document.body.scrollTop;
}
percent = .1*(nowY - kf375u_lastScrollY);
if(percent > 0){
percent=Math.ceil(percent);
}else{
percent=Math.floor(percent);
}
kf375u_lastScrollY = kf375u_lastScrollY + percent;
try {
if (kf375u_div_float_style==1){
document.getElementById("kf375u_div_float").style.top = parseInt(document.getElementById("kf375u_div_float").style.top) + percent+"px";
}
document.getElementById("kf375u_div_pop").style.top = parseInt(document.getElementById("kf375u_div_pop").style.top) + percent+"px";
}catch(e){}
window.setTimeout("kf375u_moveWithScroll()",1);
}
function kf375u_movediv(){
var od = document.getElementById("kf375u_div_pop");
var dx,dy,mx,my,mouseD;
var odrag;
var isIE = document.all ? true : false;
document.onmousedown = function(e){
var e = e ? e : event;
if(e.button == (document.all ? 1 : 0)) { mouseD = true; }
}
document.onmouseup = function(){
mouseD = false;
odrag = "";
if(isIE) {
od.releaseCapture();
}else{
window.releaseEvents(od.MOUSEMOVE);
}
}
od.onmousedown = function(e){
odrag = this;
var e = e ? e : event;
if(e.button == (document.all ? 1 : 0)) {
mx = e.clientX;
my = e.clientY;
od.style.left = od.offsetLeft + "px";
od.style.top = od.offsetTop + "px";
if(isIE) {
od.setCapture();
}else{
window.captureEvents(Event.MOUSEMOVE);
}
}
}
document.onmousemove = function(e){
var e = e ? e : event;
if(mouseD==true && odrag) {
var mrx = e.clientX - mx;
var mry = e.clientY - my;
od.style.left = parseInt(od.style.left) +mrx + "px";
od.style.top = parseInt(od.style.top) + mry + "px";
mx = e.clientX;
my = e.clientY;
}
}
}
kf375u_creatediv('kf375u_div_float',kf375u_div_float_margin,kf375u_div_float_margin_width,'top',kf375u_lastScrollY+kf375u_div_float_margin_height,'','','hidden',kf375u_div_float_html);
kf375u_creatediv('kf375u_div_pop',kf375u_div_pop_margin,kf375u_div_pop_margin_width,'top',kf375u_lastScrollY+kf375u_div_pop_margin_height,'','','hidden',kf375u_div_pop_html);
if(kf375u_div_float_style==3){document.getElementById('kf375u_div_float').style.visibility = 'hidden';try {document.getElementById('_kf_show_in_page_').innerHTML=kf375u_div_float_html;}catch(e){}}
setTimeout("if (kf375u_GetCookie('kf375u_pop_show'+kf375u_companyid+kf375u_styleid)!='false' && kf375u_popshow!='false'){document.getElementById('kf375u_div_pop').style.visibility = '';};",kf375u_popshow_time);
kf375u_moveWithScroll();
kf375u_movediv();
kf375u_status();