<!doctype html>

<html>
	<head>
		<title>CompCog Psychology Experiment</title>
	    <script src="static/lib/jquery-min.js" type="text/javascript"></script>
	    <script src="static/lib/bootstrap-min.js"></script>
	    <link rel="stylesheet" href="static/css/bootstrap.min.css">
	    <link rel="stylesheet" type="text/css" href="static/css/style.css" media="screen" />
	</head>
	<body>
	<div class="container-flex" id="container-flyer">
	  <h1>psiTurk Experiment</h1>
		<p>Begin by viewing the <a href="#" id="ad-href">ad</a>.</p>
	    <script type="text/javascript">
			function makeid()
			{
			    var text = "";
			    var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

			    for( var i=0; i < 5; i++ )
			        text += possible.charAt(Math.floor(Math.random() * possible.length));

			    return text;
			}

			var assignmentId = "debug" + makeid();
			var hitId = "debug" + makeid();
			var workerId = "debug" + makeid();
			var href = "/ad?assignmentId=" + assignmentId + "&hitId=" + hitId + "&workerId=" + workerId + "&mode=debug"

			$("#ad-href").attr("href", href);
	    </script>
	</div>
	</body>
</html>
