Thousands Separator
var price = Math.floor(price) + '';
price = price.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 ');
function sep(n){return n.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g,'$1 ');}
function rmm(min,max){return Math.floor(Math.random()*(max-min+1))+min;}