Use dom manipulation rather than write and writeln to insert HTML, Fixes overwrite when used after page load (In Ajax)