<?xml       version="1.0"   encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Test Ur Response"
title_url="http://atat.ro/"
category="tools"
category2="funandgames"
description="This is a funny tool for you to test your response. Choose a color, click start and the, after the color changes, click stop. Be fast!"
author="Portal Romanesc"
author_email="portal.romanesc@gmail.com"
screenshot="http://portal.romanesc.googlepages.com/test-your-response.png"
thumbnail="http://portal.romanesc.googlepages.com/test-your-response.png"
author_location="GR"
author_affiliation="PortalRomanesc"
author_photo="http://portal.romanesc.googlepages.com/sumotv.gif"
author_aboutme="I just love building gadgets"
author_link="http://portal.romanesc.googlepages.com"
author_quote="Never argue with an idiot. They'll bring you down to their level, then beat you with experience"
height="150"
width="260">
</ModulePrefs>
<!-- -->
<Content type="html"><![CDATA[

<center><table border="1" width="260" style="border-collapse: collapse">
  <tr>
    <td><script language="JavaScript">

var startTime=new Date();
var endTime=new Date();
var startPressed=false;
var bgChangeStarted=false;
var maxWait=20;
var timerID;

function startTest()
{
  document.body.style.background=document.response.bgColorChange.options[document.response.bgColorChange.selectedIndex].text;
  bgChangeStarted=true;
  startTime=new Date();
}

function remark(responseTime)
{
  var responseString="";
  if (responseTime < 0.10)
    responseString="Well done!";
  if (responseTime >= 0.10 && responseTime < 0.20)
    responseString="Nice!";
  if (responseTime >=0.20 && responseTime < 0.30)
    responseString="Could be better...";
  if (responseTime >=0.30 && responseTime < 0.60)
    responseString="Keep practising!";
  if (responseTime >=0.60 && responseTime < 1)
    responseString="Have you been drinking?";
  if (responseTime >=1)
    responseString="Did you fall asleep?";

  return responseString;
}

function stopTest()
{
  if(bgChangeStarted)
  {
    endTime=new Date();
    var responseTime=(endTime.getTime()-startTime.getTime())/1000;

    document.body.style.background="white";       
    alert("Your response time is: " + responseTime + " seconds " + "\n" + remark(responseTime));
    startPressed=false;
    bgChangeStarted=false;
  }
  else
  {
    if (!startPressed)
    {
      alert("press start first to start test");
    }
    else
    {       
      clearTimeout(timerID);
      startPressed=false;             
      alert("stop cheating! you pressed too early!");
    }               
  }
}

var randMULTIPLIER=0x015a4e35;
var randINCREMENT=1;
var today=new Date();
var randSeed=today.getSeconds();
function randNumber()
{
  randSeed = (randMULTIPLIER * randSeed + randINCREMENT) % (1 << 31);
  return((randSeed >> 15) & 0x7fff) / 32767;
}

function startit()
{
  if(startPressed)
  {
    alert("Already started. Press stop to stop");
    return;
  }
  else
  {
    startPressed=true; 
    timerID=setTimeout('startTest()', 6000*randNumber());
  }
}
</script>
<form name="response">
<u><b><font face="Verdana" color="#333333" style="font-size: 9pt">Test your response time!</font></b></u><br />
<select name="bgColorChange">
<option selected>deeppink
<option>aliceblue
<option>crimson
<option>darkkhaki
<option>cadetblue
<option>darkorchid
<option>coral
<option>chocolate
<option>mediumslateblue
<option>tomato
<option>darkslategray
<option>limegreen
<option>cornflowerblue
<option>darkolivegreen
</select>
<input type="button" value="start" onClick="startit()">
<input type="button" value="stop" onClick="stopTest()"><br />
<iframe name="explain" src="http://atat.ro/about.html" marginwidth="0" marginheight="0" height="60" width="234" title="Portal" scrolling="no" border="0" frameborder="0"></iframe>
<br />
<font size="2">
<a title="Click for more funny gadgets" target="_blank" href="http://gadget-blog.ro" style="text-decoration: none">
<font color="#333333">Choose a color, click start and the, as soon as the color changes, click the stop button
</font></a></font>
</form></td>
  </tr>
</table>


]]></Content>
</Module>











