


var companyId = 3528;
var kf_openurl="http://www.en400.com/tongji/chat.html?flag=1&companyId=3528&style=8469&locate=cn" +"&refer="+ escape(window.location.href)+"&username="+encodeURIComponent("")+"&conn_word="+encodeURIComponent("");

var route = escape(window.location.href);

var kdocTitle = document.title;
if(kdocTitle == null){ 
    var t_titles = document.getElementByTagName("title") 
    if(t_titles && t_titles.length >0) 
    { 
       kdocTitle = t_titles[0]; 
    }else{ 
       kdocTitle = ""; 
    } 
} 

function setCookie(name, value, path, domain) {
  var oCookie = name + "=" + escape(value) +
      "; expires=Thu, 6 Jan 2100 12:01:01 UTC" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "");
  document.cookie = oCookie;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return "";
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

var  now  =  new  Date();  
var  ss  =  now.getTime() 

var temp_d = parseInt(Math.random() *10000);
var user_str = "" + ss + "_" + temp_d;

var userid = getCookie("kf51_userid");
if(userid == "" || userid == null)
{
	
	setCookie("kf51_userid",user_str);
	userid = user_str ;	
}

//alert("userid is-->" + getCookie("kf51_userid"));
var ref = document.referrer; 
var local_host = document.domain;
if(ref.indexOf(local_host) < 0)
{
	setCookie("kf51_referrer",ref);
}
kf_openurl += "&keyword="+escape(getCookie("kf51_referrer"));
kf_openurl += "&userid="+userid;
function open_pic_chat()
{
	var chat_win= window.open(kf_openurl,'chat_3528','height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
	chat_win.focus();
	try{sendAndRecieve("/js/recieve.jsp?state=4&companyId="+3528+"&sessionId="+userid);}catch(e){}
}
function open_chat_person(workerid)
{
	var chat_win = window.open(kf_openurl+'&workId='+workerid+'&flag=3','chat_3528','height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
	chat_win.focus();
	try{sendAndRecieve("/js/recieve.jsp?state=4&companyId="+companyId+"&sessionId="+userid);}catch(e){}
}
var is_kf_online = 1;
var kf_workids = ",3532,3534,3674,";
var workids = ",3532,3534,3674,";
var judge_kf_isonline = function(workerid){
	if(kf_workids.indexOf(","+workerid+",")>-1)return true;
	else return false;
}
var kftype=2;var isonline = 1;var myid="client"; var onliner_id=1;var img_hight = 0;img_width = 0;var hasOpen= false;var closeButton = true;var closeIMG ="http://img.5251.net/images/close.gif";
		var img_on = "http://img.5251.net/upload/2010-03-04/110241647293_160_90.gif";var img_off = "http://img.5251.net/upload/2010-03-04/1102416473610_160_90.gif";var alignx = 1;var alignW =5;var  alignH =30;var screen_height = 0;
			if(window.innerHeight)screen_height=window.innerHeight;
			else if (document.documentElement && document.documentElement.clientHeight) screen_height=document.documentElement.clientHeight;
			else if (document.body)screen_height = document.body.clientHeight; 
    /*
 * Compressed by JSA(www.xidea.org)
 */
eval("function IconClass(){	this.property=new Array();	this.left=0;	this.top=0;	this.last_left=0;this.last_top=0;	this.diffY=0;	this.diffX=0;	this.diffW=0;this.diffH=0; this.show=\"\";  this.scrollTimer=null;	this.floatHtml=null;	this.dreamsim=null;	this.autoScroll = autoScroll;this.imageTimer=onliner_imageTimer;this.get_tip_str=onliner_get_tip_str;	this.win_open=onliner_win_open;	this.start=onliner_start; this.get_clost_str=onliner_get_close_str; this.hidden=hidden_div;}");
    eval("var isNS6 = (document.getElementById&&!document.all) ? 1: 0;var isIE = (document.all) ? 1: 0;var isNS = (navigator.appName==\"Netscape\" && navigator.appVersion.charAt(0)==\"4\") ? 1: 0; var is_IE8= (navigator.userAgent.indexOf(\"MSIE 8\")>0) ? 1: 0;var isFF = (navigator.userAgent.indexOf(\"Firefox\")>0) ? 1: 0;");

    eval("function autoScroll(){ getImageProperty();try{showKFDiv()}catch(e){};	this.imageTimer();	this.diffY = document.body.scrollTop;	this.diffX = document.body.scrollLeft;	if(this.diffY==0){		this.diffY = document.documentElement.scrollTop;	}	if(this.diffX==0){		this.diffX = document.documentElement.scrollLeft;	}	if(isIE){		this.diffH = document.documentElement.offsetHeight;		this.diffW = document.documentElement.offsetWidth;	}else{		this.diffH = document.body.offsetHeight;		this.diffW = document.body.offsetWidth;	}	if(this.dreamsim.style.top!=(this.diffY+this.property[\"alignH\"])){		var dreamsheight=this.diffY+this.property[\"alignH\"]-this.dreamsim.offsetTop;		this.top=this.dreamsim.offsetTop+dreamsheight;	}	if(this.property[\"alignx\"]==1){		if(parseInt(this.dreamsim.style.left)!=(this.diffX+this.diffW)){			var dreamswidth=this.diffX+this.property[\"alignW\"]-this.dreamsim.offsetLeft;			dreamswidth=(dreamswidth>0?1:-1)*Math.ceil(Math.abs(dreamswidth));			this.left=this.dreamsim.offsetLeft+dreamswidth;		}	}else{		if(parseInt(this.dreamsim.style.left)!=(this.diffX+this.diffW-parseInt(this.dreamsim.style.width)-this.property[\"alignW\"]-20)){			var dreamswidth=this.diffX+this.diffW-parseInt(this.dreamsim.style.width)-this.property[\"alignW\"]-20-this.dreamsim.offsetLeft;			dreamswidth=(dreamswidth>0?1:-1)*Math.ceil(Math.abs(dreamswidth));			this.left=this.dreamsim.offsetLeft+dreamswidth;		}	}	this.dreamsim=document.getElementById(this.property[\"X_P\"]);	if(this.last_top!=this.top || this.last_left!=this.left){		this.last_top=this.top;  		this.last_left=this.left;		this.get_tip_str();		document.getElementById(this.property[\"div_X_P\"]).innerHTML=this.floatHtml;		dreamsim=document.getElementById(this.property[\"X_P\"]);	}	this.imageTimer();}");
   
    //
	/*eval("function onliner_get_tip_str(){	var d=new Date();	var img=\"\";	if (isonline==1) img=this.property[\"img_on\"];	else img=this.property[\"img_off\"];  var tt=\"\"; if(!(is_IE8 || isFF)) tt += \"<iframe   style='position:absolute;z-index:7998;width:expression(this.nextSibling.offsetWidth);height:expression(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);left:expression(this.nextSibling.offsetLeft);' frameborder='0' ></iframe>\";  var con_img=\"<img onclick=\\\"icon.win_open()\\\" src=\\\"\"+img+\"\\\" style='cursor:pointer'>\"; 		if(alignx ==2 ){tt += \"<DIV id='\"+this.property[\"X_P\"]+\"' style='z-index:7998;display:\"+this.show+\";right: \"+alignW+\"px; top: \"+this.top+\"px; width:\"+this.property[\"width\"]+\"px;height:\"+this.property[\"height\"]+\"px;overflow:hidden;POSITION: absolute;'>\"+this.get_clost_str()+con_img+\"<!--<div style='POSITION: absolute;top:0px;left:0px;'><input name='close' type='button' id='close' onClick='hidden_div()' value='close' style='margin: 0px;padding: 0px;border: 1px dotted #339900;background-color: #FFFFFF;height: 18px;width: 30px;'></div>--></div>\";}else{tt += \"<DIV id='\"+this.property[\"X_P\"]+\"' style='z-index:7998;display:\"+this.show+\";left:\"+alignW+\"px; top: \"+this.top+\"px; width:\"+this.property[\"width\"]+\"px;height:\"+this.property[\"height\"]+\"px;overflow:hidden;POSITION: absolute;'>\"+this.get_clost_str()+con_img+\"<!--<div style='POSITION: absolute;top:0px;left:0px;'><input name='close' type='button' id='close' onClick='hidden_div()' value='close' style='margin: 0px;padding: 0px;border: 1px dotted #339900;background-color: #FFFFFF;height: 18px;width: 30px;'></div>--></div>\";}	this.floatHtml=tt;}");*/

 eval("function onliner_get_tip_str(){	var d=new Date();	var img=\"\";	if (isonline==1) img=this.property[\"img_on\"];	else img=this.property[\"img_off\"];  var tt=\"\"; if(!(is_IE8 || isFF)) tt += \"<iframe   style='position:absolute;z-index:7998;width:expression(this.nextSibling.offsetWidth);height:expression(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);left:expression(this.nextSibling.offsetLeft);' frameborder='0'></iframe>\";  var con_img=\"<img src=\\\"\"+img+\"\\\" border='0'  style='cursor:pointer' onclick=\\\"icon.win_open()\\\" >\"; 		if(alignx ==2 ){tt += \"<DIV id='\"+this.property[\"X_P\"]+\"' style='z-index:7998;display:\"+this.show+\";right: \"+alignW+\"px; top: \"+this.top+\"px; width:\"+this.property[\"width\"]+\"px;height:\"+this.property[\"height\"]+\"px;overflow:hidden;POSITION: absolute;'>\"+this.get_clost_str()+con_img+\"</div>\";}else{tt += \"<DIV id='\"+this.property[\"X_P\"]+\"' style='z-index:7998;display:\"+this.show+\";left:\"+alignW+\"px; top: \"+this.top+\"px; width:\"+this.property[\"width\"]+\"px;height:\"+this.property[\"height\"]+\"px;overflow:hidden;POSITION: absolute;'>\"+this.get_clost_str()+con_img+\"</div>\";}	this.floatHtml=tt;}");

	eval("function onliner_get_close_str(){if (closeButton) return \"<img onclick='icon.hidden()' style='position:absolute; right:7px; top:7px; cursor:hand;' src='" + closeIMG + "'/>\"; return \"\";}");
    eval("function hidden_div(){	this.show=\"none\";document.getElementById(this.property[\"X_P\"]).style.display=\"none\";try{eval( \"clearInterval(icon.scrollTimer);\")}catch(e){}}");
    eval("function onliner_win_open() {hasOpen = true;open_pic_chat()}");
    eval("function onliner_imageTimer(){ if(document.getElementById(this.property[\"div_X_P\"]).innerHTML.indexOf('.gif')==-1 &&         document.getElementById(this.property[\"div_X_P\"]).innerHTML.indexOf('.jpg')==-1 &&         document.getElementById(this.property[\"div_X_P\"]).innerHTML.indexOf('.swf')==-1)    {      this.get_tip_str();      document.getElementById(this.property[\"div_X_P\"]).innerHTML=this.floatHtml;      this.dreamsim=document.getElementById(this.property[\"X_P\"]);    }	}");
    eval("function onliner_start(){	getImageProperty() ; if(alignH < 0){ this.property[\"alignH\"] = screen_height-img_hight;}document.write('<div id=\"'+this.property[\"div_X_P\"]+'\" ></div>');	this.dreamsim=document.getElementById(this.property[\"X_P\"]);}");
  eval("var icon=new IconClass();icon.property[\"onliner_id\"]=onliner_id;");
  eval("icon.property[\"img_on\"]=\""+img_on+"\";");
  eval("icon.property[\"img_off\"]=\""+img_off+"\";");

  eval("function getImageProperty(){ if(img_hight > 0 && img_width > 0) return;var img_tmp = img_off; if (isonline==1)img_tmp = img_on; if(img_tmp.indexOf(\".txt\") > -1) return;if(img_tmp.indexOf(\"10913144096.jpg\") > 0 || img_tmp.indexOf(\"en_offline.gif\") > 0 ){img_hight = 88;img_width = 171;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;};if(img_tmp.indexOf(\"1088215854.gif\") > 0 || img_tmp.indexOf(\"10882158160.gif\") > 0 ){img_hight = 62;img_width = 143;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;};if(img_tmp.indexOf(\"10882158490.gif\") > 0 || img_tmp.indexOf(\"1088215996.gif\") > 0 ){img_hight = 125;img_width = 93;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;};if(img_tmp.indexOf(\"10882157269.gif\") > 0 || img_tmp.indexOf(\"10882156495.gif\") > 0 ){img_hight = 73;img_width = 119;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;};if(img_tmp.indexOf(\"108841759233.gif\") > 0 || img_tmp.indexOf(\"108841759409.gif\") > 0){img_hight = 111;img_width = 82;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;};var pos = img_tmp.indexOf(\"_\"); if( pos > 0 ){var next_pos = img_tmp.indexOf(\"_\",pos+1);img_width=parseInt(img_tmp.substr(pos+1,next_pos));img_hight=parseInt(img_tmp.substr(next_pos+1));icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;}if(companyId==11328){img_hight = 159;img_width = 120;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;}if(companyId==7114){img_hight = 77;img_width = 160;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;return;}var   image=new   Image();if(isonline){image.src='"+img_on+"';}else {image.src='"+img_off+"';}; image.onerror=function(){};if(!image.complete){setTimeout('getImageProperty()',100);return;	};img_hight = image.height;img_width = image.width;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;}");
//alert("2");
  
  eval("icon.property[\"alignx\"]="+alignx);
  eval("icon.property[\"alignW\"]="+alignW);
  eval("icon.property[\"alignH\"]="+alignH);
  eval("icon.property[\"X_P\"]=\"X_P\";");
  eval("icon.property[\"div_X_P\"]=\"div_X_P\";");
   // alert("3");
  eval("icon.start();");
 // alert("4");
  eval("icon.scrollTimer = window.setInterval(\"icon.autoScroll()\", 500); ");

function y_gVal(iz)
{var endstr=document.cookie.indexOf(";",iz);if(endstr==-1) endstr=document.cookie.length;return document.cookie.substring(iz,endstr);}
function y_g(name)
{var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;var j;while(i<clen) {j=i+alen;if(document.cookie.substring(i,j)==arg) return y_gVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0) break;}return null;}
function cc_k()
{var y_e=new Date();var y_t=31104000000;var yesvisitor=1000*36000;var yesctime=y_e.getTime();y_e.setTime(y_e.getTime()+y_t);var yesiz=document.cookie.indexOf("cck_lasttime");if(yesiz==-1){document.cookie="cck_lasttime="+yesctime+"; expires=" + y_e.toGMTString() +  "; path=/";document.cookie="cck_count=0; expires=" + y_e.toGMTString() +  "; path=/";return 0;}else{var y_c1=y_g("cck_lasttime");var y_c2=y_g("cck_count");y_c1=parseInt(y_c1);y_c2=parseInt(y_c2);y_c3=yesctime-y_c1;if(y_c3>yesvisitor){y_c2=y_c2+1;document.cookie="cck_lasttime="+yesctime+"; expires="+y_e.toGMTString()+"; path=/";document.cookie="cck_count="+y_c2+"; expires="+y_e.toGMTString()+"; path=/";}return y_c2;}}
var yesdata;
yesdata='companyId=3528&userid='+userid+'&refe='+escape(document.referrer)+'&location='+escape(document.location)+'&color='+screen.colorDepth+'x&resolution='+screen.width+'x'+screen.height+'&returning='+cc_k()+'&language='+navigator.systemLanguage+'&ua='+escape(navigator.userAgent)+'&ip=';
var host_stat = document.domain;
var refe_stat = document.referrer;
if(refe_stat == null)refe_stat= "";
var pos = refe_stat.indexOf(host_stat);

if( refe_stat == "" || pos == -1 )
{
	js_src = "http://etel.5251.net/stat.jsp?" +yesdata;
	var script=document.createElement("script");
	script.type='text/javascript';
	script.language='javascript';
	script.src=js_src;
	document.getElementsByTagName("head")[0].appendChild(script);
}
	




       var onloadInterval = window.setInterval(checkIfShow,10000);
		var isIE = (document.all)?1:0;
		
		function getTime(){
		 var dd=new Date();
		 return Math.floor(dd.getTime()/1000);
		 }
		 var starttime = getTime();


		function sendAndRecieve(js_src)
		{
			
				js_src = "http://kf.5251.net" +js_src;
				var script=document.createElement("script");
				script.type='text/javascript';
				script.language='javascript';
				script.src=js_src;
				document.getElementsByTagName("head")[0].appendChild(script);
				
		}

		var companyId=3528;
		var host = "http://img.5251.net";		
		var isIE8 = window.navigator.userAgent.toLowerCase().indexOf('msie 8') > -1; 
		
			if(document.all && !isIE8)
			{
				document.write("<iframe   style='position:absolute;z-index:7999;width:expression(this.nextSibling.offsetWidth);height:expression(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);left:expression(this.nextSibling.offsetLeft);'  frameborder='0' ></iframe>");
			}
			
		document.write("<div id=\"aotu_kf\"  style=\"border:0px #FF0000 solid;position:absolute;background:transparent;width:auto;height:auto;top:35%;z-index:7999;left:38%;display:none;\"></div>");
		
	   
	   var   image1=new   Image();
		image1.src = host +"/auto/a3.gif";;
		image1.onerror=function(){}

		var   image2=new   Image();
		image2.src =  host + "/auto/a2.gif";
		image2.onerror=function(){}


		var bg_img_auto = host +"/auto/a5.jpg";
		img_recieve = host + "/auto/a2.jpg";
		var  img_lost =  host+ "/auto/a3.gif";
		
		auto_str = "<table width='385' height='125' border='0' align='center' cellspacing='0' >  <tr>    <td background='" + bg_img_auto+ "'><table width='275' height='105' border='0' align='right' cellspacing='0'>  <tr>    <td width='70' height='81'>&nbsp;</td>    <td width='15'>&nbsp;</td>    <td width='77'>&nbsp;</td>    <td width='105'>&nbsp;</td>  </tr>  <tr>    <td width='70' height='20'><img onclick='open_win_chat()'  style='MARGIN-TOP: 10px; CURSOR: pointer' src='" + img_recieve+ "' width='70' height='20' border='0'/></td>    <td>&nbsp;</td>    <td width='70' height='20'><img onclick='hidden_auto();' style='MARGIN-TOP: 10px; CURSOR: pointer' src='"+img_lost+"' width='70' height='20' border='0'/></td>    <td>&nbsp;</td>  </tr></table></td>  </tr></table>";	
		//document.getElementById("aotu").innerHTML = auto_str;
		if(companyId == 434 || companyId == 541 || companyId == 628 || companyId == 673 || companyId==3531)
		{
		bg_img_auto = host + "/auto/company/"+companyId+"_a5.jpg";	
		img_recieve = host + "/auto/a2.jpg";
		
		auto_str = "<table width='385' height='125' border='0' align='center' cellspacing='0' >  <tr>    <td background='" + bg_img_auto+ "'><table width='275' height='105' border='0' align='right' cellspacing='0'>  <tr>    <td width='70' height='81'>&nbsp;</td>    <td width='15'>&nbsp;</td>    <td width='77'>&nbsp;</td>    <td width='105'>&nbsp;</td>  </tr>  <tr>    <td width='70' height='20'><img onclick='open_win_chat()'  style='MARGIN-TOP: 10px; CURSOR: pointer' src='" + img_recieve + "' width='70' height='20' border='0'/></td>    <td>&nbsp;</td>    <td width='70' height='20'><img onclick='javascript:hidden_auto();' style='MARGIN-TOP: 10px; CURSOR: pointer' src='" + host+ "/auto/a3.gif' width='70' height='20' border='0'/></td>    <td>&nbsp;</td>  </tr></table></td>  </tr></table>";	
		
		}
		
		
		bg_img_auto = host + "/auto/company/3528_on.gif";		
			
		auto_str ='<div><img src="'+bg_img_auto+'" border="0" usemap="#Map5251" />	<map name="Map5251" id="Map5251"><area shape="rect" coords="124,87,220,111" href="#" onclick="open_win_chat();return false;"/><area shape="rect" coords="230,88,326,111" href="#" onclick="hidden_auto();return false;"/></map></div>';
		
		
		
		function GetObjFromDoc(id,theDoc)
			{
				if(!theDoc){theDoc = document;}
				if (theDoc.getElementById){return theDoc.getElementById(id);}
				else if (document.all)
				{return theDoc.all(id);}
			}
		  function insert_aotu_kf()
		  {
				var aotu_kf_div=GetObjFromDoc('aotu_kf');
				//alert(10)
				if(aotu_kf_div==null){
					setTimeout('insert_aotu_kf()',100);
					return;
				}
			try{
				
				GetObjFromDoc("aotu_kf").innerHTML = auto_str;
					
			}
			catch(e){}
			
		}
	    insert_aotu_kf();
	    
		
		
		function showKFDiv()
		{
			
			


			var screen_width = 0;
			var screen_hight = 0;
			
			var diffY = document.documentElement.scrollTop;	
			var diffX = document.documentElement.scrollLeft ;

			
				
			if(diffY==0)
			{		
				diffY = document.body.scrollTop;
			}
			
			if(diffX==0)
			{		
				diffX = document.body.scrollLeft;
			}


				if (self.innerHeight) { // all except Explorer 
				screen_width = self.innerWidth; 
				screen_hight = self.innerHeight; 
				} 
				else if (document.documentElement && document.documentElement.clientHeight) { 
				// Explorer 6 Strict Mode 
				screen_width = document.documentElement.clientWidth; 
				screen_hight = document.documentElement.clientHeight; 
				} else if (document.body) { // other Explorers 
				screen_width = document.body.clientWidth; 
				screen_hight = document.body.clientHeight; 
				} 
			if(companyId == 2541)
			{
				GetObjFromDoc("aotu_kf").style.top =  diffY + screen_hight - 152; 

				//document.getElementById("aotu_kf").style.top = diffY + ( screen_hight / 2) - (auto_hight)/2 ;

				return;
			}
						
			try{
			
				if(auto_has_show )
				{
					
					var auto_top = document.getElementById("aotu_kf").style.top
					var auto_width = document.getElementById("aotu_kf").offsetWidth
					var auto_hight = document.getElementById("aotu_kf").offsetHight
					if(typeof(auto_hight)=="undefined")
					auto_hight = 125;

					if(typeof(auto_width)=="undefined")
					auto_hight = 125;
					//if(screen_hight == 0)screen_hight = 600;
					//if(screen_hight > 800) screen_hight = 800;
					//alert(1)
					GetObjFromDoc("aotu_kf").style.top = (diffY + ( screen_hight / 2) - (auto_hight)/2)+"px" ;
					//alert(2)
					//alert(GetObjFromDoc("aotu_kf").style.top)
					if (document.all) 
					GetObjFromDoc("aotu_kf").style.left = screen_width/2  - auto_width/2 ;

					
				}
			}
			catch(e){};
		}
		var kfwin_has_show = false;
		var auto_has_show = false;
		
		var time_to_show = 5000;
		
		if(companyId == 617)
		{
			//setTimeout("show_kf_auto()", 60000);
			time_to_show = 60000;
		}
		if(companyId == 1253 || companyId == 1293)
		{
			//setTimeout("show_kf_auto()", 60000);
			time_to_show = 8000;
		}

		if(companyId != 1635 && companyId != 1469)
		{
			 //setTimeout("show_kf_auto()", time_to_show);
			 
							setTimeout("show_kf_auto()", time_to_show);
						
		}

		
		function show_kf_auto(){
           // nextAccept();
		   var aotu= document.getElementById("aotu_kf");
			aotu.style.display="block";
			auto_has_show = true;
			
         }


		 function show_51kf_dialog(){

			try
			{
				kfwin_has_show = true;
				//window.clearInterval(onloadInterval);
				
				sendAndRecieve("/js/recieve.jsp?state=4&companyId="+companyId+"&sessionId="+userid);	
				location.href=kf_openurl;
				window.focus();
			}catch(e){}
			
         }

		function hidden_auto(){
			var aotu=document.getElementById("aotu_kf");
            aotu.style.display="none";
			auto_has_show = false;
			sendAndRecieve("/js/recieve.jsp?state=3&companyId="+companyId+"&sessionId="+userid);	
		}
		//kf_openurl="http://www.en400.com/tongji/chat.html?flag=1&companyId=3528&style=8469&locate=cn" +"&refer="+ escape(window.location.href);
		function open_win_chat(){
			//alert(kf_openurl);
			try
			{
				kfwin_has_show = true;
				//window.clearInterval(onloadInterval);
				var aotu=document.getElementById("aotu_kf");
				aotu.style.display="none";
				sendAndRecieve("/js/recieve.jsp?state=4&companyId="+companyId+"&sessionId="+userid);			
				var chat_win =  window.open(kf_openurl,"chat_3528","height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no");
				chat_win.focus();
			}catch(e){}

			
		}
		
		var counttimes = 0;
		function checkIfShow()
		{
			
			if(kfwin_has_show) return;
			/*
			//if(auto_has_show) return;
			var now_time = getTime();
			if(now_time - starttime > 300  )
			{
				window.clearInterval(onloadInterval);
				return;
			}
			*/
			counttimes++;			
			if(counttimes > 1)
			{
				sendAndRecieve("/js/autoShow.jsp?t="+counttimes+"&companyId="+companyId+"&sessionId="+userid);
			}
		}

		sendAndRecieve("/js/autoShow.jsp?t=0&companyId="+companyId+"&sessionId="+userid+"&route="+route+"&keyword="+escape(getCookie("kf51_referrer"))+"&page_title="+escape(kdocTitle));



