var elem = document.getElementById(id);
document.write(elem.innerHTML);

