//***************************************************
// 脚本功能：客服自动收缩隐藏，鼠标指向时滑动显示
// 调用方法：onClick="out('id',隐藏时显示宽度)"；onMouseOver="over('id',完整显示宽度)
// 修改优化：庞书晓 QQ409155600
//***************************************************
var act=setTimeout("out('kefu',60)",10000);//初始展开状态，定时自动隐藏

function over(s,nMax){//展开
	var obj=document.getElementById(s);
	var w = parseInt(obj.offsetWidth);
	if (w < nMax){
		obj.style.width = (w + 10)+"px";
		clearTimeout(act);
		act = setTimeout("over('"+s+"',"+nMax+")", 20);
	}
	act=setTimeout("out('kefu',60)",2000);//访客点开后是否自动隐藏
}

function out(s,nMin){//折叠
	var obj=document.getElementById(s);
	var w = parseInt(obj.offsetWidth);
	if (w > nMin){
		obj.style.width = (w - 10)+"px";
		clearTimeout(act);
		act = setTimeout("out('"+s+"',"+nMin+")", 20);
	}
	sta=false;
}


/*******样式代码********************************************************************************/
document.write('<style>');
document.write('body{margin:0;padding:0;}');
document.write('a{TEXT-DECORATION:none;}');
document.write('#kefu{');
document.write('position:absolute;');
document.write('	width:164px;');
document.write('	right:0px;');
document.write('	top:80px;');
//document.write('	height:100%;');
document.write('	overflow:hidden;');
document.write('	text-align:right;');
document.write('	padding-bottom:28px;');
document.write('}');
//document.write('.kf_left{width:57px;float:left;background:#ff0000;}');
document.write('.kf_right{float:right;width:164px;text-align:right;}');
document.write('.kf_bg,.kf_bg2{width:104px;height:100%;background:url(/images/kf_bg.gif) repeat-y left top;}');
document.write('.kf_bg div{width:100%;height:29px;line-height:29px;font-size:12px;text-align:center;}');
document.write('.kf_bg2 div{width:100%;text-align:center;}');
document.write('.kf_bg2{padding-bottom:5px;}');
document.write('.kf_bg2 img{width:87px;height:60px;border:none;}');
document.write('.kf_bg img{margin:3px auto;}');
document.write('.kf_bottom{clear:right;cursor:hand;width:164px;height:107px;background:url(/images/kf_ren.gif) no-repeat left bottom;}');
document.write('</style>');
/*******输出代码********************************************************************************/
document.write('<div id="kefu">');
document.write('<div class="kf_right" id="kf_right">');
document.write('<div style="text-align:right;"><img alt="关闭" src="/images/kf_head.gif" onclick="out(\'kefu\',60)" style="cursor:hand;"></div>');
document.write('<div class="kf_bg">');
document.write('<div><a class="class" target="blank" href="tencent://message/?uin=2567881993&amp;Site=www.eduxf.com&amp;Menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=1:2567881993:1" alt="任老师" /><br />任老师</a></div>');
document.write('<div><a class="class" target="blank" href="tencent://message/?uin=1615934971&amp;Site=www.eduxf.com&amp;Menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=1:1615934971:1" alt="丁老师" /><br />丁老师</a></div>');
document.write('<div><a class="class" target="blank" href="tencent://message/?uin=68253811&Site=www.eduxf.com&Menu=yes"><img border="0" SRC=http://wpa.qq.com/pa?p=1:68253811:1 alt="叶老师"><br>叶老师</a></div>');
document.write('</div>');//QQ客服end
document.write('</div>');//kf_right end
//document.write('<div class="kf_left"></div>');
document.write('<div class="kf_bottom" onmouseover="over(\'kefu\',160)">');
document.write('</div>');
document.write('</div>');
//*****Live800跟踪代码(邀请、统计)

/*******滚动控制********************************************************************************/
var tips; 
var theTop = 150; /*这是默认高度,越大越往下*/
var old = theTop;

function moveTips() {
    var tt = 0;
    if (window.innerHeight) {
        pos = window.pageYOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {
        pos = document.documentElement.scrollTop;
    } else if (document.body) {
        pos = document.body.scrollTop;
    }

    pos = pos - tips.offsetTop + theTop;
    pos=tips.offsetTop+pos/10;
    if (pos < theTop) pos = theTop;
    if (pos != old) {
        tips.style.top = pos+"px";
        tt = 0;
    }
    old = pos;
    setTimeout(moveTips,tt);
}

    function initFloatTips() {
    tips = document.getElementById('kefu');
    moveTips();
}
	initFloatTips();

