function selectFrom( lowerValue, upperValue ){
var choices = upperValue - lowerValue + 1;
return Math.floor( Math.random() * choices + lowerValue );
}
var num = selectFrom( 2,10 );
alert( num );
05-21 12:24