Minemaker

Code for the browser mine maker

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Insert title here</title>
       <script type="text/javascript">
          function buildMine(){
             var marker  = document.getElementById('output');
             var input =  document.getElementById('input').value;
             var myIds = input.split(",");
             var output = "";
                for(var i=0; i<myIds.length; i++){
                     output += '<a href="http://magistream.com/creature/'+myIds[i]+'"> ♦ </a>';
                   if((i+1)%50==0 && i>1){
                      output += '<br />';
                   }
                   if((i+1)%200==0 && i>1){
                      output += '<br />'
                   }
            if((i+1)%600==0 && i>1){
                      output += '<img src="http://imagefreegoldmine.wdfiles.com/local--files/divider/minedivider" border="0" alt="divider"></a><br /><br />'
                   }

                }
                marker.value = output;
          }
       </script>
    </head>
    <body>

    <textarea rows="10" cols="60" name="ids" id="input"></textarea><br />
    <input type="button" name="submit" value="Baue Links" onclick="buildMine();">
    <br />
    <br />
    <textarea rows="10" cols="60" name="ids" id="output"></textarea>

    </div>

    </html>