Hi all!

in "CreateElement" fails "style" attribute it just doesn`t change the "top" and the "left" of the new element.
Another thing is that in "displayHTML" i don't see the code of the new element.
Anyone can help me, please?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>District</title>
<link rel="stylesheet" href="estilos.css" type="text/css" media="all">
<style type="text/css"></style>
<script type="text/javascript" src=js/main.js></script></script>
<script type="text/javascript">
function CreateBuilding()
{
var newImage = null;
// Try if the IE
if (navigator.appName=="Microsoft Internet Explorer")
{
newImage = document.createElement('<'+'img'+' id="'+'building1'+'"/>');
}
else
{
newImage = document.createElement('img');
newImage.name = "build1";
}
// newImage.setAttribute
newImage.setAttribute('src',"objects/Building_apartments_0.jpg");
newImage.setAttribute('width',"50");
newImage.setAttribute('height',"35");
newImage.setAttribute('style',"position: absolute; left: 20px; width: 50; top: 100px; height: 35");
newImage.onload="style.top:100px;"
document.body.insertBefore(newImage,document.body.childNodes[0]);
Alert(newImage.style);
}
function displayHTML(htmlString)
{
var temp = document.createElement('div');
temp.appendChild( document.createTextNode(htmlString) );
document.getElementById('displayBox').innerHTML = "<pre>" + temp.innerHTML + "</pre>";
}
</script>
</head>
<body>
<script>
CreateBuilding();
</script>
<form>
<input type="button" onclick="displayHTML(document.body.outerHTML)" value="Click here to see HTML" />
</form>
<div id="displayBox"></div>
</body>
</html>