	function closeDiv() {
		document.getElementById('floatLayer').style.display = "none";
		return false;
	}

	window.onerror = null;
	var topMargin = 0;
	var slideTime = 5000;

	var ff = (!document.all && document.getElementById);
	var ie = (document.all);

	function layerObject(id) 
	{
		this.obj = document.getElementById(id).style;
		return this.obj;
	}

	function layerSetup() 
	{
		floatLyr = new layerObject('floatLayer');
		window.setInterval("main()", 10)
	}

	function floatObject() 
	{
		findHt = document.body.clientHeight;
	}

	function main() 
	{
		this.currentY = parseInt(document.getElementById('floatLayer').style.top);		
		this.scrollTop = (ff) ? scrollY : document.body.scrollTop; 
		mainTrigger();		   
	}

	function mainTrigger() {
		var newTargetY = this.scrollTop + this.topMargin;
		if ( this.currentY != newTargetY ) {
			if ( newTargetY != this.targetY ) {
				this.targetY = newTargetY;
				floatStart();
			}
			animator();
			}
		}

	function floatStart() 
	{
		var now = new Date();
		this.A = this.targetY - this.currentY;
		this.B = Math.PI / ( 1 * this.slideTime );
		this.C = now.getTime();
		if (Math.abs(this.A) > this.findHt) 
		{
			this.D = this.A > 0 ? this.targetY - this.findHt : this.targetY + this.findHt;
			this.A = this.A > 0 ? this.findHt : -this.findHt;
		}
		else 
		{
			this.D = this.currentY;
		}
	}

	function animator() 
	{
		var now = new Date();
		var newY = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D;
		newY = Math.round(newY);
		if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) 
		{
			document.getElementById('floatLayer').style.top = newY + "px";
		}
	}
	function start() 
	{
		if(ff) 
		{
			pageWidth = innerWidth;
			pageHeight = innerHeight;
			layerSetup();
			floatObject();
		}
		else
		{
			pageWidth = document.body.clientWidth;
			pageHeight = document.body.clientHeight;
			layerSetup();
			floatObject();
		}
	}