var timerRunning = null;

function getInnerDim(){

	var height, width;

	if (document.all)
	    height = document.body.offsetHeight, width = document.body.offsetWidth;
	else if (document.layers)
	    height = window.innerHeight, width = window.innerWidth;

	dim = new Array();
	dim["width"] = width;
	dim["height"] = height;
	
	return dim;
}

function stopPos(){

	if(timerRunning)
		clearTimeout(rePosition);

	timerRunning = false;

}

function startPos(){
	stopPos();
	positionBottom();
}


function positionBottom(){

	var screen = getInnerDim();
	var scrollAmt;
	var offset;	
	
	if(document.all){
	
		scrollAmt = document.body.scrollTop - 4;
		
		offset = scrollAmt - bottombar.offsetHeight;
		
		bottombar.style.top = screen["height"] + offset;	
	
	}else if(document.layers){
	
		scrollAmt = window.pageYOffset - 3;
		
		offset = scrollAmt - document.layers['bottombar'].document.height;
		
		document.layers.bottombar.top = screen["height"] + offset;
	
	}
	
	rePosition = setTimeout("positionBottom()",500);
	timerRunning = true;

}


