function Mausklick (e) {
if(flag != null) {
if (document.getElementById('sklalDiv')) {
var d = document.getElementById("test123");
d.style.width = e.clientX - d.offsetLeft + "px" ;
d.style.height = e.clientY - d.offsetTop + "px" ;
document.getElementById("ausgabe").innerHTML = e.clientX + "px" + e.clientY + "px";
}
}
}
function ausfuehren (e) {
e = e||window.event;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
document.onmousemove = Mausklick;
flag = 1;
document.onmouseup = Stop;
}
<img src="status_rot.gif" alt="" onmousedown="ausfuehren(event);" />