Все гоcпода, все таки смог разобраться
Просто не знал про событие
onmousewheel
var wrapper, block, point2 = false;
window.onload = function(){
wrapper = document.getElementsByClassName("wrapper").item(0);
block = document.getElementsByClassName("block").item(0);
wrapper.onmouseover = function(){point2=true;test_out();}
wrapper.onmouseout = function(){point2=false;test_out();}
wrapper.onmousewheel = mouseScrollBlock;
}
function mouseScrollBlock(e){
if(point2){
scrollTop+=-e.deltaY;
if(scrollTop>0) scrollTop = 0;
if(scrollTop<-(block.offsetHeight-wrapper.offsetHeight))
scrollTop = -(block.offsetHeight-wrapper.offsetHeight);
block.style.marginTop = scrollTop+"px";
test_out();
}
}