you need to set the containing div's overflow to hidden, otherwise it will stretch to accommodate the contents.
But the whole thing seems weird to me. I'd do it more like this:
Code:
<body>
<div id="screen" name="uuuu" style="width:600px;height:500px;overflow:hidden"></div>
<script type="text/javascript">
function drawImges(thediv,id,path, width, height){
var newImage = new Image(),img;
newImage.onload=function () {
img=document.createElement('IMG');
img.id=id;
img.src=path;
img.style.width = width + "px";
img.style.height = height + "px";
document.getElementById(thediv).appendChild(img)
}
newImage.src= path;
}
drawImges("screen", "img1","imges/001.jpg",800,800);
</script>
</body>