<script language="JavaScript">
   var max = parseInt(window.prompt("How many times?","5"));
   var cnt = 1;
   while (cnt <= max){
     document.write(cnt+" play it again, Sam<br>");
     cnt = cnt+1;
     }
 </script>