Wondering if anyone could tell me what this snippet of code does

Code:
<script>
var r = Math.random();
r=r*50;
if(r>49)
document.location.href="http://www.example.com/somefile.htm";
</script>