document.write('<DIV id="alcoholic" style="position: absolute; top: 80px">');
document.write('<IMG src=sys/tools/alcoholic_img/drank.gif  WIDTH=50 BORDER=0 >');
document.write('</DIV>');

lastScrollY=0;
function rollimg(){
	var varY = document.body.scrollTop;
	if (varY <= 0){
		varY = document.documentElement.scrollTop;
	}
	percent=.1*(varY-lastScrollY);
	if(percent >0 ){
		percent=Math.ceil(percent);
	}else{
		percent=Math.floor(percent);
	}
	var top = parseInt(document.getElementById("alcoholic").style.top);
	document.getElementById("alcoholic").style.top = (top += percent) + "px";
	lastScrollY += percent;
	if (document.body.clientWidth > 1000){
		document.getElementById("alcoholic").style.left=((document.body.clientWidth/2)+500)+"px";
	}else{
		document.getElementById("alcoholic").style.left=(document.body.clientWidth-50)+"px";
	}
}
window.setInterval("rollimg()",1);
