/*
document.write("<div id='top_b' style='position:absolute;  visibility:show; left:950px;'>				");	
document.write("		<a href='#top'>																	");
document.write("	<img src='images/go_totop.gif' border='0'></a>			");
document.write("</div>																					");

function top_b()
{
	document.all.top_b.style.pixelTop = document.body.clientHeight + document.body.scrollTop - 300;
}

function right_top_controll()
{
	document.all.top_b.style.pixelTop = document.body.clientHeight - 300;
}

function top_init()
{
	document.all.top_b.style.pixelTop = document.body.clientHeight - 300;
}

setInterval("top_b()",300);
onresize = right_top_controll;
*/

document.write("<div id=floater			");
document.write("style='Z-INDEX: 1; VISIBILITY: visible; WIDTH: 15px; POSITION: absolute; HEIGHT: 150px'>		");
document.write("  <table width='30' border='0' cellspacing='0' cellpadding='0'>		");
document.write("    <tr>		");
document.write("      <td><a		");
document.write("onFocus=this.blur() href='javascript:GoTop();'><img			");
document.write("src='images/go_totop.gif' border=0></a></td>		");
document.write("    </tr>		");
document.write("  </table>		");
document.write("</div>		");


function GoTop() {
	window.scrollTo(0,0);
}

function GoTop_Call() {
	document.body.ondblclick = Top;	
}


var Xpos = 0;
var Ypos = 0;
var Ygravity = 0.85;
var scrollPos = 0;
var oldScrollPos = 0;


function FloatMenu() {
docWidth = document.body.clientWidth; // Update document width
docHeight = document.body.clientHeight; // Update document height
oldScrollPos = scrollPos;
scrollPos = document.body.scrollTop; // Update scrollbar position

//Xpos = 900;
//Xpos = (docWidth - floater.offsetWidth) - 10; //
Xpos = (docWidth / 2) + 450; //
Yboundary = ((scrollPos + docHeight) - floater.offsetHeight) - 100; //

if (floater.offsetTop < Yboundary - 1) // Object is behind boundary
Ypos += 2;

if (floater.offsetTop > Yboundary + 1) // Object is past boundary
Ypos -= 1;

Ypos *= Ygravity; // Slow object down

floater.style.pixelLeft = Xpos;
floater.style.pixelTop += Ypos; // Make object bounce
}

window.setInterval("FloatMenu()", 1); //
