I have a site with different message-boxes. The heads of these boxes should always have a different random color. In order to prevent messages next to each other having the same color, I use `splice` to remove the used colors from the array `colors`. At some point the array `colors` will be empty, which is why the remaining boxes will have no color. How can I "refill" the array, so every element gets a random color?

Here is my page: <http://www.tdvk.de/>.
Yellow is the default head color.

```
function selectColor() {
    var random = Math.floor(Math.random() * colors.length);
    return colors.splice( random, 1 )[0];
}

var colors = [ "rgb(199, 179, 78)", "rgb(127, 195, 133)", "rgb(102, 169, 162)", "rgb(132, 122, 224)" ];

var i = 0;

while ( i != colors.length ) {
    $( "tr" ).each(function(i) {
        var head = $( ".msgHead", this );
        head.css( "background-color", selectColor() );
        i++;
    });
}

if { i = colors.length ) {
    /* reset array and continue */
}

```