var companyId = 24328;

var auto_agent = window.navigator.userAgent.toLowerCase();   
var client_kf = {
	 isQuirks:	document.compatMode == 'BackCompat',   
	 isOpera:   auto_agent.indexOf('opera') > -1,   
	 isIE:		auto_agent.indexOf('msie') > -1,   
	 isFF:		auto_agent.indexOf('firefox') > -1,   
	 isIE6:      auto_agent.indexOf('msie 6') > -1,    
	 isIE7:		auto_agent.indexOf('msie 7') > -1,  
	 isIE8:      auto_agent.indexOf('msie 8') > -1,   
	 is360:		false
 }; 
var isOpera=client_kf.isOpera;
var isBackCompat=client_kf.isQuirks;
var is360Strict = client_kf.is360 && !client_kf.isQuirks && !client_kf.isIE6;
var isIE =	client_kf.isIE;
var isIE8 = client_kf.isIE8;
var isIE6 =  client_kf.isIE6;
var isFF =	client_kf.isFF;
var host = "http://kf.5251.net"; 
var icon_isIE=isIE;
var img_host = "http://img.5251.net";
var kf_openurl="http://chat.5251.net/client.jsp?flag=1&companyId=24328&style=50861&locate=cn" +"&refer="+ escape(window.location.href)+"&username="+encodeURIComponent("")+"&conn_word="+encodeURIComponent("");
/*
 * Compressed by JSA(www.xidea.org)
 */
var route=escape(window.location.href);var kdocTitle = "";if(companyId != 17700){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($,C,B,A){var _=$+"="+escape(C)+"; expires=Thu, 6 Jan 2100 12:01:01 UTC"+((B)?"; path="+B:"")+((A)?"; domain="+A:"");document.cookie=_}function getCookie(A){var $=document.cookie,_=A+"=",C=$.indexOf("; "+_);if(C==-1){C=$.indexOf(_);if(C!=0)return""}else C+=2;var B=document.cookie.indexOf(";",C);if(B==-1)B=$.length;return unescape($.substring(C+_.length,B))}var kf_now=new Date(),icon_ss=kf_now.getTime(),temp_d=parseInt(Math.random()*10000),user_str= icon_ss+"_"+temp_d,userid=getCookie("kf51_userid");if(userid==""||userid==null){setCookie("kf51_userid",user_str);userid=user_str}var ref=document.referrer,local_host=document.domain;if(ref.indexOf(local_host)<0)setCookie("kf51_referrer",ref);var getScreenAttr=function(){var $=0,_=0;if(isBackCompat){if(document.body){$=document.body.clientWidth;_=document.body.clientHeight}}else if(document.documentElement){$=document.documentElement.clientWidth; _=document.documentElement.clientHeight}if($==0||_==0)if(document.body){$=document.body.clientWidth;_=document.body.clientHeight}else if(document.documentElement){$=document.documentElement.clientWidth; _=document.documentElement.clientHeight}if($==0||_==0)return[window.screen.availWidth-24,window.screen.availHeight-160];else return[$,_]},temp_screen=getScreenAttr(),screen_w=temp_screen[0],screen_h=temp_screen[1];
kf_openurl+=("&keyword="+escape(getCookie('kf51_referrer')) + "&userid="+userid);
var is_kf_online = 0;
var kf_workids = "";
var workids = "";
function open_pic_chat()
{
	try{
	var chat_win= window.open(kf_openurl,'chat_24328','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();	sendAndRecieve("/js/recieve.jsp?state=4&companyId="+24328+"&sessionId="+userid);}catch(e){}
}
function open_chat_person(workerid)
{
	try{
	var chat_win = window.open(kf_openurl+'&workId='+workerid+'&flag=3','chat_24328','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();
	sendAndRecieve("/js/recieve.jsp?state=4&companyId="+companyId+"&sessionId="+userid);}catch(e){}
}
function open_tel_chat(wiseid,seat)
{
	try{
    var etel_url = "http://etel.5251.net/etel/dial.jsp?wiseid=" + wiseid + "&seat=" + seat+"&com_name="+encodeURIComponent("&#x4e1c;&#x839e;&#x5e02;&#x6052;&#x5cf0;&#x73a9;&#x5177;&#x5236;&#x8863;&#x5382;%>");
	var wins = window.open(etel_url,'e_tel_chat','height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
	wins.focus();
	}catch(e){}
}
var judge_kf_isonline=function(workerid){if(kf_workids.indexOf(","+workerid+",")>-1)return true; else return false}
var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},Extend=function($,_){for(var A in _)$[A]=_[A]},Bind=function(_,$){return function(){return $.apply(_,arguments)}},BindAsEventListener=function(_,$){return function(A){return $.call(_,(A||window.event))}},CurrentStyle=function(A,_){if(A.style[_])return A.style[_];else if(A.currentStyle)return A.currentStyle[_];else if(document.defaultView&&document.defaultView.getComputedStyle){_=_.replace(/([A-Z])/g,"-$1").toLowerCase();var $=document.defaultView.getComputedStyle(A,"");return $&&$.getPropertyValue(_)}return null};function addEventHandler($,_,A){if($.addEventListener)$.addEventListener(_,A,false);else if($.attachEvent)$.attachEvent("on"+_,A);else $["on"+_]=A}function removeEventHandler($,_,A){if($.removeEventListener)$.removeEventListener(_,A,false);else if($.detachEvent)$.detachEvent("on"+_,A);else $["on"+_]=null}var KF_Drag=Class.create();KF_Drag.prototype={initialize:function(A,_,$){this.Drag=document.getElementById(A);this._x=this._y=0;this._marginLeft=this._marginTop=0;this._fM=BindAsEventListener(this,this.Move);this._fS=Bind(this,this.Stop);this._Lock=false;this.SetOptions(_,$);this._playRoller=null;this._lastDiffy=0;this._lastSW=0;this._lastSH=0;this.RollInit();addEventHandler(this.Drag,"mousedown",BindAsEventListener(this,this.Start))},SetOptions:function(dragargs,rollargs){this.dragargs={Handle:"",Lock:false,pos:"absolute",top:0,left:0};this.rollargs={Able:false,Lock:false,KeepX:0,KeepX_px:0,KeepY:0,Freq:5,Step:0.1};Extend(this.dragargs,eval("("+dragargs+")")||{});Extend(this.rollargs,eval("("+rollargs+")")||{})},RollInit:function(){if(this.dragargs.left>=0)this.Drag.style.left=this.dragargs.left+"px";if(this.dragargs.pos=="fixed"){this.rollargs.KeepY=0;if(isBackCompat&&icon_isIE){this.Drag.style.position="absolute";var $="#"+this.Drag.id+"{left:"+this.dragargs.left+"px;top:expression((ignoreMe=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"+(this.dragargs.top)+" +'px');}\n";if(document.body)if(document.body.style.backgroundImage==""||document.body.style.backgroundImage=="none"||(document.body.style.backgroundImage=="url(about:blank)"&&document.body.style.backgroundAttachment!="fixed"))$+="*html body{background:url(about:blank)  fixed;}";
if(!this._css){this.Drag.style["top"]="";for(var D=0;D<document.styleSheets.length;D++){var A=document.styleSheets[D];if(A.title=="css_5251"&&A.rules)for(var C=0;C<A.rules.length;C++)if(A.rules[C].selectorText.toLowerCase()=="#"+this.Drag.id)A.rules[C].style.top=""}this._css=document.createStyleSheet();this._css.cssText=$;this._css.title="css_5251"}}else{this.Drag.style.position="fixed";if(this.dragargs.top>=0)this.Drag.style.top=this.dragargs.top+"px"}this.rollargs.Able=true}else if(this.dragargs.pos=="absolute"){this.Drag.style.position="absolute";if(this.dragargs.top>=0)this.Drag.style.top=this.dragargs.top+"px"}this._marginTop=parseInt(CurrentStyle(this.Drag,"marginTop"))||0;this._marginLeft=parseInt(CurrentStyle(this.Drag,"marginLeft"))||0;if(this.rollargs.Able){if(this.rollargs.Freq<=0)this.rollargs.Freq=5;if(this.rollargs.Step<=0||this.rollargs.Step>=1)this.rollargs.Step=0.1;if(this.rollargs.KeepX<0||this.rollargs.KeepX>=100)this.rollargs.KeepX=0;if(this.rollargs.KeepX_px<0)this.rollargs.KeepX_px=0;if(this.rollargs.KeepX_px>0)this.rollargs.KeepX=0;if(this.rollargs.KeepX<0||this.rollargs.KeepX>=100)this.rollargs.KeepX=0;if(this.rollargs.KeepX_px>0||this.rollargs.KeepX>0||this.rollargs.KeepY>0){var B=getScreenAttr();this._lastSW=B[0];this._lastSH=B[1]}var _=this;_._playRoller=window.setInterval(function(){_.Roller()},this.rollargs.Freq)}},Start:function($){if(isOpera&&this.dragargs.pos=="fixed"){this.Drag.style.position="absolute";this.Drag.style.top=(this.Drag.offsetTop+this.getDiffY())+"px"}if(this.dragargs.Handle!="")try{var A=null;if($.srcElement)A=$.srcElement;else A=$.target;if(A.parentNode.id!=this.dragargs.Handle&&A.id!=this.dragargs.Handle)this._Lock=true;else this._Lock=false}catch(_){}if(this._Lock||this.dragargs.Lock)return;this._x=$.clientX-this.Drag.offsetLeft;this._y=$.clientY-this.Drag.offsetTop;addEventHandler(document,"mousemove",this._fM);addEventHandler(document,"mouseup",this._fS);if(icon_isIE){if(this.dragargs.pos=="fixed")for(var D=0;D<document.styleSheets.length;D++){var A=document.styleSheets[D];if(A.title=="css_5251"&&A.rules)for(var C=0;C<A.rules.length;C++)if(A.rules[C].selectorText.toLowerCase()=="#"+this.Drag.id)A.rules[C].style.top=(this.Drag.offsetTop)+"px"}addEventHandler(this.Drag,"losecapture",this._fS);this.Drag.setCapture()}else{addEventHandler(window,"blur",this._fS);$.preventDefault()}this.setRoll()},Move:function($){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty();var A=$.clientX-this._x,_=$.clientY-this._y;this.Drag.style.left=A-this._marginLeft+"px";this.Drag.style.top=_-this._marginTop+"px"},Stop:function(){if(this._Lock||this.dragargs.Lock)return;removeEventHandler(document,"mousemove",this._fM);removeEventHandler(document,"mouseup",this._fS);if(icon_isIE){removeEventHandler(this.Drag,"losecapture",this._fS);this.Drag.releaseCapture()}else removeEventHandler(window,"blur",this._fS);if(this.rollargs.KeepX>0)this.rollargs.KeepX=(this.Drag.offsetLeft/(this._lastSW-this.Drag.offsetWidth)*100).toFixed(2);if(this.rollargs.KeepY>0)this.rollargs.KeepY=((this.Drag.offsetTop-this.getDiffY())/(this._lastSH-this.Drag.offsetHeight)*100).toFixed(2);if(this.dragargs.pos=="fixed")if(isBackCompat&&icon_isIE)if(this._css){var $=this._css.cssText;$=$.replace(/(\+.+\+)/gm,"+"+(this.Drag.offsetTop-this.getDiffY())+"+");this._css.cssText=$;this.Drag.style["top"]=""}if(isOpera&&this.dragargs.pos=="fixed"){this.Drag.style.top=(this.Drag.offsetTop-this.getDiffY())+"px";this.Drag.style.position="fixed"}this.cancelRoll()},Roller:function(){var $=this,A=0;if($.rollargs.Lock)return;try{var _=getScreenAttr();if(_[0]!=$._lastSW&&$.rollargs.KeepX_px>0){$.Drag.style.left=parseInt(_[0]-$.rollargs.KeepX_px-$.Drag.offsetWidth)+"px";$._lastSW=_[0];return}
if(_[0]!=$._lastSW&&$.rollargs.KeepX>0){$.Drag.style.left=parseInt((_[0]-$.Drag.offsetWidth)*$.rollargs.KeepX/100)+"px";$._lastSW=_[0];return}A=$.getDiffY();if(_[1]!=$._lastSH){
if($.rollargs.KeepY==100){$.Drag.style.top=(_[1]-$.Drag.offsetHeight+A)+"px";} else if($.rollargs.KeepY>0){$.Drag.style.top=parseInt((_[1]-$.Drag.offsetHeight)*$.rollargs.KeepY/100+A)+"px";}$._lastSH=_[1];return}if($.dragargs.pos !="absolute")return;var B=$.rollargs.Step*(A-$._lastDiffy); if(B>0)B=Math.ceil(B);else B=Math.floor(B);$._lastDiffy=$._lastDiffy+B;$.Drag.style.top=parseInt(B+ $.Drag.offsetTop-$._marginTop)+"px"}catch(C){$._playRoller=null}},getDiffY:function(){if(window.innerHeight)return window.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;else if(document.body)return document.body.scrollTop;else return 0},setRoll:function(){this.rollargs.Lock=true},cancelRoll:function(){this.rollargs.Lock=false}}

	var img_on = "http://img.5251.net/upload/2008-09-11/108841759233.gif",img_off = "http://img.5251.net/upload/2008-09-11/108841759409.gif";
	var onloadInterval_fixed = window.setInterval(show_fixed_kf,500);
	function show_fixed_kf()
	{
		try{showKFDiv()}catch(e){};
	}
	

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=24328&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);
}
	



