add css and javascript to system, and protection from the infamous docum...

...ent.write