<script type="text/javascript">
function resize_Image(oX, oY){
resize_X=event.x;
resize_Y=event.y;
event.srcElement.width=resize_X;
event.srcElement.height=resize_Y;
}
</script>
<img src="Image Path" ondrag="resize_Image('800', '600')" width="50px;" height="50px;" />