function floatMenu() {	
	var headerHeight = 290;
	var footerHeight = 200;
	
	var menuElement = document.getElementById('floating_menu');	
	var menuTop = parseInt(menuElement.style.top.split("px")[0]);
	var scrollTop = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
	
	if( !menuTop || isNaN(menuTop) ) menuTop = 0;
	
	var dy = scrollTop - menuTop - headerHeight;
	if(scrollTop < headerHeight) dy = headerHeight - menuTop - headerHeight;
	else if( scrollTop > document.body.scrollHeight - menuElement.scrollHeight ) dy = document.body.headerHeight - (menuElement.headerHeight*2) - footerHeight;
		
	var newy = menuTop + (dy/5);
	menuElement.style.top = newy + "px";
	
	setTimeout("floatMenu()", 20);
}
