The reason I ask is because w/2004, the LMS would handle most of that logic for you - you'd simply have to provide very simple selection and randomization parameters in your course metadata.But if you're not going that route, you'd need to generate the logic client-side. One option would be to use JavaScript's Math.random() method. Google "Math.random()" for more specifics....