function scrollPanel(timer, moveNumber) {
	function move(o) {
		var st = document.documentElement.scrollTop + (o.t == 0 ? document.documentElement.clientHeight - o.offsetHeight : o.t);
		var sl = document.documentElement.scrollLeft + (o.c == 0 ? o.a : document.documentElement.clientWidth - o.a - o.offsetWidth);
		var tc = st - o.offsetTop, lc = sl - o.offsetLeft;
		with (o.style) {
			top = o.offsetTop + (tc != 0 ? tc / Math.abs(tc) : 0) * Math.min(Math.abs(tc), moveNumber) + "px";
			left = o.offsetLeft + (lc != 0 ? lc / Math.abs(lc) : 0) * Math.min(Math.abs(lc), moveNumber) + "px";
		}   
		if (o.person) {
			with (o.person.style) {
				top = o.offsetTop + "px";
				left = o.offsetLeft + o.offsetWidth - o.person.offsetWidth + "px";
			}   
		}
	}   
	var hidden = function() {
		var o = this.parent;
		window.clearInterval(o.interval);
		o.parentNode.removeChild(o);
		this.parentNode.removeChild(this);
	}   
	this.add = function (to, t, a, c, lo) {
		var div, exec = function () {
			move(to);
		};
		to.person = lo;
		to.t = t;
		to.a = a;
		to.c = c;
		with (to.style) {
			position = "absolute";
			display = "block";
			top = document.documentElement.scrollTop + t;
			left = document.documentElement.scrollLeft + (c == 0 ? a : document.documentElement.clientWidth - a - to.offsetWidth);
		}   
		if ("undefined" != typeof lo) {
			with (lo.style) {
				position = "absolute";
				display = "block";
			}   
			lo.onmousedown = hidden;
			lo.parent = to;
		}   
		exec();
		to.interval = window.setInterval(exec, timer);
	};
}

function scrolldiv(timer, moveNumber){
	function move(o){
		var st = document.documentElement.scrollTop + (document.documentElement.clientHeight - o.offsetHeight) / 2;
		var sl = document.documentElement.scrollLeft + (document.documentElement.clientWidth - o.offsetWidth) / 2;
		var tc = st - o.offsetTop;
		with (o.style){
			top = o.offsetTop + (tc != 0 ? tc / Math.abs(tc) : 0) * Math.min(Math.abs(tc), moveNumber) + "px";
			var sLeft = (document.documentElement.clientWidth - o.offsetWidth) / 2;
			left = sLeft + "px";
		}   
	}    
	this.add = function (to){
		var div, exec = function (){
			move(to);
		};
		with (to.style) {
			top = (document.documentElement.clientHeight - to.offsetHeight) / 2;
			left = (document.documentElement.clientWidth - to.offsetWidth) / 2 ;
		}   
		exec();
		to.interval = window.setInterval(exec, timer);
	};
}

window.onload = function() { 
	var kefupanel = new scrollPanel(10,15); 
	kefupanel.add($("kefu"),100,0,1,$("kefu_close")); 
	kefupanel = null; 
	showTip();
}