random array that randomize only after reload, javascript only
<p>I have created an string array, that hold 6 classes.
The function is called by a button, and for every click a new class i created.
the thing is that when i click the button, i get a randomize class, but if i press the button again. the same class is being displayed and not a random one. If i reload the page, an random class is generated, but as i said, the same class generates when i click again.</p>

<p>This is my random array.</p>

<pre><code>   var Array=["dice dice-side-one",
    "dice dice-side-two",
    "dice dice-side-three",
    "dice dice-side-four",
    "dice dice-side-five",
    "dice dice-side-six",
    "dice dice-side-six"];
    var rand = Array[Math.floor(Math.random() * Array.length)];

    function addDiceEvent() {
        dicesides_func(rand);

    }
}
</code></pre>

<p>I paste the full function if the problem is there somewhere.</p>

<pre><code> function AddEvent(){
        var AddEvent = "add";
        var addClassArr= document.getElementsByClassName(AddEvent);
        for(var i=0; i&lt;addClassArr.length; i++){
            var addClass = addClassArr[i];
            addClass.addEventListener("click", addDiceEvent, true);
        }
        var Array=["dice dice-side-one",
        "dice dice-side-two",
        "dice dice-side-three",
        "dice dice-side-four",
        "dice dice-side-five",
        "dice dice-side-six",
        "dice dice-side-six"];
        var rand = Array[Math.floor(Math.random() * Array.length)];

        function addDiceEvent() {
            dicesides_func(rand);

        }
    }
    AddEvent();
</code></pre>
