Javascript : random number from X to Y
function randomFromInterval(from,to) { return Math.floor(Math.random()*(to-from+1)+from); }