function XuanFu(name,strHtml,intHtmlWidth,wz,ssLeft,sstop){
    var xuanfu={
		zhi:true,
		Obj:'',
		pX:0,
		pY:0,
		delta_Jst : 0.1,//运动速度比率
		collection_Jst : '',
		closeB_Jst : false,
		theFloaters_Jst : null,
		overIframe_Jst : null,

		init:function (){
		    this.name=name;
			this.strHtml=strHtml;
			this.intHtmlWidth=intHtmlWidth || '120';
		    this.wz=wz || 'left';//位置:left左边,right右边
		    this.sstop=sstop || '20';//顶部距离
			this.ssLeft=ssLeft || '5';//边距离

			if (this.wz == "right") {
				if (document.documentElement && document.documentElement.scrollTop) this.ssLeft = document.documentElement.clientWidth - this.intHtmlWidth - this.ssLeft;
				else this.ssLeft = document.body.clientWidth - this.intHtmlWidth - this.ssLeft;
			}else{
				this.ssLeft = this.ssLeft;
			}
			this.Obj = '';

			this.theFloaters_Jst = new floaters_Jst(),
			this.theFloaters_Jst.addItem(name+'_followDiv2_Jst', this.ssLeft, this.sstop, this.strHtml); //添加项目
			this.theFloaters_Jst.play_Jst(this);

			if (document.documentElement && document.documentElement.scrollTop) {
				document.documentElement.onscroll = function onscrollMove() {
					this.theFloaters_Jst.play_Jst();
				}
			}else{
				document.body.onscroll = function onscrollMove() {
					this.theFloaters_Jst.play_Jst();
				}
			}
			
			function floaters_Jst() { //实现跟随滚动条滚动的特效
				this.items	= [];
				this.addItem	= function(id,x,y,content) {  //添加项目
					document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
					var newItem_Jst				= {}; //定义数组
					newItem_Jst.object			= document.getElementById(id);//创建对象
					eval(newItem_Jst.object);//用于ie6
					if (!content) newItem_Jst.object.appendChild(document.getElementById(name));
					newItem_Jst.x				= x;
					newItem_Jst.y				= y;

					this.items[this.items.length]= newItem_Jst;
				}
				this.play_Jst	= function(o){
					o.collection_Jst				= this.items;
					setInterval(''+name+'.play_Jst()',30); //30毫秒刷新一次
				}
			}
		},
		MDown:function (Object1) { //向下移动层
			if (!Object1.onmouseup){Object1.onmouseup=this.MUp_Jst;};
			if (!Object1.onmousemove)Object1.onmousemove=this.MMove_Jst;

			xuanfu.zhi = false;
			xuanfu.Obj = Object1.id;
			document.getElementById(xuanfu.Obj).setCapture();
			xuanfu.pX = event.clientX - document.getElementById(xuanfu.Obj).style.pixelLeft;
			xuanfu.pY = event.clientY - document.getElementById(xuanfu.Obj).style.pixelTop;
		},
		MMove_Jst:function () { //鼠标拽动层 ff只能在事件中(如onclick=)使用event.clientX，此问题暂未解决
			if (xuanfu.Obj != '') {//undefined
				document.getElementById(xuanfu.Obj).style.left = event.clientX - xuanfu.pX +"px";
				document.getElementById(xuanfu.Obj).style.top = event.clientY - xuanfu.pY +"px";
				xuanfu.ssLeft = event.clientX - xuanfu.pX;

				if (document.documentElement && document.documentElement.scrollTop) xuanfu.sstop = event.clientY - xuanfu.pY - document.documentElement.scrollTop;
				else xuanfu.sstop = event.clientY - xuanfu.pY - document.body.scrollTop;
			}
		},
		MUp_Jst:function () { //鼠标拽动控制
			xuanfu.zhi = true;
			if (xuanfu.Obj != '') {
				document.getElementById(xuanfu.Obj).releaseCapture();
				xuanfu.Obj = '';
			}
		},

		play_Jst:function () { //实现跟随滚动条滚动的特效
			if (screen.width <= 700 || this.closeB_Jst) {
				for (var i = 0; i < this.collection_Jst.length; i++) {
					this.collection_Jst[i].object.style.display = 'none';
				}
				return;
			}
			for (var i = 0; i < this.collection_Jst.length; i++) {
				var followObj = this.collection_Jst[i].object;
				var followObj_x = (typeof(this.collection_Jst[i].x) == 'string' ? eval(this.collection_Jst[i].x) : this.collection_Jst[i].x);
				var followObj_y = (typeof(this.collection_Jst[i].y) == 'string' ? eval(this.collection_Jst[i].y) : this.collection_Jst[i].y);

				if (document.documentElement && document.documentElement.scrollTop) {
					if (followObj.offsetLeft != (document.documentElement.scrollLeft + followObj_x)) {
						var dx = (document.documentElement.scrollLeft + followObj_x - followObj.offsetLeft) * this.delta_Jst;
						dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx));
						followObj.style.left = followObj.offsetLeft + dx +"px";
					}

					if (followObj.offsetTop != (document.documentElement.scrollTop + followObj_y)) {
						var dy = (document.documentElement.scrollTop + followObj_y - followObj.offsetTop) * this.delta_Jst;
						dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy));
						followObj.style.top = followObj.offsetTop + dy +"px";
					}
					else {
						return;
					}
				} else {
					if (followObj.offsetLeft != (document.body.scrollLeft + followObj_x)) {
						var dx = (document.body.scrollLeft + followObj_x - followObj.offsetLeft) * this.delta_Jst;
						dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx));
						followObj.style.left = followObj.offsetLeft + dx +"px";//ff一定要单位
					}

					if (followObj.offsetTop != (document.body.scrollTop + followObj_y)) {
						var dy = (document.body.scrollTop + followObj_y - followObj.offsetTop) * this.delta_Jst;
						dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy));
						followObj.style.top = followObj.offsetTop + dy +"px";
					}
					else {
						return;
					}
				}

				followObj.style.display = '';
			}
		}

    }

    xuanfu.init(name);
	this.play_Jst=function(){xuanfu.play_Jst()};
	this.MDown=function(o){xuanfu.MDown(o)};
}
