<!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 lessonplan="";

var otheridea="Checkboxes,Group,Discussion,Listening,Reading,Writing";

var ths="<th>Adjective</th>" + "<th>Adverb</th><th>Both</th>";

var cblist=new Array();

var isphasetwo=false;

var theword="";

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

var lasteggans="";

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 plesson="";
var phpexists=false;
var askdef="";

var qanda=[
"Adjective or Adverb Grammar","",
"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",
"Checkboxes",
"a _____ expression","cowardly,friendly,lovely,silly",
"a _____ magazine","daily,monthly,yearly,lively,lovely,silly",
"_____ music","lively,lovely,silly,ugly,fast,loud",
"She sings too _____","fast,loud",
"He visits us _____","daily,monthly,yearly,early,late",
"a _____ thing to say","cowardly,friendly,hard,lovely,silly",
"_____ faces","cowardly,friendly,hard,lively,lonely,lovely,silly,ugly",
"very _____ to rain","likely",
"a _____ house","friendly,lonely,lovely",
"We left _____","early,fast,late",
"trying _____","hard",
"a _____ illness","deadly",
"_____ work","deadly,fast,hard,lively,lonely,lovely,silly",
"a _____ life","lonely,hard,lovely",
"_____ phone calls","daily,monthly,yearly,early,late,loud,friendly"
];

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";

var hgs;

function lookatqanda() {
if (qanda.length > 3) {
hgs=qanda[3].replace("Adj,", "Adjective,").replace("Adv,", "Adverb,").replace(/#/g, "").split(",");
ths="";
for (var ij=0; ij<hgs.length; ij++) {
ths+="<th>" + hgs[ij] + "</th>";
}
}
}

function pick(cwhat) {
return cwhat;
}

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

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;
if (isphasetwo) somewords=document.getElementById('words').value;
if (isphasetwo && somewords.indexOf(",") != -1) {
isphasetwo=true;
} else {
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++) {
if (thelines[jj] == "Adj") thelines[jj] = "Adjective";
if (thelines[jj] == "Adv") thelines[jj] = "Adverb";
if (thelines[jj] == "#Adj") thelines[jj] = "#Adjective";
if (thelines[jj] == "#Adv") thelines[jj] = "#Adverb";
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;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (def != "") idea=prompt('Cancel allows for longer entries, OK restarts, or enter contents of Adjectives versus Adverbs Lesson Plan helper such as ...' + "" + "\n" + '"Adjective or Adverb Grammar","",' +
'"It' + String.fromCharCode(39) + 's getting late now. Can ' + String.fromCharCode(39) + 'late' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adv. This is Adj. In the late afternoon we dined.","#Adj,#Adv,Both",' +
'"The ' + String.fromCharCode(39) + 'Sydney Morning Herald' + String.fromCharCode(39) + ' is a daily paper. Can ' + String.fromCharCode(39) + 'daily' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adj. This is Adv. The windows are inspected twice daily.","#Adj,#Adv,Both",' +
'"EofMC"', ''); //def.replace("2015-10-15.", "yyyy-mm-dd."));
if (idea == null) {
document.getElementById('mobilediv').style.display='block';
location.href='#mobilediv';
}
} else {
if (def != "") idea=prompt('Cancel allows for longer entries, OK restarts, or enter contents of Adjectives versus Adverbs Lesson Plan helper such as ...' + "" + "\n" + '"Adjective or Adverb Grammar","",' +
'"It' + String.fromCharCode(39) + 's getting late now. Can ' + String.fromCharCode(39) + 'late' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adv. This is Adj. In the late afternoon we dined.","#Adj,#Adv,Both",' +
'"The ' + String.fromCharCode(39) + 'Sydney Morning Herald' + String.fromCharCode(39) + ' is a daily paper. Can ' + String.fromCharCode(39) + 'daily' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adj. This is Adv. The windows are inspected twice daily.","#Adj,#Adv,Both",' +
'"That woman is a lovely and friendly and lively person but she seems lonely. Can ' + String.fromCharCode(39) + 'lovely and friendly and lively and lonely' + String.fromCharCode(39) + ' be...?","Adj,#Adv,#Both","","",' +
'"It' + String.fromCharCode(39) + 's not likely that your offspring will be ugly. Can ' + String.fromCharCode(39) + 'likely and ugly' + String.fromCharCode(39) + ' be...?","Adj,#Adv,#Both","","",' +
'"The milkman' + String.fromCharCode(39) + 's early. Can ' + String.fromCharCode(39) + 'early' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adv. This is Adj. On the early train the passengers read a lot.","#Adj,#Adv,Both",' +
'"They speak very well. Can ' + String.fromCharCode(39) + 'well' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adv. This is Adj. I' + String.fromCharCode(39) + 'm very well today, thanks.","#Adj,#Adv,Both",' +
'"The monthly meeting just finished. Can ' + String.fromCharCode(39) + 'monthly' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adj. This is Adv. We receive a report monthly.","#Adj,#Adv,Both",' +
'"You speak so loud. Can ' + String.fromCharCode(39) + 'loud' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adv. This is Adj. Loud noises scare the cat.","#Adj,#Adv,Both",' +
'"Did you see that fast car?. Can ' + String.fromCharCode(39) + 'fast' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adj. This is Adv. You drive fast when there is no traffic.","#Adj,#Adv,Both",' +
'"At times you can be so silly. Can ' + String.fromCharCode(39) + 'silly' + String.fromCharCode(39) + ' be...?","Adj,#Adv,#Both","","",' +
'"If you want me to work hard then you need to motivate me. Can ' + String.fromCharCode(39) + 'hard' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adv. This is Adj. That child is so hard to live with.","#Adj,#Adv,Both",' +
'"That action was very cowardly. Can ' + String.fromCharCode(39) + 'cowardly' + String.fromCharCode(39) + ' be...?","Adj,#Adv,#Both","","",' +
'"In that bottle there is deadly poison. Can ' + String.fromCharCode(39) + 'deadly' + String.fromCharCode(39) + ' be...?","Adj,#Adv,#Both","","",' +
'"Filling in income tax forms is a yearly occurrence. Can ' + String.fromCharCode(39) + 'yearly' + String.fromCharCode(39) + ' be an...?","#Adj,#Adv,Both","That was Adj. This is Adv. That distribution occurs yearly.","#Adj,#Adv,Both",' +
'"EofMC"', ''); //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="createlesson" action="./adjective_or_adverb.php" method="POST" target="phpiframe"><textarea id="content" name="content" style="display:none;">' + idea + "</textarea><input name='lesson' id='lesson' value=''></input><input type='submit' id='mysb' value='Write a lesson File'></input></form>";
setTimeout(andthenphp, 1000);
} else if (idea.indexOf("yyyy-mm-dd.") == -1 && idea.indexOf(".htm") != -1) {
location.href='./adjective_or_adverb.html?lesson=' + idea;
idea="";
} else if (idea == "") {
location.href='./adjective_or_adverb.html';
}
} else {
document.getElementById('mobilediv').style.display='block';
location.href='#mobilediv';
}
}

function andthenlesson() {
if (idea != "" && idea != null) {
location.href='./adjective_or_adverb.html?lesson=' + 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 <a id='asmall' href='#' style='text-decoration:none;' onclick="ask('adjectives_adverbs_2015-10-15.html');" title='Restart or local Adjectives versus Adverbs lesson plan'>or</a> 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('adjectives_adverbs_2015-10-15.html');">15/10/2015</a> lesson</font>)</div></h1>
<h2 id='myh2' align='center'>RJM Programming - October, 2015</h2>
<h4 id='myh04' 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:215px;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 checkwordlist(atw) {
var cbo;
if (qanda[atw].indexOf(",") == -1) atw++;
var listofok=qanda[atw].replace(/#/g,"").split(",");
var stufftosay="Here are results (ones not mentioned should not be checked) ...\n\n";
for (var ij=0; ij<listofok.length; ij++) {
cbo=document.getElementById('cb' + listofok[ij].toLowerCase());
if (cbo == null) {
stufftosay+="Incorrect not to have '" + listofok[ij].toLowerCase() + "' in list\n";
} else if (cbo.checked) {
stufftosay+="Correct to have '" + listofok[ij].toLowerCase() + "' in list\n";
} else {
stufftosay+="Incorrect not to have '" + listofok[ij].toLowerCase() + "' in list\n";
}
}
alert(stufftosay);
curq=eval(1 + atw);
if (eval(curq) < eval(qanda.length)) {
nowdocheckboxes(curq);
} else {
alert("Thanks for your attention.");
location.href='./adjective_or_adverb.html';
}
}

function nowdocheckboxes(atw) {
isphasetwo=true;
var xc=document.getElementById('atbody').innerHTML;
var xcs=xc.split("<tr><td>");
var jh, ih, prexcs, adone=false, xcsbits;
for (ih=1; ih<xcs.length; ih++) {
prexcs=xcs[ih].split("</td>");
if (prexcs[0].replace(/<br>/g,"").indexOf("<") != -1) {
adone=true;
document.getElementById(cblist[eval(-1 + ih)]).checked=false;
} else {
xcsbits=prexcs[0].split("<br>");
for (jh=0; jh<xcsbits.length; jh++) {
cblist.push("cb" + xcsbits[jh]);
}
}
}
if (!adone) {
var wfb=document.getElementById('tablediv').innerHTML;
document.getElementById('tablediv').innerHTML='<input id="mybis" type="button" value="Check My Answer" onclick="checkwordlist(curq);"></input><br>' + wfb;
for (ih=1; ih<xcs.length; ih++) {
prexcs=xcs[ih].split("</td>");
xcsbits=prexcs[0].split("<br>");
for (jh=0; jh<xcsbits.length; jh++) {
document.getElementById('atbody').innerHTML=document.getElementById('atbody').innerHTML.replace(">" + xcsbits[jh] + "<", ">" + "<input type='checkbox' name='wordlist' id='cb" + xcsbits[jh].toLowerCase() + "' value='" + xcsbits[jh] + "'>" + xcsbits[jh] + "<");
//alert(xcsbits[jh]);
}
}
}
document.getElementById('words').value=qanda[atw];
drawsomewords(qanda[atw]);
//alert(qanda[atw]);
}

function endofone(inc) {
var retv=false;
if (inc.toLowerCase().indexOf(("End of Multiple Choi").toLowerCase()) != -1) retv=true;
if (inc.toLowerCase().indexOf(("EofMC").toLowerCase()) != -1) retv=true;
if (inc.toLowerCase().indexOf(("Sudden Dea").toLowerCase()) != -1) retv=true;
var oid=otheridea.split(",");
for (var ioid=0; ioid<oid.length; ioid++) {
if (inc.toLowerCase().indexOf((oid[ioid].substring(0,(eval(-1 + oid[ioid].length)))).toLowerCase()) != -1) {
var fb=document.getElementById('tablediv').innerHTML;
document.getElementById('tablediv').innerHTML="<h1 id='h1more'>Now for <br>" + oid[ioid] + "</h1><br>" + fb;
retv=true;
if (inc.toLowerCase().indexOf("checkbox") != -1) {
if (inc != qanda[eval(-1 + qanda.length)] && qanda[eval(0 + curq)].indexOf(",") == -1) { //inc.indexOf(",") == -1) {
//alert(987 + " " + qanda[eval(1 + curq)] + " " + qanda[eval(2 + curq)] + " " + inc);
curq++;
isphasetwo=true;
nowdocheckboxes(curq);
return retv;
}
}
}
}
if (retv) {
if (inc != qanda[eval(-1 + qanda.length)]) {
document.getElementById('h1more').innerHTML+="<br> ... please ask <br>your moderator";
}
}
return retv;
}

function assessit(eggans) {
if (!isphasetwo) {
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 (endofone(qanda[eval(0 + curq)]) || eval(1 + curq) >= eval(qanda.length)) {
if (eval(1 + curq) >= eval(qanda.length)) {
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++;
if (!isphasetwo) 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 (' + Math.min(Math.max(1,eval(1 + yygoes)),goes) + '/' + goes + ')';
document.getElementById('esanswer').innerHTML=category + ' <br>Answer (' + Math.min(Math.max(1,eval(1 + yygoes)),goes) + '/' + 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 (' + Math.min(Math.max(1,eval(1 + yygoes)),goes) + '/' + goes + ')';
document.getElementById('esanswer').innerHTML=category + ' <br>Answer (' + Math.min(Math.max(1,eval(1 + yygoes)),goes) + '/' + 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 placeincol(lcaseanswer, secondparam) {
var jkj, rec="";
if (secondparam == "") {
for (jkj=0; jkj<hgs.length; jkj++) {
if (lcaseanswer.toLowerCase().substring(0,lcaseanswer.length) == hgs[jkj].toLowerCase().substring(0,lcaseanswer.length)) {
rec+="<td>✅</td>";
} else {
rec+="<td></td>";
}
}
return rec;
} else {
for (jkj=0; jkj<hgs.length; jkj++) {
if (lcaseanswer.toLowerCase().substring(0,lcaseanswer.length) == hgs[jkj].toLowerCase().substring(0,lcaseanswer.length)) {
rec+="<td>✅</td>";
} else if (secondparam.toLowerCase().substring(0,secondparam.length) == hgs[jkj].toLowerCase().substring(0,secondparam.length)) {
if (lcaseanswer == "Adj") lcaseanswer="Adjective";
if (lcaseanswer == "Adv") lcaseanswer="Adverb";
rec+="<td>❌<sup>" + lcaseanswer + "</sup></td>";
} else {
rec+="<td></td>";
}
}
return rec;
}
return "";
}

function assessyours(eggans) {
var tchars="", gtw;
if (!isphasetwo) {
whosego="notPlayer1of5";
document.getElementById('eanswer').value='';
ygoes++;
if (yygoes < 0) yygoes=0;
if (eggans != lasteggans && eval(1 + yygoes) <= eval(goes)) yygoes++;
lasteggans=eggans;
if (eval(yygoes) < eval(goes)) document.getElementById('sanswer').innerHTML=category + ' <br>Answer (' + Math.min(Math.max(1,eval(1 + yygoes)),goes) + '/' + goes + ')';
if (eval(yygoes) < eval(goes)) document.getElementById('esanswer').innerHTML=category + ' <br>Answer (' + Math.min(Math.max(1,eval(1 + yygoes)),goes) + '/' + 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 (placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), "") != "") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</tr><tr><td>" + theword + "</td>" + placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), "") + "</tr></tbody></table>";
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "both") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</tr><tr><td>" + theword + "</td><td></td><td></td><td>✅</td></tr></tbody></table>";
} else if (answera[correctone].replace(/_/g, " ").toLowerCase().substring(0,3) == "adj") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</tr><tr><td>" + theword + "</td><td>✅</td><td></td><td></td></tr></tbody></table>";
} else if (answera[correctone].replace(/_/g, " ").toLowerCase().substring(0,3) == "adv") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</tr><tr><td>" + theword + "</td><td></td><td>✅</td><td></td></tr></tbody></table>";
}
} else {
if (placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), eggans.replace(/_/g, " ").toLowerCase()) != "") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</tr><tr><td>" + theword + "</td>" + placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), eggans.replace(/_/g, " ").toLowerCase()) + "</tr></tbody></table>";
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "both") {
if (eggans.replace(/_/g, " ").toLowerCase().substring(0,3) == "adj") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</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().substring(0,3) == "adv") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</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().substring(0,3) == "adj") {
if (eggans.replace(/_/g, " ").toLowerCase().substring(0,3) == "adv") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</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>" + ths + "</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().substring(0,3) == "adv") {
if (eggans.replace(/_/g, " ").toLowerCase().substring(0,3) == "adj") {
tchars="<table id='atable' border=1 style='background-color:yellow;'><tbody id='atbody'><tr><th>Word</th>" + ths + "</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>" + ths + "</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 (placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), "") != "") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td>" + placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), "") + "</tr>");
} else 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().substring(0,3) == "adj") {
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().substring(0,3) == "adv") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td><td></td><td>✅</td><td></td></tr>");
}
} else {
if (placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), eggans.replace(/_/g, " ").toLowerCase()) != "") {
tchars=tchars.replace("</th></tr>", "</th></tr><tr><td>" + theword + "</td>" + placeincol(answera[correctone].replace(/_/g, " ").toLowerCase(), eggans.replace(/_/g, " ").toLowerCase()) + "</tr>");
} else if (answera[correctone].replace(/_/g, " ").toLowerCase() == "both") {
if (eggans.replace(/_/g, " ").toLowerCase().substring(0,3) == "adj") {
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().substring(0,3) == "adv") {
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().substring(0,3) == "adj") {
if (eggans.replace(/_/g, " ").toLowerCase().substring(0,3) == "adv") {
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().substring(0,3) == "adv") {
if (eggans.replace(/_/g, " ").toLowerCase().substring(0,3) == "adj") {
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 if (endofone(qanda[curq])) { // new
curq=curq;
} else {
document.getElementById('words').style.fontWeight='normal';
document.getElementById('words').value+="\n\n\n\n" + pick(qanda[curq]); //amend(sentences[thesentence]);
curq++;
if (!isphasetwo) 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 && !isphasetwo) 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 && str.toLowerCase().indexOf("our home page for your perusal") == -1) phpexists=true;
if (str.toLowerCase().indexOf(">not found<") == -1 && str.toLowerCase().indexOf("our home page for your perusal") == -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 lesson .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 lesson 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('lesson').value=ideafile;
document.getElementById('createlesson').submit();
idea=ideafile;
setTimeout(andthenlesson, 2000);
}
} else {
pe=false;
}
}
if (!pe) {
example=idea;
jj=eval(-1 + 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("','");
}
lookatqanda();
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 (1 == 4 && (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++;
}
}
goes=Math.floor(eval((qanda.length - 2) / 4) + 0.5);
for (jj=2; jj<qanda.length; jj++) {
if (endofone(qanda[jj])) {
goes=eval((jj - 2) / 4);
}
}
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace(wash4,ish4);
if (1 == 2) document.getElementById('asmall').innerHTML=' of unknown date ';
curq=2;
yygoes=-1;
whosego="Player1of5"
document.getElementById('myh1').innerHTML=qanda[0];
document.getElementById('tablediv').innerHTML="";
document.getElementById('category').value=qanda[0];
document.getElementById('myh2').innerHTML="";
document.getElementById('myh04').innerHTML="";
document.getElementById('actionbut').value="Hear Your Question";
//document.getElementById('mycanvas').style.top=eval(-80 + eval(document.getElementById('mycanvas').style.top.replace("px",""))) + "px";
var zx=document.getElementById('mysb');
if (zx != null) {
document.getElementById('mysb').style.display='none';
document.getElementById('lesson').style.display='none';
}
icat=0;
setTimeout(delayitabit, 2000);
}
}


function checklesson(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("','");
}
lookatqanda();
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 (1 == 4 && (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++;
}
}
goes=Math.floor(eval((qanda.length - 2) / 4) + 0.5);
for (jj=2; jj<qanda.length; jj++) {
if (endofone(qanda[jj])) {
goes=eval((jj - 2) / 4);
}
}
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.replace(wash4,ish4);
document.getElementById('myh1').innerHTML=qanda[0];
} catch (eee) { }
}
}
}
} catch (ee) { }
}

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

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

if (lessonplan != "") {
lessonplan=decodeURIComponent(lessonplan);
if (lessonplan.substring(0,1) == '"' || lessonplan.substring(0,1) == "'") {
idea=lessonplan;
lessonplan="";
andthenphp();
}
}

}

function delayless() {
if (plesson != "") {
document.getElementById('mailinout').innerHTML+='<iframe src="' + plesson + '" id="thisquiz" onload=" checklesson(this); " style="display:none;"></iframe>';
var huhbits=plesson.split("adjectives_adverbs_");
//alert(plesson + " ... " + 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="";

otheridea=location.search.split('otheridea=')[1] ? location.search.split('otheridea=')[1].split('&')[0] : otheridea;

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] : "";
plesson=location.search.split('lesson=')[1] ? location.search.split('lesson=')[1].split('&')[0] : "";

if (plesson != "") {
setTimeout(delayless,700);
} else if (pdate != "") {
plesson="adjectives_adverbs_" + pdate.replace("/","-").replace("/","-") + ".html";
setTimeout(delayless,700);
} else if (pyear != "" && pmonth != "" && pday != "") {
plesson="adjectives_adverbs_" + 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);
}

lookatqanda();

lessonplan=location.search.split('lessonplan=')[1] ? location.search.split('lessonplan=')[1].split('&')[0] : lessonplan;

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

}());

</script>
<div id='mailinout'>
</div>
<div align='center' id='mobilediv' style='display:none;'>
<input onclick=" idea=document.getElementById('mobileta').value; if (idea != '') { ask(''); } document.getElementById('mobilediv').style.display='none'; location.href='#myh1'; " type='button' id='mobilebut' value='Apply Ideas Below'></input><br>
<textarea id='mobileta' rows=20 cols=60>"Adjective or Adverb Grammar","","It's getting late now. Can 'late' be an ...?","#Adjective,#Adverb,Both","That was 'late' as an adverb. Here's an example of the use of 'late' as an adjective. In the late afternoon we dined.","#Adjective,#Adverb,Both","The 'Sydney Morning Herald' is a daily paper. Can 'daily' be an ...?","#Adjective,#Adverb,Both","That was 'daily' as an adjective. Here's an example of the use of 'daily' as an adverb. The windows are inspected twice daily.","#Adjective,#Adverb,Both","That woman is a lovely and friendly and lively person but she seems lonely. Can 'lovely and friendly and lively and lonely' be ...?","Adjective,#Adverb,#Both","","","It's not likely that your offspring will be ugly. Can 'likely and ugly' be ...?","Adjective,#Adverb,#Both","","","The milkman's early. Can 'early' be an ...?","#Adjective,#Adverb,Both","That was 'early' as an adverb. Here's an example of the use of 'early' as an adjective. On the early train the passengers read a lot.","#Adjective,#Adverb,Both","They speak very well. Can 'well' be an ...?","#Adjective,#Adverb,Both","That was 'well' as an adverb. Here's an example of the use of 'well' as an adjective. I'm very well today, thanks.","#Adjective,#Adverb,Both","The monthly meeting just finished. Can 'monthly' be an ...?","#Adjective,#Adverb,Both","That was 'monthly' as an adjective. Here's an example of the use of 'monthly' as an adverb. We receive a report monthly.","#Adjective,#Adverb,Both","You speak so loud. Can 'loud' be an ...?","#Adjective,#Adverb,Both","That was 'loud' as an adverb. Here's an example of the use of 'loud' as an adjective. Loud noises scare the cat.","#Adjective,#Adverb,Both","Did you see that fast car?. Can 'fast' be an ...?","#Adjective,#Adverb,Both","That was 'fast' as an adjective. Here's an example of the use of 'fast' as an adverb. You drive fast when there is no traffic.","#Adjective,#Adverb,Both","At times you can be so silly. Can 'silly' be ...?","Adjective,#Adverb,#Both","","","If you want me to work hard then you need to motivate me. Can 'hard' be an ...?","#Adjective,#Adverb,Both","That was 'hard' as an adverb. Here's an example of the use of 'hard' as an adjective. That child is so hard to live with.","#Adjective,#Adverb,Both","That action was very cowardly. Can 'cowardly' be ...?","Adjective,#Adverb,#Both","","","In that bottle there is deadly poison. Can 'deadly' be ...?","Adjective,#Adverb,#Both","","","Filling in income tax forms is a yearly occurrence. Can 'yearly' be an ...?","#Adjective,#Adverb,Both","That was 'yearly' as an adjective. Here's an example of the use of 'yearly' as an adverb. That distribution occurs yearly.","#Adjective,#Adverb,Both","Checkboxes","a _____ expression","cowardly,friendly,lovely,silly","a _____ magazine","daily,monthly,yearly,lively,lovely,silly","_____ music","lively,lovely,silly,ugly,fast,loud","She sings too _____","fast,loud","He visits us _____","daily,monthly,yearly,early,late","a _____ thing to say","cowardly,friendly,hard,lovely,silly","_____ faces","cowardly,friendly,hard,lively,lonely,lovely,silly,ugly","very _____ to rain","likely","a _____ house","friendly,lonely,lovely","We left _____","early,fast,late","trying _____","hard","a _____ illness","deadly","_____ work","deadly,fast,hard,lively,lonely,lovely,silly","a _____ life","lonely,hard,lovely","_____ phone calls","daily,monthly,yearly,early,late,loud,friendly"</textarea>
</div>
</body>
</html>