<html>
   <head><title>Homework Six</title></head>
   <body bgcolor=white>
   <script>
     countries = new Array("Spain", "Italy", "China", "United States"); 
     i = 0;      
     function process() {
       answer = document.alpha.answer.value;
       if (answer == countries[i]) {
         alert("Good."); 
       } else {
         alert("Bad."); 
       } 
       i = (i + 1) % countries.length; 
       document.getElementById("country").innerHTML = 
         '<img src="http://silo.cs.indiana.edu:13516/images/' + 
         countries[i] + '.png">';
     } 
   </script>    

   <form name="alpha">
     You are looking at 

     <span id="country"></span>. <p> 

     Please enter the name here: <input type="text" name="answer"> <p> 
     Push <input type="button" 
                 value="Proceed" 
                 onClick="process()"> when ready. 
   </form>
   <script>
     document.getElementById("country").innerHTML = 
       '<img src="http://silo.cs.indiana.edu:13516/images/' + 
       countries[i] + '.png">';   </script> 
   </body>
</html>