function floatLayer(idvalue)
{
	eval("window.floatLayer_"+idvalue+"=this;");
	this.oRoll = document.getElementById(idvalue);
	this.step = 1;
	this.delay = 30;
	this.x = 10;
	this.y = 10;

	this.oRoll.style.position = "absolute";
	var xin = true;
	var yin = true;
	var ifPlay = true;

	this.scroll = function()
	{
		if (!ifPlay) return;
		with (document.documentElement)
		//with(document.body)
		{
			var w = offsetWidth, h = offsetHeight;
			var x1 = scrollLeft, y1 = scrollTop;
		}
	
		if (xin && this.oRoll.offsetLeft + this.oRoll.offsetWidth + 1 > w + x1) xin = !xin;
		if (!xin && this.oRoll.offsetLeft < x1) xin = !xin;
		if (yin && this.oRoll.offsetTop + this.oRoll.offsetHeight > h + y1) yin = !yin;
		if (!yin && this.oRoll.offsetTop < y1) yin = !yin;
		this.x = this.x + (xin ? 1 : -1) * this.step;
		this.y = this.y + (yin ? 1 : -1) * this.step;
		this.oRoll.style.left = ""+ (this.x + x1) +"px";
		this.oRoll.style.top = ""+ (this.y + y1) +"px";

		window.setTimeout("floatLayer_"+ idvalue +".scroll()", eval("floatLayer_"+idvalue).delay);
	}

	this.oRoll.onmouseover = function() {ifPlay = false;}
	this.oRoll.onmouseout = function() {ifPlay = true;eval("floatLayer_"+idvalue).scroll();}
}