Assigning variable OnClick random action
<pre><code>var Rand1 = Math.floor(Math.random()*3);
var Rand2 = Rand1;

while ( Rand2 == Rand1 ){
    var Rand2 = Math.floor(Math.random()*3);
}
var step1 = Rand1;
var step2 = Rand2;

function moveto(step1, step2) {
    var w = $(document).width();
    $('#full').animate({
        left: -(step1*w)
    },  {
    duration: 3000,
    });
}

//what element is this supposed to be?
class="img bg-img1" OnClick="moveto('1');"&gt;
</code></pre>

<p>My problem is: I need to assign the random number given by Rand1 into the OnClick="moveto('Rand1');  how do i do that ? </p>
