A javascript to create a slot select table