// I hate having to do things in JavaScript that CSS SHOULD be able to do

(function(add, im, h, d, db, dbs, de, dr){
	/*@cc_on @*/
	/*@if(@_jscript_version >= 5)
		function checkResize(){
			if(checkResize.saved && checkResize.saved !== db.getBoundingClientRect().bottom){
				bgp();
				dbs.backgroundImage = 'url(' + im + ')';
			}
			checkResize.saved = db.getBoundingClientRect().bottom;
		}
	@end @*/
	function bg(dc){
		d = document; dc = d.compatMode; db = d.body; dbs = db.style;
		/*@if(@_jscript_version >= 5)
		dr = db.getBoundingClientRect;
		if(/MSIE 7/.test(navigator.appVersion)){
			setInterval(checkResize, 100);
		}
		@end @*/
		de = dc && dc !== 'BackCompat'? d.documentElement : db;
		dbs.backgroundImage = 'url(' + im + ')';
		bgp();
	}
	function bgp(itp){
		itp = Math.max((dr? dr().bottom - dr().top : db.offsetHeight), de.clientHeight) - h;
		dbs.backgroundPosition = '0 ' + itp + 'px';	
	}
	add('load', bg); add('resize', bgp);
})((function(w){
	return w.addEventListener? function(ev, f){
		w.addEventListener(ev, f, false);
	} : w.attachEvent? function(ev, f){
		w.attachEvent('on' + ev, f);
	} : function(){return;};
})(window),
'imgs/bot1.gif', //set path to image
63 //set image height
);