Works fine:
var obj = document.createElement('div');
obj.id = "::img";
obj.style.cssText="position:absolute;top:300px;left:300px;width:200px;height:200px;-moz-border-radius:100px;border:1px solid #ddd;-moz-box-shadow: 0px 0px 8px #fff;display:none;";
document.getElementById("divInsteadOfDocument.Write").appendChild(obj);
You can also see how to set the the CSS in one go (using element.style.cssText).
I suggest you use some more meaningful variable names and don’t use the same name for different elements. It looks like you are using obj for different elements (overwriting the value in the function) and this can be confusing.