<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Adjective or Adverb Game - RJM Programming - October, 2015</title>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<script type='text/javascript'>

var theword="";

var example="";
var idea="";

var icat=0;
var categories=["Adjective or Adverb Grammar","Film and Television","Science","Music","General Knowledge"];

var playernamea=["Player1of5","Player2of5","Player3of5","Player4of5","Player5of5++"];

var category="Adjective or Adverb Grammar";
var curq=2;

var yygoes=0;

var pdate="";
var pyear="";
var pmonth="";
var pday="";
var pepisode="";
var phpexists=false;
var askdef="";

var qanda=[
"Adjective or Adverb Grammar","2nd",
"It's getting late now.\n\nCan 'late' be an ...?","#Adjective,#Adverb,Both","That was 'late' as an adverb.\n\nHere's an example of the use of 'late' as an adjective.\n\nIn the late afternoon we dined.","#Adjective,#Adverb,Both",
"The 'Sydney Morning Herald' is a daily paper.\n\nCan 'daily' be an ...?","#Adjective,#Adverb,Both","That was 'daily' as an adjective.\n\nHere's an example of the use of 'daily' as an adverb.\n\nThe windows are inspected twice daily.","#Adjective,#Adverb,Both",
"That woman is a lovely and friendly and lively person but she seems lonely.\n\nCan 'lovely and friendly and lively and lonely' be ...?","Adjective,#Adverb,#Both","","",
"It's not likely that your offspring will be ugly.\n\nCan 'likely and ugly' be ...?","Adjective,#Adverb,#Both","","",
"The milkman's early.\n\nCan 'early' be an ...?","#Adjective,#Adverb,Both","That was 'early' as an adverb.\n\nHere's an example of the use of 'early' as an adjective.\n\nOn the early train the passengers read a lot.","#Adjective,#Adverb,Both",
"They speak very well.\n\nCan 'well' be an ...?","#Adjective,#Adverb,Both","That was 'well' as an adverb.\n\nHere's an example of the use of 'well' as an adjective.\n\nI'm very well today, thanks.","#Adjective,#Adverb,Both",
"The monthly meeting just finished.\n\nCan 'monthly' be an ...?","#Adjective,#Adverb,Both","That was 'monthly' as an adjective.\n\nHere's an example of the use of 'monthly' as an adverb.\n\nWe receive a report monthly.","#Adjective,#Adverb,Both",
"You speak so loud.\n\nCan 'loud' be an ...?","#Adjective,#Adverb,Both","That was 'loud' as an adverb.\n\nHere's an example of the use of 'loud' as an adjective.\n\nLoud noises scare the cat.","#Adjective,#Adverb,Both",
"Did you see that fast car?.\n\nCan 'fast' be an ...?","#Adjective,#Adverb,Both","That was 'fast' as an adjective.\n\nHere's an example of the use of 'fast' as an adverb.\n\nYou drive fast when there is no traffic.","#Adjective,#Adverb,Both",
"At times you can be so silly.\n\nCan 'silly' be ...?","Adjective,#Adverb,#Both","","",
"If you want me to work hard then you need to motivate me.\n\nCan 'hard' be an ...?","#Adjective,#Adverb,Both","That was 'hard' as an adverb.\n\nHere's an example of the use of 'hard' as an adjective.\n\nThat child is so hard to live with.","#Adjective,#Adverb,Both",
"That action was very cowardly.\n\nCan 'cowardly' be ...?","Adjective,#Adverb,#Both","","",
"In that bottle there is deadly poison.\n\nCan 'deadly' be ...?","Adjective,#Adverb,#Both","","",
"Filling in income tax forms is a yearly occurrence.\n\nCan 'yearly' be an ...?","#Adjective,#Adverb,Both","That was 'yearly' as an adjective.\n\nHere's an example of the use of 'yearly' as an adverb.\n\nThat distribution occurs yearly.","#Adjective,#Adverb,Both",
"Sudden Death"
];

var sayitc="";

var score=0;

var escore=0, egoes=0;
var yscore=0, ygoes=0;

var dotime=-1;
var dotimer=null;

var listofsolved=",";

var thescore=0;
var scoregoes=0;
var goes=14; //sentences.length;

var thesentence=-1;
var answer1="", answer1or="";
var answer2="", answer2or="";
var vs1="", vs1or="";
var vs2="", vs2or="";

var gtw=null;
var gtwd=null;

var x=0.0, y=0.0;
var wordposlist=";";

var langis='en';

var words=new Array();

var fromtext="Please select a broadcast below ...";
var totext="Please select a broadcast below ...";

var inboxurl="";
var outboxurl="";

var identity="";
var datetimebit="";
var subject="";

var cf = "18px Courier New";

var stcmd=new Array();
var numcmd=0;
var thiscmd=0;

var ourcword="";

var listenurl="";

var delim='';

var elem, which=0, ie, elemLeft=0, elemTop=0, context=null;

var answera=["","",""];
var correctone=-1;
var selectedone=-1;
var whosego="Player1of5";

function pick(cwhat) {
return cwhat;
}

function checkanswer(tval) {
assessyours(tval);
}

function sayit() {
//alert(sayitc);
location.href='./present_perfect_progressive_or_simple_or_non_progressive.html';
}

function skipit() {
if (eval(1 + score) < eval(goes)) {
var prevsentence=thesentence;
document.getElementById('answer').value='';
thesentence=eval(Math.floor(Math.random() * eval(sentences.length)) + 0);
while (listofsolved.indexOf("," + thesentence + ",") != -1 && eval(thesentence) != eval(prevsentence)) {
thesentence=eval(Math.floor(Math.random() * eval(sentences.length)) + 0);
}
if (1 == 2) listofsolved+=thesentence + ",";
document.getElementById('words').value=amend(sentences[thesentence]);
drawsomewords(document.getElementById('words').value);
document.getElementById('answer').focus();
setTimeout(atf,400);
}
}

function atf() {
document.getElementById('answer').focus();
}

function amend(instuff) {
var outstuff=instuff;
answer1="";
answer2="";
answer1or="";
answer2or="";
vs1="";
vs2="";
vs1or="";
vs2or="";
var sparts=instuff.split(";"), sbits, xbits, presbits;
if (sparts.length > 1) {
presbits=sparts[0].split("(");
vs1="(" + presbits[eval(-1 + presbits.length)].replace(/_/g, " ") + ")";
sbits=sparts[1].split(")");
outstuff=outstuff.replace(";" + sbits[0], "");
xbits=sbits[0].split("/");
answer1=xbits[0].replace(/_/g, " ");
if (xbits.length > 1) answer1or=xbits[1].replace(/_/g, " ");
}
if (sparts.length > 2) {
presbits=sparts[1].split("(");
vs2="(" + presbits[eval(-1 + presbits.length)].replace(/_/g, " ") + ")";;
sbits=sparts[2].split(")");
outstuff=outstuff.replace(";" + sbits[0], "");
xbits=sbits[0].split("/");
answer2=xbits[0].replace(/_/g, " ");
if (xbits.length > 1) answer2or=xbits[1].replace(/_/g, " ");
}
return outstuff.replace(/_/g, " ");
}

function whatistheword(thex, they) {
var thewlist, theclist, xword="", swords;
thewordis="";
ourcword="";
if (wordposlist != ";") {
thewlist=wordposlist.split(";");
for (var ij=0; ij<thewlist.length; ij++) {
if (thewlist[ij] != "") {
theclist=thewlist[ij].split(",");
if (theclist.length >= 5) {
xword=thewlist[ij].replace(theclist[0] + "," + theclist[1] + "," + theclist[2] + "," + theclist[3] + ",", "");
if (ourcword == "" && eval(thex) >= eval(theclist[0]) && eval(thex) <= eval(theclist[2]) && eval(they) >= eval(theclist[1]) && eval(they) <= eval(theclist[3])) {
//alert(xword);
swords=xword.split(",");
ourcword=swords[0].replace(/_/g, " ");
document.getElementById('answer').value=ourcword;
//if (gtwd != null) gtwd.close();
//gtwd=window.open('http://www.thefreedictionary.com/' + ourcword, 'Dictionary ' + ourcword, "top=100,left=550,width=400,height=400");
//if (gtw != null) gtw.close();
//gtw=window.open('http://translate.google.com/translate_tts?tl=' + langis + '&q=' + ourcword, ourcword, "top=100,left=5,width=400,height=400");
//if (document.getElementById('langis').value == 'en') {
//gtw=window.open('http://translate.google.com/translate_tts?tl=en&q=' + ourcword, ourcword, "top=100,left=5,width=400,height=400");
//} else {
//gtw=window.open('https://translate.google.com/#en/' + document.getElementById('langis').value + '/' + ourcword, ourcword, "top=100,left=5,width=800,height=400");
//}
}
}
}
}
}
return thewordis;
}

function doslowly() {
if (eval(thiscmd) < eval(numcmd)) {
eval(stcmd[thiscmd]);
thiscmd++;
setTimeout(doslowly, 103);
}
}

function eachsec() {
dotime++;
var bthis=" ";
var wthis=dotime + " seconds elapsed ... Score: " + score + " Of: " + goes + " solved so far";
context.clearRect(0, 340, elem.width, elem.height);
context.strokeText(bthis.substring(0, wthis.length),5,350);
context.strokeText(dotime + " seconds elapsed ... Score: " + score + " Of: " + goes + " solved so far",5,350);
}

function deriveanswers(via) {
var outvia=via;
var ji, iis=2, ws, delim="";
var tlines=via.split("\n");
if (tlines.length >= 3) {
correctone=-1;
selectedone=-1;
for (var ij=eval(-1 + tlines.length); ij>=0; ij--) {
if (tlines[ij] != "" && iis >= 0) {
if (tlines[ij].indexOf("#") == 0) {
answera[iis]=tlines[ij].replace("#","");
outvia=outvia.replace(tlines[ij], answera[iis]);
answera[iis]=answera[iis].replace(/_/g," ");
iis--;
} else if (tlines[ij].indexOf("*") == 0) {
ws=tlines[ij].replace(/_/g," ").replace("*","").split(" ");
answera[iis]="";
delim="";
for (ji=0; ji<ws.length; ji++) {
answera[iis]+=delim + ws[ji].substring(0,1).toUpperCase();
if (ws[ji].length > 1) answera[iis]+=ws[ji].substring(1);
delim=" ";
}
outvia=outvia.replace(tlines[ij], answera[iis]);
answera[iis]=answera[iis].replace(/_/g," ");
if (whosego != "Player1of5") selectedone=iis;
iis--;
} else if (tlines[ij] == tlines[ij].toLowerCase()) {
ws=tlines[ij].replace(/_/g," ").split(" ");
answera[iis]="";
delim="";
for (ji=0; ji<ws.length; ji++) {
answera[iis]+=delim + ws[ji].substring(0,1).toUpperCase();
if (ws[ji].length > 1) answera[iis]+=ws[ji].substring(1);
delim=" ";
}
outvia=outvia.replace(tlines[ij], answera[iis]);
answera[iis]=answera[iis].replace(/_/g," ");
iis--;
} else {
answera[iis]=tlines[ij].replace(/_/g," ");
correctone=iis;
if (whosego != "Player1of5" && selectedone < 0) selectedone = iis;
iis--;
}
}
}
}
if (whosego != "Player1of5" && selectedone >= 0) {
//document.getElementById('eanswer').value=answera[selectedone];
setTimeout(pretheiranswer, 10000);
setTimeout(theiranswer, 14000);
}
return outvia;
}

function youranswer() {
if (whosego != "Player1of5" && selectedone >= 0) document.getElementById('answer').value=answera[selectedone];
}

function pretheiranswer() {
if (whosego != "Player1of5" && selectedone >= 0) {
document.getElementById('eanswer').value=answera[selectedone];
}
}

function theiranswer() {
if (whosego != "Player1of5" && selectedone >= 0) {
document.getElementById('eanswer').value=answera[selectedone];
assessit(answera[selectedone]);
}
}

function drawsomewords(somewords) {
var thisline="",thewords=somewords.replace(/<br>\\n/g, "\\n").replace(" "," ").replace(" "," ").replace(" "," ").replace(" "," ").replace(" "," ").replace(" "," ").replace(" "," ");
var factor=1,jextra,iextra=-1,iextras=new Array(),kextra=0, thelines, jj, tx, ty, stuffs, stuff="", nextx=10, nexty=-30, kk, onex=0, linewords, thel=0, accumline="", stx=0, sty=0;
context.clearRect(0, 0, elem.width, elem.height);
context.fillStyle="#FFFFFF";
wordposlist=";";
document.getElementById('themaindiv').innerHTML='';
thewords=deriveanswers(thewords);
thelines=thewords.split("\\n");
if (1 == 2) {
context.strokeStyle = "blue";
context.font = cf;
if (9 == 8) thelines=thewords.split("\\n");
if (thelines.length == 1) thelines=thewords.split("\n");
for (jj=0; jj<thelines.length; jj++) {
iextra=-1;
stuffs=thelines[jj].split(",");
if (stuffs.length >= 3) {
stuff=thelines[jj].replace("" + stuffs[0] + "," + stuffs[1] + ",", "");
context.strokeText(stuff,stuffs[0],stuffs[1]);
nextx=eval(stuffs[0]);
nexty=eval(30 + eval(stuffs[1]));
} else {
stuff=thelines[jj];
context.strokeText(stuff,nextx,Math.abs(eval(nexty)));
nexty=eval(30 + Math.abs(eval(nexty)));
}
}
} else {
onex=nextx;
thiscmd=0;
numcmd=0;
context.strokeStyle = "blue";
context.font = cf;
if (9 == 8) thelines=thewords.split("\\n");
if (thelines.length == 1) thelines=thewords.split("\n");
//document.title='';
for (jj=0; jj<thelines.length; jj++) {
thisline="";
kextra=0;
iextra=-1;
thel=0;
accumline="";
linewords=thelines[jj].split(" ");
if (eval(thelines[jj].length) > 56) {
iextra=thelines[jj].length;
jextra=eval(-1 + linewords.length);
while (eval(iextra) > 56) {
iextra-=eval(1 + linewords[jextra].length);
jextra--;
}
}
stuffs=thelines[jj].split(",");
if (stuffs.length >= 3) {
stuff=thelines[jj].replace("" + stuffs[0] + "," + stuffs[1] + ",", "");
if (eval(nexty) < 0) {
nextx=eval(stuffs[0]);
onex=nextx;
nexty=eval(stuffs[1]);
}
} else {
stuff=thelines[jj];
if (eval(nexty) < 0) {
onex=nextx;
nexty=eval(Math.abs(eval(nexty)));
}
}
for (kk=0; kk<stuff.length; kk++) {
if (kk == iextra) {
if (thisline == "") {
document.getElementById('themaindiv').innerHTML=document.getElementById('themaindiv').innerHTML; // + "<br>";
} else {
document.getElementById('themaindiv').innerHTML=document.getElementById('themaindiv').innerHTML; // + "<br>";
}
nextx=eval(onex);
nexty=eval(30 + nexty);
sty=eval(nexty - 30);
stx=eval(0);
thisline="";
if (stuff.substring(iextra).length > 56) {
factor++;
iextra=stuff.length;
jextra=eval(-1 + linewords.length);
while (eval(iextra) > eval(factor * 56)) {
iextra-=eval(1 + linewords[jextra].length);
jextra--;
}
}
} else if (thisline.length > 56 && (stuff.substring(kk, eval(1 + kk)) == "/" || stuff.substring(kk, eval(1 + kk)) == ".")) {

if (thisline == "") {
document.getElementById('themaindiv').innerHTML=document.getElementById('themaindiv').innerHTML; // + "<br>";
} else {
document.getElementById('themaindiv').innerHTML=document.getElementById('themaindiv').innerHTML; // + "<br>";
}
nextx=eval(onex);
nexty=eval(30 + nexty);
sty=eval(nexty - 30);
stx=eval(0);
thisline="";
if (stuff.substring(iextra).length > 56) {
factor++;
iextra=stuff.length;
jextra=eval(-1 + linewords.length);
while (eval(iextra) > eval(factor * 56)) {
iextra-=eval(1 + linewords[jextra].length);
jextra--;
}
}
}



if (stuff.substring(kk, eval(1 + kk)) == " ") {
if (accumline != "") {
wordposlist+=stx + "," + sty + "," + eval(12 + nextx) + "," + eval(2 + nexty) + "," + accumline + ";";
//document.title="wordposlist=" + wordposlist;
context.fillRect(eval(4 + stx),eval(4 + sty),eval(-4 + Math.abs(eval(eval(12 + nextx)) - eval(stx))),eval(-4 + Math.abs(eval(eval(2 + nexty)) - eval(sty))));
accumline="";
thel++;
sty=eval(nexty - 22);
stx=eval(nextx + 12);
}
} else if (thel < linewords.length) {
accumline+=stuff.substring(kk, eval(1 + kk));
if (accumline == linewords[thel]) {
wordposlist+=stx + "," + sty + "," + eval(12 + nextx) + "," + eval(2 + nexty) + "," + accumline + ";";
//document.title="Wordposlist=" + wordposlist;
context.fillRect(eval(4 + stx),eval(4 + sty),eval(-4 + Math.abs(eval(eval(12 + nextx)) - eval(stx))),eval(-4 + Math.abs(eval(eval(2 + nexty)) - eval(sty))));
accumline="";
thel++;
sty=eval(nexty - 22);
stx=eval(nextx + 12);
}
} else {
accumline+=stuff.substring(kk, eval(1 + kk));
}
thisline+=stuff.substring(kk, eval(1 + kk));
if (eval(1 + numcmd) > eval(stcmd.length)) {
stcmd.push('context.strokeText("' + stuff.substring(kk, eval(1 + kk)).replace(/_/g," ") + '",' + nextx + ',' + nexty + ')');
} else {
stcmd[numcmd]='context.strokeText("' + stuff.substring(kk, eval(1 + kk)).replace(/_/g," ") + '",' + nextx + ',' + nexty + ')';
}
numcmd++;
if (numcmd == 1) {
setTimeout(doslowly, 103);
}
//context.strokeText(stuff.substring(kk, eval(1 + kk)),nextx,nexty);
//alert(nextx + "," + nexty + "," + stuff.substring(kk, eval(1 + kk)));
nextx+=12;
}
if (thisline == "") {
document.getElementById('themaindiv').innerHTML=document.getElementById('themaindiv').innerHTML; // + "<br>";
} else {
document.getElementById('themaindiv').innerHTML=document.getElementById('themaindiv').innerHTML; // + "<br>";
}
nextx=eval(onex);
nexty=eval(30 + nexty);
sty=eval(nexty - 30);
stx=eval(0);
thisline="";
}
}
}

function openit(thew) {
if (gtw != null) gtw.close();
if (document.getElementById('langis').value == 'en') {
gtw=window.open('http://translate.google.com/translate_tts?tl=en&q=' + encodeURIComponent(thew), "One Line", "top=100,left=5,width=400,height=400");
} else {
gtw=window.open('https://translate.google.com/#en/' + document.getElementById('langis').value + '/' + encodeURIComponent(thew), "One Line", "top=100,left=5,width=800,height=400");
}
}

function fixdatetimebit() {
var d = new Date();
document.getElementById('datetimebit').value = ' @ ' + d.toLocaleString();
}

function validatetheform() {
var purlst, qe="q=", wd=400;
if (document.getElementById('words').value == "") {
document.getElementById('words').style.border='2px solid red';
return false;
} else {
if (gtwd != null) gtwd.close();
//if (langis == 'en') gtwd=window.open('http://www.thefreedictionary.com/' + ourcword, 'Dictionary ' + ourcword, "top=100,left=550,width=400,height=400");
if (gtw != null) gtw.close();
//alert('http://translate.google.com/translate_tts?tl=' + langis + '&q=' + encodeURIComponent(document.getElementById('words').value));
var purl='http://translate.google.com/translate_tts?tl=' + langis + '&q=' + encodeURIComponent(document.getElementById('words').value);
purlst=purl.split(qe);
if (document.getElementById('langis').value != 'en') {
purl='https://translate.google.com/#en/' + document.getElementById('langis').value + '/' + encodeURIComponent(document.getElementById('words').value);
qe="/" + document.getElementById('langis').value + '/';
purlst=purl.split(qe);
wd=800;
}
var purls=purl.split("%0A%0A");
if (purls.length > 1) {
var ioff=0;
for (var iu=eval(-1 + purls.length); iu>=0; iu--) {
purlst[1] = purlst[0] + qe;
if (purls[iu].length > 0) {
gtw=window.open(purlst[0] + qe + purls[iu].replace(purlst[1],""), "The Whole Thing " + eval(1 + iu) + " of " + purls.length, "top=" + eval(ioff + 100) + ",left=" + eval(ioff + 5) + ",width=" + wd + ",height=400");
ioff+=5;
}
}
} else if (document.getElementById('langis').value == 'en') {
gtw=window.open('http://translate.google.com/translate_tts?tl=en&q=' + encodeURIComponent(document.getElementById('words').value), "The Whole Thing", "top=100,left=5,width=" + wd + ",height=400");
} else {
gtw=window.open('https://translate.google.com/#en/' + document.getElementById('langis').value + '/' + encodeURIComponent(document.getElementById('words').value), "The Whole Thing", "top=100,left=5,width=" + wd + ",height=400");
}
}
return true;
}

function ask(def) {
askdef=def;
idea=prompt('Optionally enter an Eggheads episode data file like ' + def + ' or, alternatively, enter the contents of such a file such as ' + "\n" + "\n" + '"Sport","Judith2nd","Who was Manager at Manchester United Football Club from 1945 to 1969?","#Jack Charlton,Mat Busby,#Alf Ramsey","Saint Valentine' + String.fromCharCode(39) + 's Brook is a fence on which horse racing course?","newbury,ascot,Aintree","Britain' + String.fromCharCode(39) + 's Gemma Spofforth achieved fame in which sport in 2009?","#Tennis,Swimming,#Cycling","Which tennis player won the mixed doubles title at Wimbledon in 1980 with her brother John?","Tracy Austin,#Betty Stöve,#Jo Durie","The French-Canadian Alain Robidoux made his name as a competitor in which sport?","Snooker,#Skiing,#Squash","In which sport was the Kongsberger Technique used for many years in the first half of the twentieth century?","#Table Tennis,Ski-jumping,#Archery",' +
'"Film and Television","Chris2nd","In an April Fool' + String.fromCharCode(39) + 's Day broadcast in 1957 BBC Television viewers were fooled into believing that which food was grown on trees when the story featured in a Panorama special?","#Rice,Spaghetti,#Pizza","Kurt Benson and Natasha Anderson and Jambo Bolton were original characters in which TV series that first aired in 1995?","Hollyoaks,#Eldorado,#Byker Grove","Who played the role of Flash Harry in 2007 film St Trinian' + String.fromCharCode(39) + 's?","#Matthew Horne,Russell Brand,#Rupert Grint","Which French actress starred as the fashion designer Coco Chanel in the 2009 film Coco Before Chanel?","Audrey Tautou,#Ludvine Sagnier,#Emmanuelle Béart","Who directed the film This is Spinal Tap and The Princess Bride and When Harry Met Sally in the 1980s?","#Billy Crystal,#Barry Levinson,Rob Reiner","Which Japanese actor born in 1920 was closely associated with the director Akira Kurosawa appearing in his films Rashamon and The Seven Samurai and Yojimbo?","#Takeshi Kitano,#Ken Watanabe,Toshiro Mifune",' +
'"Science","Daphne2nd","In astronomy the term terrestrial is used to refer to Mars and Earth and Mercury and which other planet?","#Saturn,#Neptune,Venus","Otology is the medical science that deals with the diseases of which part of the human body?","#Heart,#Joints,Ear","George Bool who lived and died in the 19th century is particularly associated with which subject?","Mathematics,#Chemistry,#Biology","In aviation what joins thrust and drag and lift to make up the so-called four forces of flight?","#Friction,Weight,#Magnetism","Sodoku is a disease usually transmitted to humans from which animal?","#Fox,Rat,#Dog","The Jomony End Quench Test measures certain characteristics of which substance?","#Gold,Steel,#Silver",' +
'"Music","*CJ2nd","The Twisted Wheel Club in Manchester and The King Mojo Club in Sheffield and The Wigan Casino were all particularly associated with which musical scene of the 60s and 70s?","#Northern Punk,#Northern Rock,Northern Soul","At the Last Night of the Proms a laurel wreath is traditionally placed on the bust of which figure?","Henry Wood,#Bryn Terfel,#Edward Elgar","Which member of the Rolling Stones has sole UK top 40 hits with the songs Let' + String.fromCharCode(39) + 's Work and Just Another Night and Sweet Thing?","#Keith Richards,Mick Jagger,#Bill Wyman","Who wrote and had a UK top 20 hit with the song It Must Be Love on 1971 ten years before Madness reached the top 5 with a cover version?","desmond dekker,*bobby womack,Labi Siffre","Which singer songwriter' + String.fromCharCode(39) + 's debut opera entitled Prima Donna was first performed at the Manchester National Festival in 2009?","#Beck,#Elton John,Rufus Wainwright","The American musician Ry Cooder is best known for playing which instrument?","*piano,trumpet,Guitar",' +
'"General Knowledge","Kevin++2nd","What nickname was often given to British subjects who migrated to Australia after the Second World War under an assisted passage scheme?","#Five-Bob Brits,#Tuppence Tommies,Ten-Pound Poms","Which computer character was developed by the gaming company Saga in the early 1990s in an attempt to create a rival for the successful Nintendo character name Mario?","#Lara Croft,Sonic the Hedgehog,#Pac-Man","Which fashion and pop culture magazine often seen as a British style bible was launched by journalist Nick Logan in 1980?","#Melody Maker,#New Musical Express,The Face","Which Formula One world champion driver released his first solo album entitled Private Paradise in 2007?","Jacques Villeneuve,#Michael Schumacher,*Damon Hill","According to a report released in the New Economics Foundation on 2009 which country came top of the Happy Planet Index which is a list that ranks nations according to citizen' + String.fromCharCode(39) + 's wellbeing?","#Canada,Costa Rica,#Croatia","What was the first name of Andropov the Soviet General Secretary of the Communist Party who led his country from November 1982 until his death in 1984?","#Dmitri,Yuri,#Anatoly",' +
'"Sudden Death","What is the title of someone who has the letters BT after their name?","Baronet","Which London landmark was relocated to its current site in 1851 when it had to be moved to make room for an extension to Buckingham Palace?","Marble Arch","Which 1980s children' + String.fromCharCode(39) + 's TV program about a school teacher who was a wizard starred Stanley Baxter in the title role?","Mr Mageika","The song Memory from Cats based on a poem by T.S. Eliot was written by Andrew Lloyd Webber and which theatre director?","Trevor Nunn"' +
'', def.replace("2015-10-15.", "yyyy-mm-dd."));
if (idea != null) {
if (idea.substring(0,1) == "'" || idea.substring(0,1) == '"') {
document.getElementById('mailinout').innerHTML+='<iframe id="phpiframe" onload=" phpexists=phpthere(this); " src="./adjective_or_adverb.php" style="display:none;"></iframe><form id="createepisode" action="./adjective_or_adverb.php" method="POST" target="phpiframe"><textarea id="content" name="content" style="display:none;">' + idea + "</textarea><input name='episode' id='episode' value=''></input><input type='submit' id='mysb' value='Write an Episode File'></input></form>";
setTimeout(andthenphp, 1000);
} else if (idea.indexOf("yyyy-mm-dd.") == -1 && idea.indexOf(".htm") != -1) {
location.href='./adjective_or_adverb.html?episode=' + idea;
idea="";
}
}
}

function andthenepisode() {
if (idea != "" && idea != null) {
location.href='./adjective_or_adverb.html?episode=' + idea;
idea="";
}
}

</script>
</head>
<body style='background-color: #dddddd;'>
<div id='mybkgrd' title='Backgound image courtesy of Clipart Panda at http://www.clipartpanda.com/clipart_images/downloads-15907232' style="background: url('quiz-clipart-quiz-2-hi.png') repeat; opacity: 0.1; z-index: -1; position: absolute; top:0;left:0;width:98%;height:1200px;border:15px solid purple;"></div>
<h1 id='myh1' title='Backgound image courtesy of Clipart Panda at http://www.clipartpanda.com/clipart_images/downloads-15907232' align='center'>Adjective or Adverb Game<div id='noneedd' style='display:none;'> (Modelled on <a target=_blank title='Eggheads BBC2 quiz landing page ... thanks for ideas' style='text-decoration:none;' href='http://www.bbc.co.uk/programmes/b006z736'>Eggheads</a> <font id='small' size=1>Sydney ABC <a id='asmall' href='#' style='text-decoration:none;' onclick="ask('eggheads_simulator_2015-10-15.html');">15/10/2015</a> episode</font>)</div></h1>
<h2 align='center'>RJM Programming - October, 2015</h2>
<h4 align='center'>Thanks to "How English Works ... A Grammar Practice Book" by Michael Swan and Catherine Walter and here for <a target=_blank title='Useful link ... thanks' href='http://www.clipartpanda.com/clipart_images/downloads-15907232' style='text-decoration:none;'>Background Image</a></h4>
<h4 id='myh4' align='center' style='display:none;'>Your 5, Taking On A Champion Quiz Team of 5 ( Judith , Chris , Daphne , CJ , Kevin++ )</h4>
<div align='center' id='mydiv'>
<table cellspacing=5 cellpadding=5>
<tbody>
<tr><th style='background-color:#f5e5d5; border: 3px solid green;'><input id='category' type='text' readonly value='Adjective or Adverb Grammar' style='width:150px;'></input> Question</th><th id='titlebit' style='background-color:#f5e5d5; border: 3px solid green;'>Multiple Choices below ... <b><i><font color=red>Please Click Your Answer</font></i></b></th></tr>
<tr><td style='background-color:#f5e5d5; border: 3px solid green;'><span id='sanswer'>Answer</span>: <input style="width: 100px;background-color:yellow;" onblur=" if (this.value.length > 0) { checkanswer(this.value); } " type='text' name='answer' id='answer' value='' title='If desperate get hint by typing ... hint'></input><div id='noneednow' style='display:none;'>I am a: <select id='iam' name='iam' onchange='whatami(this.value);'><option value=''>Please choose role below ...</option><option value='broadcast'>Broadcaster</option><option value='listen'>Listener</option></select></div><div style='display:none;' id='broadcastdiv'><form target='writer' action='#' method='GET' onsubmit="return validatetheform()"><div id='noneednow2' style='display:none;'>Subject: <input style='width:55%;' type='text' value='' name='subject' id='subject'></input></div><div id='dnoneed' style='display:none;'><br><input onblur=" document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace(playernamea[icat],this.value); playernamea[icat]=this.value; " style='width:95px;background-color:pink;' id='playername' value='Player1of5' type='text'></input></div><div id='yscore'></div> Your Question <div id='dq' style='display:none;'><input id='qnum' type='number' value='1' style='width:20px;'></input>/<input id='qtot' type='number' value=3 readonly style='width:20px;'></input></div>: <br><textarea readonly onkeyup=" if (1 == 2) { document.getElementById('titlebit').innerHTML='You can now click words (at yellow canvas below) <br>or hearing buttons (left of yellow canvas)'; } " id='words' name='words' rows=17 cols=25 style='background-color:#f1f1f1; font-size:14px;'></textarea><br><br><div id='tablediv'></div><br><div id='upagainst' style='display:none;'>Up Against: <input id='eggp' style='width:95px;background-color:pink;' type='text' readonly value='Moderator'></input></div><div id='botbit' style='display:none;'><div id='escore'></div><br><span id='esanswer'>Answer</span>: <input style="width: 100px;background-color:yellow;" onchange="assessit(this.value);" onblur=" if (this.value.length > 0) { checkanswer(this.value); } " type='text' name='eanswer' id='eanswer' readonly value='' title='If desperate get hint by typing ... hint'></input><br><div id='noneednow3' style='display:none;'>My Name/Email: <input style='width:55%;' type='text' value='' name='emailname' id='emailname'></input></div><input type='hidden' name='datetimebit' id='datetimebit' value=''></input><br></div><div id='noneednow9' style='display:block;' align='center'><input id='actionbut' style='background-color:pink;' onclick='fixdatetimebit();' type='submit' value='Hear 👂 Your Adjective/Adverb Question'></input><br><br><select onchange=" if (this.value == 'en') { document.getElementById('actionbut').value='Hear 👂 Your English Sentence'; } else { document.getElementById('actionbut').value='Translate 🌐 Your English Sentence to ...'; } " style="background-color:white;color:blue;" id="langis" name="langis" title="Translations 🌐 courtesy of Google Translate at http://translate.google.com/"><option value="en">Hear 👂 English vs Translation 🌐 to ...</option><option value="af">Afrikaans</option><option value="sq">Albanian</option><option value="ar">Arabic</option><option value="hy">Armenian</option><option value="az">Azerbaijani</option><option value="eu">Basque</option><option value="be">Belarusian</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="zh-CN">Chinese (Simplified)</option><option value="zh-TW">Chinese (Traditional)</option><option value="hr">Croatian</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="et">Estonian</option><option value="tl">Filipino</option><option value="fi">Finnish</option><option value="fr">French</option><option value="gl">Galician</option><option value="ka">Georgian</option><option value="de">German</option><option value="el">Greek</option><option value="ht">Haitian Creole</option><option value="iw">Hebrew</option><option value="hi">Hindi</option><option value="hu">Hungarian</option><option value="is">Icelandic</option><option value="id">Indonesian</option><option value="ga">Irish</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="ko">Korean</option><option value="la">Latin</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="mk">Macedonian</option><option value="ms">Malay</option><option value="mt">Maltese</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sr">Serbian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="es">Spanish</option><option value="sw">Swahili</option><option value="sv">Swedish</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="ur">Urdu</option><option value="vi">Vietnamese</option><option value="cy">Welsh</option><option value="yi">Yiddish</option></select></div></form><p id='bstatus'></p></div><div id='dmail' align='center' style='word-wrap: break-word;background-color:#fffff0;width:100%;'></div><table style="width:100%;"><tr><th style='width:50%;'><div id='noneednow5' style='display:none;'>Mail In</div></th><th style='width:50%;'><div id='noneednow6' style='display:none;'>Mail Out</a></th></tr><tr><td id='mailin' style='width:50%;word-wrap: break-word;'></td><td id='mailout' style='width:50%;word-wrap: break-word;'></td></tr></table></div></td><td valign='top' id='themaintd'><div id='themaindiv'></div><canvas id='mycanvas' valign='top' width=365 height=400 style='background-color:yellow;position:absolute;top:175px;left:46%;width:365px;height:400px; border: 3px solid green;'></canvas></td></tr>
</tbody>
</table>
</div>
<script type='text/javascript'>

function beep() {
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkUDgzzXaXn98Z0oi9ILU5mBjFANmRwlVJ3/6jYDAmxaiDG3/6xjQQCCKkRb/6kg/wW+kSJ5//rLobkLSiKmqP/0ikJuDaSaSf/6JiLYLEYnW/+kXg1WRVJL/9EmQ1YZIsv/6Qzwy5qk7/+tEU0nkls3/zIUMPKNX/6yZLf+kFgAfgGyLFAUwY//uQZAUABcd5UiNPVXAAAApAAAAAE0VZQKw9ISAAACgAAAAAVQIygIElVrFkBS+Jhi+EAuu+lKAkYUEIsmEAEoMeDmCETMvfSHTGkF5RWH7kz/ESHWPAq/kcCRhqBtMdokPdM7vil7RG98A2sc7zO6ZvTdM7pmOUAZTnJW+NXxqmd41dqJ6mLTXxrPpnV8avaIf5SvL7pndPvPpndJR9Kuu8fePvuiuhorgWjp7Mf/PRjxcFCPDkW31srioCExivv9lcwKEaHsf/7ow2Fl1T/9RkXgEhYElAoCLFtMArxwivDJJ+bR1HTKJdlEoTELCIqgEwVGSQ+hIm0NbK8WXcTEI0UPoa2NbG4y2K00JEWbZavJXkYaqo9CRHS55FcZTjKEk3NKoCYUnSQ0rWxrZbFKbKIhOKPZe1cJKzZSaQrIyULHDZmV5K4xySsDRKWOruanGtjLJXFEmwaIbDLX0hIPBUQPVFVkQkDoUNfSoDgQGKPekoxeGzA4DUvnn4bxzcZrtJyipKfPNy5w+9lnXwgqsiyHNeSVpemw4bWb9psYeq//uQZBoABQt4yMVxYAIAAAkQoAAAHvYpL5m6AAgAACXDAAAAD59jblTirQe9upFsmZbpMudy7Lz1X1DYsxOOSWpfPqNX2WqktK0DMvuGwlbNj44TleLPQ+Gsfb+GOWOKJoIrWb3cIMeeON6lz2umTqMXV8Mj30yWPpjoSa9ujK8SyeJP5y5mOW1D6hvLepeveEAEDo0mgCRClOEgANv3B9a6fikgUSu/DmAMATrGx7nng5p5iimPNZsfQLYB2sDLIkzRKZOHGAaUyDcpFBSLG9MCQALgAIgQs2YunOszLSAyQYPVC2YdGGeHD2dTdJk1pAHGAWDjnkcLKFymS3RQZTInzySoBwMG0QueC3gMsCEYxUqlrcxK6k1LQQcsmyYeQPdC2YfuGPASCBkcVMQQqpVJshui1tkXQJQV0OXGAZMXSOEEBRirXbVRQW7ugq7IM7rPWSZyDlM3IuNEkxzCOJ0ny2ThNkyRai1b6ev//3dzNGzNb//4uAvHT5sURcZCFcuKLhOFs8mLAAEAt4UWAAIABAAAAAB4qbHo0tIjVkUU//uQZAwABfSFz3ZqQAAAAAngwAAAE1HjMp2qAAAAACZDgAAAD5UkTE1UgZEUExqYynN1qZvqIOREEFmBcJQkwdxiFtw0qEOkGYfRDifBui9MQg4QAHAqWtAWHoCxu1Yf4VfWLPIM2mHDFsbQEVGwyqQoQcwnfHeIkNt9YnkiaS1oizycqJrx4KOQjahZxWbcZgztj2c49nKmkId44S71j0c8eV9yDK6uPRzx5X18eDvjvQ6yKo9ZSS6l//8elePK/Lf//IInrOF/FvDoADYAGBMGb7FtErm5MXMlmPAJQVgWta7Zx2go+8xJ0UiCb8LHHdftWyLJE0QIAIsI+UbXu67dZMjmgDGCGl1H+vpF4NSDckSIkk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");
snd.play();
}

function assessit(eggans) {
document.getElementById('words').style.fontWeight='bold';
document.getElementById('titlebit').innerHTML=document.getElementById('titlebit').innerHTML.replace("Please Wait On " + document.getElementById('eggp').value, "Please Click Your Answer");
whosego="Player1of5";
document.getElementById('answer').value='';
document.getElementById('eanswer').value='';
egoes++;
if (eggans.replace(/_/g, " ").toLowerCase() == answera[correctone].replace(/_/g, " ").toLowerCase()) {
escore++;
document.getElementById('escore').innerHTML+="✅<sup>" + answera[correctone].replace(/_/g, " ") + "</sup>";
} else {
document.getElementById('escore').innerHTML+="❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup>";
}
curq+=1;
if (qanda[eval(0 + curq)].indexOf("Sudden Death") != -1) {
alert("Thanks for your attention.");
location.href='./adjective_or_adverb.html';
} else if (qanda[eval(1 + curq)].indexOf("2nd") != -1) {
if (eval(escore) > eval(yscore)) {
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace("Your 5 (", "Your 5 (<strike>" + document.getElementById('playername').value + "</strike>, ").replace("Your 5,", "Your 5 (<strike>" + document.getElementById('playername').value + "</strike>),");
document.getElementById('escore').innerHTML+=" <br>goes through";
} else if (eval(escore) < eval(yscore)) {
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace(" " + document.getElementById('eggp').value + " ,"," <strike>" + document.getElementById('eggp').value + "</strike> ,").replace(" " + document.getElementById('eggp').value + " )"," <strike>" + document.getElementById('eggp').value + "</strike> )").replace("( " + document.getElementById('eggp').value + " ","( <strike>" + document.getElementById('eggp').value + "</strike> ").replace("Your 5 (", "Your 5 (" + document.getElementById('playername').value + ", ").replace("Your 5,", "Your 5 (" + document.getElementById('playername').value + "),");
document.getElementById('yscore').innerHTML+=" <br>goes through";
} else {
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace("Your 5 (", "Your 5 (" + document.getElementById('playername').value + ", ").replace("Your 5,", "Your 5 (" + document.getElementById('playername').value + "),");
document.getElementById('escore').innerHTML+=" <br>goes through";
document.getElementById('yscore').innerHTML+=" <br>goes through";
}
icat++;
changecategory(qanda[eval(1 + curq)].replace("2nd","").replace("*","").replace("#",""));
curq+=2;
} else {
document.getElementById('qnum').value=eval(1 + document.getElementById('qnum').value);
document.getElementById('sanswer').innerHTML=document.getElementById('sanswer').innerHTML.replace("(2/", "(3/").replace("(1/", "(2/");
document.getElementById('esanswer').innerHTML=document.getElementById('esanswer').innerHTML.replace("(2/", "(3/").replace("(1/", "(2/");
}
document.getElementById('words').value=pick(qanda[curq]); //amend(sentences[thesentence]);
curq++;
drawsomewords(pick(qanda[curq].replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(/,/g, "\n")));
document.getElementById('answer').focus();

}

function changecategory(eggperson) {
escore=0;
egoes=0;
yscore=0;
ygoes=0;
category=categories[icat];
whosego="Player1of5";
if (category == "General Knowledge") {
//beep();
//alert(document.getElementById('myh4').innerHTML);
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace("(", "(Player5of5++,").replace("Your Five," , "Your Five (Player5of5++),");
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace("( ", "<b><i><font color=red>( ").replace(" )", " )</i></b></font>").replace("(", "<b><i><font color=red>(").replace(")", ")</i></b></font>");
//alert(document.getElementById('myh4').innerHTML);
document.getElementById('titlebit').innerHTML=document.getElementById('titlebit').innerHTML.replace("Please Wait On " + document.getElementById('eggp').value, "Please Click Your Answer");
document.getElementById('sanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
document.getElementById('esanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
document.getElementById('eggp').value=eggperson;
document.getElementById('category').value=category + " (final)";
document.getElementById('playername').value=playernamea[icat];
document.getElementById('eanswer').value='';
document.getElementById('answer').value='';
document.getElementById('qnum').value='1';
} else {
//beep();
document.getElementById('titlebit').innerHTML=document.getElementById('titlebit').innerHTML.replace("Please Wait On " + document.getElementById('eggp').value, "Please Click Your Answer");
document.getElementById('sanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
document.getElementById('esanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
document.getElementById('eggp').value=eggperson;
document.getElementById('category').value=category;
document.getElementById('playername').value=playernamea[icat];
document.getElementById('eanswer').value='';
document.getElementById('answer').value='';
document.getElementById('qnum').value='1';
}
setTimeout(wipeclean, 2000);
}

function wipeclean() {
document.getElementById('escore').innerHTML='';
document.getElementById('yscore').innerHTML='';
}

function assessyours(eggans) {
var tchars="", gtw;
whosego="notPlayer1of5";
document.getElementById('eanswer').value='';
ygoes++;
yygoes++;
if (eval(yygoes) < eval(goes)) document.getElementById('sanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
if (eval(yygoes) < eval(goes)) document.getElementById('esanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
if (1 == 1) {
gtw=qanda[eval(-1 + curq)].split("'");
if (gtw.length > 1) {
theword=gtw[eval(-2 + gtw.length)].toLowerCase().replace(/ and /g, "<br>");
}
if (document.getElementById('tablediv').innerHTML == "") {
if (eggans.replace(/_/g, " ").toLowerCase() == answera[correctone].replace(/_/g, " ").toLowerCase()) {
if (answera[correctone].replace(/_/g, " ").toLowerCase() == "both") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td></td><td></td><td>✅</td></tr></tbody></table>";
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adjective") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td>✅</td><td></td><td></td></tr></tbody></table>";
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adverb") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td></td><td>✅</td><td></td></tr></tbody></table>";
}
} else {
if (answera[correctone].replace(/_/g, " ").toLowerCase() == "both") {
if (eggans.replace(/_/g, " ").toLowerCase() == "adjective") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td></td><td>✅</td></tr></tbody></table>";
} else if (eggans.replace(/_/g, " ").toLowerCase() == "adverb") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td></td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td>✅</td></tr></tbody></table>";
}
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adjective") {
if (eggans.replace(/_/g, " ").toLowerCase() == "adverb") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td>✅</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td></td></tr></tbody></table>";
} else if (eggans.replace(/_/g, " ").toLowerCase() == "both") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td>✅</td><td></td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td></tr></tbody></table>";
}
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adverb") {
if (eggans.replace(/_/g, " ").toLowerCase() == "adjective") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td>✅</td><td></td></tr></tbody></table>";
} else if (eggans.replace(/_/g, " ").toLowerCase() == "both") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th><th>Adjective</th><th>Adverb</th><th>Both</th></tr><tr><td>" + theword + "</td><td></td><td>✅</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td></tr></tbody></table>";
}
}
}
} else {
tchars=document.getElementById('tablediv').innerHTML;

if (eggans.replace(/_/g, " ").toLowerCase() == answera[correctone].replace(/_/g, " ").toLowerCase()) {
if (answera[correctone].replace(/_/g, " ").toLowerCase() == "both") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td></td><td></td><td>✅</td></tr>");
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adjective") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td>✅</td><td></td><td></td></tr>");
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adverb") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td></td><td>✅</td><td></td></tr>");
}
} else {
if (answera[correctone].replace(/_/g, " ").toLowerCase() == "both") {
if (eggans.replace(/_/g, " ").toLowerCase() == "adjective") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td></td><td>✅</td></tr>");
} else if (eggans.replace(/_/g, " ").toLowerCase() == "adverb") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td></td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td>✅</td></tr>");
}
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adjective") {
if (eggans.replace(/_/g, " ").toLowerCase() == "adverb") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td>✅</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td></td></tr>");
} else if (eggans.replace(/_/g, " ").toLowerCase() == "both") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td>✅</td><td></td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td></tr>");
}
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "adverb") {
if (eggans.replace(/_/g, " ").toLowerCase() == "adjective") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td><td>✅</td><td></td></tr>");
} else if (eggans.replace(/_/g, " ").toLowerCase() == "both") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td></td><td>✅</td><td>❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup></td></tr>");
}
}
}

}
document.getElementById('tablediv').innerHTML=tchars;
} else {
if (eggans.replace(/_/g, " ").toLowerCase() == answera[correctone].replace(/_/g, " ").toLowerCase()) {
yscore++;
document.getElementById('yscore').innerHTML+="✅";
} else {
document.getElementById('yscore').innerHTML+="❌<sup>" + answera[correctone].replace(/_/g, " ") + "</sup>";
}
}
document.getElementById('titlebit').innerHTML=document.getElementById('titlebit').innerHTML.replace("Please Click Your Answer", "Please Wait On " + document.getElementById('eggp').value);
curq+=1;
if (qanda[curq] == "") {
whosego="Player1of5";
curq+=2;
setTimeout(delayitabit, 2000);
document.getElementById('titlebit').innerHTML=document.getElementById('titlebit').innerHTML.replace("Please Wait On " + document.getElementById('eggp').value, "Please Click Your Answer");
//drawsomewords(pick(qanda[curq].replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(/,/g, "\n")));
//document.getElementById('answer').focus();
} else {
document.getElementById('words').style.fontWeight='normal';
document.getElementById('words').value+="\n\n\n\n" + pick(qanda[curq]); //amend(sentences[thesentence]);
curq++;
drawsomewords(pick(qanda[eval(-2 + curq)].replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(/,/g, "\n")) + "\n\n\n\n\n\n\n\n" + pick(qanda[curq].replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(/,/g, "\n")));
//document.getElementById('answer').focus();
}
}

function whatami(urole) {
if (urole == 'broadcast') {
document.getElementById('broadcastdiv').style.display='block';
} else {
var d = new Date();
var rnum=Math.floor(Math.random() * 19000) + 1;
document.getElementById('broadcastdiv').innerHTML='<iframe src="broadcast_list.html?rnum=' + rnum + d.toLocaleString() + '" onload="listenerplace(this);" id="listeneriframe"></iframe>';
}
}

function read_mail(instuff) {
var outstuff=instuff;
if (instuff != "") {
var d, redofd="", ofd="", prefixb="";
var spare=document.getElementById('mailin').innerHTML;
var inlines=instuff.split("\n");
d = new Date();
redofd="<font size=1 color=red>" + d.toLocaleString() + "</font><br>";
for (var i=eval(-1 + inlines.length); i>=0; i--) {
if (inlines[i].replace("<br>","") != "") {
spare=prefixb + ofd + inlines[i] + "<br>" + spare;
prefixb="";
ofd="";
} else if (1 == 2) {
d = new Date();
ofd="<font size=1 color=green>" + d.toLocaleString() + "</font><br>";
}
}
document.getElementById('mailin').innerHTML="<br>" + redofd + spare;
}
return outstuff;
}

function send_mail(outstuff) {
var instuff=outstuff;
if (outstuff != "") {
var d, redofd="", ofd="", prefixb="";
var spare=document.getElementById('mailout').innerHTML;
var inlines=instuff.split("\n");
d = new Date();
redofd="<font size=1 color=red>" + d.toLocaleString() + "</font><br>";
for (var i=eval(-1 + inlines.length); i>=0; i--) {
if (inlines[i].replace("<br>","") != "") {
spare=prefixb + ofd + inlines[i] + "<br>" + spare;
ofd="";
prefixb="";
} else if (1 == 2) {
d = new Date();
ofd="<font size=1 color=green>" + d.toLocaleString() + "</font><br>";
}
}
document.getElementById('mailout').innerHTML="<br>" + redofd + spare;
}
return instuff;
}

function inboxcheck() {
if (inboxurl != "") {
if (1 == 2 && document.getElementById('inbox').src.indexOf("listen_to.php") != -1) {
document.getElementById('mailinout').innerHTML='<iframe onload=check_mail_in(this) style=display:none id=inbox src=' + inboxurl + ' title=inbox></iframe><iframe onload=check_mail_out(this) style=display:none id=outbox src=' + inboxurl.replace('mb_in', 'mb_out') + ' title=outbox></iframe>';
} else {
document.getElementById('inbox').src=inboxurl;
}
inboxurl="";
}
}

function outboxcheck() {
if (outboxurl != "") {
if (1 == 2 && document.getElementById('outbox').src.indexOf("listen_to.php") != -1) {
document.getElementById('mailinout').innerHTML='<iframe onload=check_mail_in(this) style=display:none id=inbox src=' + outboxurl.replace('mb_out', 'mb_in') + ' title=inbox></iframe><iframe onload=check_mail_out(this) style=display:none id=outbox src=' + outboxurl + ' title=outbox></iframe>';
} else {
document.getElementById('outbox').src=outboxurl;
}
outboxurl="";
}
}

function check_mail_in(iois) {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null && inboxurl == "") {
var d = new Date();
var rnum=Math.floor(Math.random() * 19000) + 1;
var preqs=iois.src.split('?');
inboxurl=preqs[0] + '?rnum=' + rnum + d.toLocaleString();
setTimeout(inboxcheck, 1964);
if (aconto.body.innerHTML != "") {
document.title="mail in is " + read_mail(aconto.body.innerHTML);
iois.src='./listen_to.php?rnum=-1' + rnum + d.toLocaleString();
}
}
}
}
}


function check_mail_out(iois) {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null && outboxurl == "") {
var d = new Date();
var rnum=Math.floor(Math.random() * 19000) + 1;
var preqs=iois.src.split('?');
outboxurl=preqs[0] + '?rnum=' + rnum + d.toLocaleString();
setTimeout(outboxcheck, 1969);
if (aconto.body.innerHTML != "") {
document.title="mail out is " + send_mail(aconto.body.innerHTML);
iois.src='./listen_to.php?rnum=-2' + rnum + d.toLocaleString();
}
}
}
}
}


function listenerplace(iois) {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
//alert(aconto.body.innerHTML);
document.getElementById('broadcastdiv').innerHTML=aconto.body.innerHTML.replace(fromtext,totext.substring(0,fromtext.length)).replace(/\n/g, "<br>");
if (totext != fromtext) drawsomewords(totext);
totext="Please select a broadcast below ...";
document.getElementById('broadcastdiv').style.display='block';
}
}
}
}


function phpthere(iois) {
var ee, eee, isthere=false, str="";
try {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
try {
str=aconto.body.innerHTML;
if (str.length > 0) {
if (str.toLowerCase().indexOf(">not found<") == -1) phpexists=true;
if (str.toLowerCase().indexOf(">not found<") == -1) isthere=true;
}
} catch (ee) { }
}
}
}
} catch (eee) { }
return isthere;
}

function andthenphp() {
var ee, eee, ii=1, jj;
var wash4=" Judith , Chris , Daphne , CJ , Kevin++ ";
var ish4="";
var ish4delim="", pe=phpexists;
if (phpexists) {
var ideafile=prompt('Now enter the Eggheads episode .html file name. The default one presented will not cut mustard but a non-existant filename in the filename form like ' + askdef + ' would be an okay entry here. Then we will go to that episode for a Multiple Choice "Egghead" simulation Game. If you click Cancel will assume the date is Today.', askdef.replace("2015-10-15.", "yyyy-mm-dd."));
if (ideafile != null) {
if (ideafile.indexOf("yyyy-mm-dd.") == -1 && ideafile.indexOf(".htm") != -1) {
document.getElementById('content').value=idea;
document.getElementById('episode').value=ideafile;
document.getElementById('createepisode').submit();
idea=ideafile;
setTimeout(andthenepisode, 2000);
}
} else {
pe=false;
}
}
if (!pe) {
example=idea;
jj=eval(-2 + idea.length);
if (idea.substring(0,1) == '"') {
qanda=idea.substring(1,jj).split('","');
} else if (idea.substring(0,1) == "'") {
qanda=idea.substring(1,jj).split("','");
}
category=qanda[0];
categories[0]=category;
ish4+=ish4delim + " " + qanda[eval(1)].replace("*","").replace("2nd","").replace("1st","") + " ";
ish4delim=",";
for (jj=1; jj<eval(-2 + qanda.length); jj++) {
if (qanda[eval(1 + jj)].replace("*","").indexOf("Judith") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Chris") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Daphne") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("CJ") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Kevin") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Barry") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Pat") == 0) {
ish4+=ish4delim + " " + qanda[eval(1 + jj)].replace("*","").replace("2nd","").replace("1st","") + " ";
ish4delim=",";
categories[ii]=qanda[jj];
jj++;
}
}
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace(wash4,ish4);
document.getElementById('asmall').innerHTML=' of unknown date ';
curq=2;
icat=0;
setTimeout(delayitabit, 2000);
}
}


function checkepisode(iois) {
var ee, eee, ii=1, jj;
var wash4=" Judith , Chris , Daphne , CJ , Kevin++ ";
var ish4="";
var ish4delim="";
try {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
try {
example=aconto.body.innerHTML;
jj=eval(-2 + aconto.body.innerHTML.length);
if (aconto.body.innerHTML.substring(0,1) == '"') {
qanda=aconto.body.innerHTML.substring(1,jj).split('","');
} else if (aconto.body.innerHTML.substring(0,1) == "'") {
qanda=aconto.body.innerHTML.substring(1,jj).split("','");
}
category=qanda[0];
categories[0]=category;
ish4+=ish4delim + " " + qanda[eval(1)].replace("*","").replace("2nd","").replace("1st","") + " ";
ish4delim=",";
for (jj=1; jj<eval(-2 + qanda.length); jj++) {
if (qanda[eval(1 + jj)].replace("*","").indexOf("Judith") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Chris") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Daphne") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("CJ") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Kevin") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Barry") == 0 ||
qanda[eval(1 + jj)].replace("*","").indexOf("Pat") == 0) {
ish4+=ish4delim + " " + qanda[eval(1 + jj)].replace("*","").replace("2nd","").replace("1st","") + " ";
ish4delim=",";
categories[ii]=qanda[jj];
jj++;
}
}
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace(wash4,ish4);
} catch (eee) { }
}
}
}
} catch (ee) { }
}

function delayitabit() {
document.getElementById('words').style.fontWeight='bold';
document.getElementById('words').value=pick(qanda[curq]); //amend(sentences[thesentence]);
curq++;
drawsomewords(pick(qanda[curq].replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").replace(/,/g, "\n")));
document.getElementById('answer').focus();

document.getElementById('sanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
document.getElementById('esanswer').innerHTML=category + ' <br>Answer (' + eval(1 + yygoes) + '/' + goes + ')';
}

function delayless() {
if (pepisode != "") {
document.getElementById('mailinout').innerHTML+='<iframe src="' + pepisode + '" id="thisquiz" onload=" checkepisode(this); " style="display:none;"></iframe>';
var huhbits=pepisode.split("eggheads_simulator_");
//alert(pepisode + " ... " + huhbits.length);
if (eval(huhbits.length) > 1) {
//alert(huhbits[1]);
var prehuhbits=huhbits[1].split(".ht");
if (prehuhbits.length > 1) {
//alert(prehuhbits[0]);
var posthuhbits=prehuhbits[0].split("-");
if (posthuhbits.length == 3) {
//alert(posthuhbits[2]);
document.getElementById('asmall').innerHTML=posthuhbits[2] + "/" + posthuhbits[1] + "/" + posthuhbits[0];
}
}
}
}
}

window.onload = (function(){

var frombit="", whenbit="", subjectbit="", emailbit="";

listenurl=location.search.split('listenurl=')[1] ? location.search.split('listenurl=')[1].split('&')[0] : "";
identity=location.search.split('identity=')[1] ? location.search.split('identity=')[1].split('&')[0] : "";
datetimebit=location.search.split('dtb=')[1] ? location.search.split('dtb=')[1].split('&')[0] : "";
subject=location.search.split('subject=')[1] ? location.search.split('subject=')[1].split('&')[0] : "";

pdate=location.search.split('date=')[1] ? location.search.split('date=')[1].split('&')[0] : "";
pyear=location.search.split('year=')[1] ? location.search.split('year=')[1].split('&')[0] : "";
pmonth=location.search.split('month=')[1] ? location.search.split('month=')[1].split('&')[0] : "";
pday=location.search.split('day=')[1] ? location.search.split('day=')[1].split('&')[0] : "";
pepisode=location.search.split('episode=')[1] ? location.search.split('episode=')[1].split('&')[0] : "";

if (pepisode != "") {
setTimeout(delayless,700);
} else if (pdate != "") {
pepisode="eggheads_simulator_" + pdate.replace("/","-").replace("/","-") + ".html";
setTimeout(delayless,700);
} else if (pyear != "" && pmonth != "" && pday != "") {
pepisode="eggheads_simulator_" + pyear + "-" + ("0" + pmonth).substring(eval(-2 + ("0" + pmonth).length)) + "-" + ("0" + pday).substring(eval(-2 + ("0" + pday).length)) + ".html";
setTimeout(delayless,700);
}

if (listenurl != "") {
document.getElementById('iam').value='listen';
totext=decodeURIComponent(listenurl).replace(/<br>\\n/g, "\\n");
if (subject == "") {
subjectbit="";
} else {
subjectbit="<br>" + decodeURIComponent(subject);
emailbit+=encodeURIComponent(decodeURIComponent(subject));
}
if (datetimebit == "") {
whenbit="";
} else {
whenbit="<br> ... at " + decodeURIComponent(datetimebit);
emailbit+=encodeURIComponent(" ... at " + decodeURIComponent(datetimebit));
}
if (identity == "") {
frombit="";
} else {
if (decodeURIComponent(identity).indexOf("@") != -1) {
frombit="<br> ... via <a href='mailto:" + decodeURIComponent(identity) + "?subject=" + encodeURIComponent("Re: ") + emailbit + "&body=" + encodeURIComponent("Regarding \n\n" + '"' + "\n") + encodeURIComponent(totext.replace(/\\n/g, "\n").replace(/\n/g, "\n")) + encodeURIComponent("\n" + '"' + "\n\n ... can I just say ...\n\n\n") + "' title='Optional email (reply)'>" + decodeURIComponent(identity) + "</a>";
} else {
frombit="<br> ... via " + decodeURIComponent(identity);
}
}
document.getElementById('titlebit').innerHTML='Feedback (at yellow canvas below)' + subjectbit + frombit + whenbit;
whatami('listen');
//setTimeout(andthen, 2000);
} else {
document.getElementById('iam').value='broadcast';
whatami('broadcast');
}



thescore=location.search.split('score=')[1] ? location.search.split('score=')[1].split('&')[0] : thescore;
scoregoes=location.search.split('goes=')[1] ? location.search.split('goes=')[1].split('&')[0] : scoregoes;

if (scoregoes != 0) {
document.getElementById('myh1').innerHTML+=" ... Score: " + thescore + " Goes: " + scoregoes;
}

ie = (function(){ // thanks to http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library

var undef,
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');

while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);

return v > 4 ? v : undef;

}());

if (ie < 9) {
elem=document.getElementById('mydiv');
elem.attachEvent('onclick', function(event) {
if (event.clientX || event.clientY) {
x = event.clientX - elemLeft;
y = event.clientY - elemTop;
} else {
x = event.pageX - elemLeft;
y = event.pageY - elemTop;
}
});
} else {
elem=document.getElementById('mycanvas');
context = elem.getContext("2d");
elemLeft = elem.offsetLeft;
elemTop = elem.offsetTop;
elem.addEventListener('mousedown', function(event) {
if (event.clientX || event.clientY) {
x = event.clientX - elemLeft;
y = event.clientY - elemTop;
} else {
x = event.pageX - elemLeft;
y = event.pageY - elemTop;
}
//alert("x=" + x + " and y=" + y + " and elemLeft=" + elemLeft + " and elemTop=" + elemTop);
if (whosego == "Player1of5") whatistheword(x,y);
}, false);
}

//thesentence=eval(Math.floor(Math.random() * eval(sentences.length)) + 0);
//if (1 == 2) listofsolved+=thesentence + ",";
setTimeout(delayitabit, 2000);
//beep();

}());

</script>
<div id='mailinout'>
</div>
</body>
</html>