initial javascript stuff