Is there a function like document.getElementById(\"FirstDiv\").clear()?
document.getElementById(\"FirstDiv\").clear()
You should probably use a JavaScript library to do things like this.
For example, MochiKit has a function removeElement, and jQuery has remove.