HAllo!
Mein Script besteht aus 2 teilen, einmal die Zufalls Funktion
function GetRandom( min, max ) {
if( min > max ) {
return( -1 );
}
if( min == max ) {
return( min );
}
return( min + parseInt( Math.random() * ( max-min+1 ) ) );
}
Tipp: du solltest vielleicht mal folgendes lesen: http://aktuell.de.selfhtml.org/weblog/javascript-zufallszahlen