Code:

<script type = "text/javascript">
function rnd_snd() {
return (Math.random()*2-1)+(Math.random()*2-1)+(Math.random()*2-1);
}
// Three random numbers between -1 and 1 added together. That will give a normal distribution with mean = 0 and standard deviation = 1.
// The function will return a decimal with an average value of 0.
function rnd(mean, stdev) {
return Math.round(rnd_snd()*stdev + mean);
}
// Multiply the result by the standard deviation that you want, then add your desired mean.
alert (rnd(38,2)) // mean, standard deviation
</script>

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.