Random interval for wave effect

Hey,

I made a semi-sinewave effect (view attachment) and it works fine with one exception. I want for it to wave on random intervals (from 1-15 seconds) instead of continuously, but I can’t get it working right. Here’s the code:

[AS]
pts = 5;
sine = 0;
apart = Stage.width/pts;
bottom = Stage.height;
wlen = bottom/2;
_root.onEnterFrame = function() {
this.clear();
this.beginFill(0x0066CC, 100);
this.moveTo(0, bottom);
for (i=1; i<=pts; i++) {
px = aparti;
py = wlen+Math.sin(sine
wlen)*12;
this.lineTo(px, py);
sine += 0.082;
}
this.lineTo(px, bottom);
this.lineTo(0, bottom);
this.endFill();
};
[/AS]
Anyone know how to fix this?

Thanks in advance :ne: