Javascript online draw