Not that it would really matter, but
```js
do tipId += ~~(Math.random() * 1000000)
while (document.getElementById(tipId))
```
does the same, requires no semicolon and the double bitwise NOT operator performs slightly better than `Math.floor`, also it's shorter in the minified JS.