// Puts a floating "Back to top" box/link at the bottom right of every page
// From Bak2Top v1.6 by MaxxBlade www.maxxblade.co.uk/bak2top
// Because Home key, Page Up key, up arrow, scroll bar, middle mouse button, or Shift-Spacebar are not enough

var b2tx=230;
var b2ty=50;
var b2th='<nobr>Top of Page</nobr>';

function b2x() {
	return ((moz)? window.innerWidth - 20 : document.body.clientWidth) - b2tx;
}

function b2y() {
	return ((moz) ? window.innerHeight : document.body.clientHeight) + b2o() - b2ty;
}

function b2o() {
	return (moz) ? window.pageYOffset : document.body.scrollTop;
}

function b2t() {
	with(document.getElementById('bttl').style) {
		left = ((b2o() < 1) ? -500 : b2x()) + 'px';
		top = ((b2o() < 1) ? -500 : b2y()) + 'px';
	}
	setTimeout('b2t()', 99);
}

var moz = (document.getElementById && !document.all) ? 1 : 0;
document.write('<div id="bttl" class="bak2top" style="position:absolute"><a style="cursor:' + ((moz) ? 'pointer' : 'hand') + '" onclick="JavaScript:scrollTo(0,0)">' + b2th + '</a></div>');
b2t();

