var gright=80
var gbottom=50
var vv1 = 4 
var vv2 = 2 

var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;

if(ie) {
	document.all["divBottom"].style.left = document.body.offsetWidth-vv1;
	document.all["divBottom"].style.visibility = "hidden";
}

function makeObj(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.'
	this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')	
	this.moveIt=b_moveIt;
}
function b_moveIt(x,y){
	this.x=x; this.y=y
	this.css.left=this.x
	this.css.top=this.y
}

var pageWidth,pageHeight
function geoInit(){
	oTest=new makeObj('divBottom')
	pageWidth=(ie)?document.body.offsetWidth-vv1:innerWidth;
	pageHeight=(ie)?document.body.offsetHeight-vv2:innerHeight;

	checkIt()

	document.all["divBottom"].style.visibility = "visible";

	//sets the resize handler.
	onresize=resized
//	if(ie) window.onscroll=checkIt;
}

function checkIt(){
	if(ie) {
		oTest.moveIt(pageWidth/2 + 327,document.body.scrollTop+52)
	}
	else if(n){
		oTest.moveIt(pageWidth/2 + 327, window.pageYOffset+pageHeight-gBottom)
		setTimeout('checkIt()',20)
	}
}

function resized(){
	pageWidth=(ie)?document.body.offsetWidth-vv1:innerWidth;
	pageHeight=(ie)?document.body.offsetHeight-vv2:innerHeight;
	if(ie) checkIt()
}

onload=geoInit;