Firstly, add a ";" after first line of this :
var s1 = [2, 6, 7, 10]
var s2 = [7, 5, 3, 4];
var s3 = [14, 9, 3, 8];
Secondly, retrieve your values from your database (or from where you want) and fill these arrays dynamically, instead of filling them by hardcoding ;)