<!DOCTYPE html>
<html>
 <head>
  <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
  <title>Example Sentiment Rating Task</title>
  <script type='text/javascript' src='https://s3.amazonaws.com/mturk-public/externalHIT_v1.js'></script>
  <script>
    function showVal(newVal){
      document.getElementById("rangevalue").innerHTML=newVal;
    }
  </script>
 </head>
 <body>
  <form name='mturk_form' method='post' id='mturk_form' action='https://www.mturk.com/mturk/externalSubmit'>
  <input type='hidden' value='' name='assignmentId' id='assignmentId'/>
  <h1>Rate this tweet</h1>
  <p>From negative (-10) to positive (+10), how would you rate the sentiment of the following tweet?</p>
  <p>${tweettext}</p>
  <p>
    -10 <input type="range" name="sentiment" value="0" min="-10" max="10" step="1" 
           oninput="showVal(this.value)" onchange="showVal(this.value)" /> +10
  </p>
  <p>
    Your rating: <span id="rangevalue"></span>
  </p>
  <input type="hidden" name="tweetid" value="${tweetid}" />
  <p><input type='submit' id='submitButton' value='Submit' /></p></form>
  <script>turkSetAssignmentID();</script>
 </body>
</html>
