var count = 10; function ImgResize(Img) {count = Counting(count); Resize(Img,count); return false;} function Counting(count){ if (event.wheelDelta >= 120) count++; else if (event.wheelDelta <= -120) count--; return count; } function Resize(Img,count){ Img.style.zoom = count + '0%';}