//window.onscroll = WindScroll;
window.onresize = WindReset;
window.onload = WindScroll;


function WindScroll()
{
LayerFloatingBn.style.left = standard_table.offsetLeft + 0;
LayerFloatingBn.style.top = standard_table.offsetTop+227 ;
LayerFloatingBn1.style.left = standard_table.offsetLeft - 87;
LayerFloatingBn1.style.top = standard_table.offsetTop ;
LayerFloatingBn_special.style.left = standard_table.offsetLeft + 0;
LayerFloatingBn_special.style.top = standard_table.offsetTop ;
LayerFloatingBn_special.style.visibility = "visible";
LayerFloatingBn.style.visibility = "visible";
LayerFloatingBn1.style.visibility = "visible";
	
check_scrollmove();
	
//check_scrollmove2();	
//imgStatus();

//start_floate(start_num)
}

function WindReset()
{
	LayerFloatingBn.style.left = standard_table.offsetLeft + 0;
	LayerFloatingBn.style.top = standard_table.offsetTop+227;
	LayerFloatingBn1.style.left = standard_table.offsetLeft - 87;
	LayerFloatingBn1.style.top = standard_table.offsetTop;
	LayerFloatingBn_special.style.left = standard_table.offsetLeft + 0;
	LayerFloatingBn_special.style.top = standard_table.offsetTop ;
	
	//imgStatus();
}

var scroll_pixel,div_pixel,gtpos,gbpos,loop,loop2, moving_spd;
var speed2 = 1;           /// setTimeoutÀ» À§ÇÑ ¼Óµµ ¼³Á¤

function check_scrollmove()
{

	if (document.body.scrollTop <=standard_table.offsetTop+227)
	{
	
		var top_margin1 = standard_table.offsetTop+227;         /// Ã¢ÀÇ ¸ÇÀ§¿ÍÀÇ ¿©¹é ³»·Á¿Ã¶§
		var top_margin1_2 = standard_table.offsetTop+227;      /// Ã¢ÀÇ ¸ÇÀ§¿ÍÀÇ ¿©¹é ¿Ã¶ó¿Ã¶§
		var speed = 5;            /// Á¡Â÷ ÁÙ¾îµå´Â ¼Óµµ¸¦ À§ÇÑ ¼³Á¤

		gtpos = document.body.scrollTop+top_margin1;
		gbpos = document.body.scrollTop+top_margin1_2;
			
		if(parseInt(document.getElementById('LayerFloatingBn').style.top,10) < gtpos)
		{
			document.getElementById('LayerFloatingBn').style.top = standard_table.offsetTop+227 ;
		}
		if(parseInt(document.getElementById('LayerFloatingBn').style.top,10) > gtpos)
		{
			 moving_spd = Math.ceil(Math.abs(LayerFloatingBn.style.pixelTop-gtpos)/speed);
			 document.getElementById('LayerFloatingBn').style.top = parseInt(document.getElementById('LayerFloatingBn').style.top,10) - moving_spd;
		}

		loop = setTimeout("check_scrollmove()",speed2);

	}else{
	
		var top_margin1 = 0;         /// Ã¢ÀÇ ¸ÇÀ§¿ÍÀÇ ¿©¹é ³»·Á¿Ã¶§
		var top_margin1_2 = 10;      /// Ã¢ÀÇ ¸ÇÀ§¿ÍÀÇ ¿©¹é ¿Ã¶ó¿Ã¶§
		var speed = 8;            /// Á¡Â÷ ÁÙ¾îµå´Â ¼Óµµ¸¦ À§ÇÑ ¼³Á¤

		gtpos = document.body.scrollTop+top_margin1;
		gbpos = document.body.scrollTop+top_margin1_2;

		if(parseInt(document.getElementById('LayerFloatingBn').style.top,10) < gtpos)
		{
			 moving_spd = Math.ceil(Math.abs(gbpos-LayerFloatingBn.style.pixelTop)/speed);
			 document.getElementById('LayerFloatingBn').style.top = parseInt(document.getElementById('LayerFloatingBn').style.top,10) + moving_spd;
		}
		if(parseInt(document.getElementById('LayerFloatingBn').style.top,10) > gtpos)
		{
			 moving_spd = Math.ceil(Math.abs(LayerFloatingBn.style.pixelTop-gtpos)/speed);
			 document.getElementById('LayerFloatingBn').style.top = parseInt(document.getElementById('LayerFloatingBn').style.top,10) - moving_spd;
		}

		loop = setTimeout("check_scrollmove()",speed2);
	}

}
