function locateBar(){
	var screenHeight = parseInt(document.getElementById("BaseDivision").clientHeight);
	var offset;
	if (screenHeight > 691){
		document.getElementById("BottomBarIndexPreload").style.bottom = "0px";
	} else {
		offset = screenHeight - 691;
		document.getElementById("BottomBarIndexPreload").style.bottom = offset + "px";
	}
}
window.onload = locateBar;
window.onresize = locateBar;

function getInitialBarLocation(){
	var screenHeight = parseInt(document.getElementById("BaseDivision").clientHeight);
	var offset;
	if (screenHeight > 691){
		return '<div id="BottomBarIndexPreload" style="position:absolute; bottom:0px;">';
	} else {
		offset = screenHeight - 691;
		offset += "px";
		return '<div id="BottomBarIndexPreload" style="position:absolute; bottom:' + offset + ';">';
	}
}
document.write(getInitialBarLocation());
