Javascript functions to simulate random permuted block randomisation within strata - a popular method of balancing treatment groups in clinical trials.
As used at www.sealedenvelope.com/randomisation/simulation
Tests for the current HEAD can be run here.