<!doctype html>
<html>
<head>
<title>Comparisons and Superlatives - RJM Programming - December, 2016 ... Thanks to Five-Minute Activities by Penny Ur and Andrew Wright page 25</title>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
var comparearr=["Arthur;tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"Bangkok;large/larger/largest,cold,small,big/bigger/biggest,high,low,interesting/more interesting/most interesting",
"clydesdales [are];fast,slow,small,big/bigger/biggest",
"Dostoyevsky;popular/more popular/most popular,tall,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"eagles [are];popular/more popular/most popular,small,big/bigger/biggest,interesting/more interesting/most interesting,fast,slow,cool,fly high/higher fliers/highest fliers",
"forgetfulness;annoying/more annoying/most annoying,common/more common/most common",
"gluttony;annoying/more annoying/most annoying,common/more common/most common",
"he;tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"I [am];tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"Jungfrau;high,low,interesting/more interesting/most interesting",
"Kuwait City;large/larger/largest,cold,small,big/bigger/biggest,high,low",
"Luis;tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"Mount Everest;high,low,interesting/more interesting/most interesting",
"nobody;cool,small,big/bigger/biggest,fast,slow,popular/more popular/most popular,tall,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"One Direction;cool,popular/more popular/most popular,interesting/more interesting/most interesting",
"pigeons [are];fly high/higher fliers/highest fliers,fast,slow,small,big/bigger/biggest",
"Quito;large/larger/largest,cold,small,big/bigger/biggest,high,low,interesting/more interesting/most interesting",
"Ray Charles;cool,popular/more popular/most popular,interesting/more interesting/most interesting,tall,small,big/bigger/biggest,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"she;tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"they [are];tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"Updike;popular/more popular/most popular,interesting/more interesting/most interesting,tall,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"vineries [are];interesting/more interesting/most interesting,cheap",
"Westlife;cool,popular/more popular/most popular,interesting/more interesting/most interesting",
"Xiuying;tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"Yoshiro;tall,small,big/bigger/biggest,fast,slow,strong,happy/happier/happiest,sad/sadder/saddest,fast,slow,flexible/more flexible/most flexible",
"zoos [are];interesting/more interesting/most interesting,cheap"
];
var ourwordlist=[];
var ourwordassociation=[];
var rownum=0;
var alreadytriedlist=";";
var score=0, goes=0;
var mode='difficult';
var modeprefix='data-';
var versus='';
var lasttitle='';
var scoreoffset=1;
function sectest(preversuso) {
if ((',' + (lasttitle + ',it,he,she') + ',').indexOf((',' + preversuso.value.replace(' and ','') + ',')) == -1) {
goes++;
document.getElementById('score').innerHTML = 'Score: ' + score + ' from ' + goes + ' goes';
preversuso.value='';
} else {
scoreoffset++;
}
}
function prescoreit(selo, preversus) {
var which=selo.id.replace('selword','');
if (alreadytriedlist.indexOf(';' + selo.value + ',' + preversus + ';') != -1) {
alert("You have already tried this combination, thanks.");
} else {
if ((',' + selo.options[selo.selectedIndex].getAttribute(modeprefix + 'title') + ',it,he,she' + ',').indexOf((',' + preversus + ',')) == -1) {
goes++;
//alert(selo.options[selo.selectedIndex].getAttribute(modeprefix + 'title') + ',it,him,her' + "Sorry, we don't have " + preversus + " on our list of applicable comparisons for " + selo.value + ".");
document.getElementById('score').innerHTML = 'Score: ' + score + ' from ' + goes + ' goes';
} else {
scoreoffset=1;
lasttitle=selo.options[selo.selectedIndex].getAttribute(modeprefix + 'title');
versus=preversus;
if (selo.value.indexOf('the ') == 0) {
document.getElementById('stoo' + which).value='out of';
if (document.getElementById('selo' + which).innerHTML.indexOf('>it<') == -1) {
document.getElementById('selo' + which).innerHTML+="<option value='it'>it</option>";
}
document.getElementById('seloplus' + which).style.display='block';
} else {
document.getElementById('stoo' + which).value='than';
document.getElementById('seloplus' + which).style.display='none';
}
}
}
}
function getvals(sin) {
var retval='';
for (var i=0; i<sin.options.length; i++) {
if (sin.options[i].selected) {
if (sin.options[i].value != '') {
//alert(sin.options[i].value + ' ' + (',' + (lasttitle + ',it,') + ','));
if ((',' + (lasttitle + ',it,him,her') + ',').indexOf((',' + sin.options[i].value.replace(' and ','').replace('and ','') + ',')) == -1) {
goes++;
return ' ';
} else {
retval += ' ' + sin.options[i].text.trim();
}
}
}
}
return retval;
}
function scoreit(selo) {
var which=selo.id.replace('button','');
goes++;
if (document.getElementById('selo' + which).value != '' && document.getElementById('stoo' + which).value != '') {
if (document.getElementById('selword' + which).value.indexOf('the ') == 0 && document.getElementById('stoo' + which).value != 'out of') {
alert("Sorry, you need to toggle the value '" + document.getElementById('stoo' + which).value + "'.");
} else if (document.getElementById('selword' + which).value.indexOf('the ') != 0 && document.getElementById('stoo' + which).value == 'out of') {
alert("Sorry, you need to toggle the value '" + document.getElementById('stoo' + which).value + "'.");
} else if (getvals(document.getElementById('seloplus' + which)) == ' ') {
alert("Sorry, you have some inapplicable candidates, in our view.");
} else {
score+=scoreoffset;
document.getElementById('tr' + which).innerHTML='<td colspan=7><b><i>' + document.getElementById('one' + which).innerHTML + ' ' + document.getElementById('word' + which).innerHTML + ' ' + document.getElementById('selword' + which).value + ' ' + document.getElementById('stoo' + which).value + ' ' + document.getElementById('selo' + which).options[document.getElementById('selo' + which).selectedIndex].text + getvals(document.getElementById('seloplus' + which)) + '?</i></b></td>';
}
} else {
alert("Sorry, you haven't filled out enough.");
}
document.getElementById('score').innerHTML = 'Score: ' + score + ' from ' + goes + ' goes';
scoreoffset=1;
}
function locy(thisvalue) {
location.href='./compared_to.htm?score=' + score + '&goes=' + goes + '&difficulty=' + thisvalue;
}
function fillintable(phase,addthis) {
var i,j,thisrow="",thesewords,k,selinnards='';
if (phase == 0) {
mode=location.search.split('difficulty=')[1] ? location.search.split('difficulty=')[1].split('&')[0] : 'difficult';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
phase=phase;
} else if (mode.replace('difficult','') != '') {
modeprefix='';
document.getElementById('ifnm').innerHTML='<select onchange=" locy(this.value); "><option value=easy>Hints (on hover) Game</option><option value=difficult>No Hints Game</option></select>';
} else {
document.getElementById('ifnm').innerHTML='<select onchange=" locy(this.value); "><option value=difficult>No Hints Game</option><option value=easy>Hints (on hover) Game</option></select>';
}
var addit=location.search.split('addthis=')[1] ? decodeURIComponent(location.search.split('addthis=')[1]).split('&')[0] : '';
if (addit != '') {
if (addit.replace(/[/g,'').replace(/]/g,'').indexOf('"') == 0) {
var recs=(addit + '~').replace(/[/g,'').replace(/]/g,'').replace('"','').replace('"~','').replace('~','').split('","');
for (k=0; k<recs.length; k++) {
comparearr.push(recs[k]);
}
} else {
comparearr.push(addit);
}
}
var newscore=location.search.split('score=')[1] ? decodeURIComponent(location.search.split('score=')[1]).split('&')[0] : '0';
var newgoes=location.search.split('goes=')[1] ? decodeURIComponent(location.search.split('goes=')[1]).split('&')[0] : '0';
if (newgoes != '0') {
document.getElementById('score').innerHTML = 'Score: ' + newscore + ' from ' + newgoes + ' goes';
score=eval(newscore);
goes=eval(newgoes);
}
var othersel="<select onchange='sectest(this);' id=selo0><option value=>Select comparison to ...</option></select>";
var otherselplus="<select style='display:none;' id=seloplus0 multiple><option value='' selected></option></select>";
for (i=0; i<comparearr.length; i++) {
othersel=othersel.replace("</select>",("<option value='" + comparearr[i].split(';')[0].split(' [')[0] + "'>" + comparearr[i].split(';')[0].split(' [')[0] + "</option></select>").replace(">I<",">me<").replace(">They<",">them<").replace('>He<','>him<').replace('>She<','>her<').replace(">they<",">them<").replace('>he<','>him<').replace('>she<','>her<'));
otherselplus=otherselplus.replace("</select>",("<option value=' and " + comparearr[i].split(';')[0].split(' [')[0] + "'> and " + comparearr[i].split(';')[0].split(' [')[0] + "</option></select>").replace("> and I<","> and me<").replace("> and They<","> and them<").replace('> and He<','> and him<').replace('> and She<','> and her<').replace("> and they<","> and them<").replace('> and he<','> and him<').replace('> and she<','> and her<'));
}
for (i=0; i<comparearr.length; i++) {
if (comparearr[i].split(';')[0].indexOf(' [') == -1) {
thisrow="<tr id=tr" + i + "><td id=one" + i + ">Is</td><td id=word" + i + ">" + comparearr[i].split(';')[0].split(' [')[0] + "</td><td id=words" + i + "><select id=selword" + i + " onchange=\"prescoreit(this,'" + comparearr[i].split(';')[0].split(" [")[0] + "');\"><option value=>Please select word for " + comparearr[i].split(';')[0].split(' [')[0] + "...</option></select></td><td id=too" + i + "><select size=2 id=stoo" + i + "><option value=than>than</option><option value='out of'>out of</option></select></td><td id=otherwords" + i + ">" + othersel.replace("selo0","selo" + i).replace("<option value='" + comparearr[i].split(';')[0].split(' [')[0] + ("'>" + comparearr[i].split(';')[0].split(' [')[0]).replace("'>I","'>me").replace("'>They","'>them").replace("'>He","'>him").replace("'>She","'>her").replace("'>they","'>them").replace("'>he","'>him").replace("'>she","'>her") + "</option>","") + "</td><td id=otherwordsplus" + i + ">" + otherselplus.replace("seloplus0","seloplus" + i).replace("<option value=' and " + comparearr[i].split(';')[0].split(' [')[0] + ("'> and " + comparearr[i].split(';')[0].split(' [')[0]).replace(' and I',' and me').replace(' and They',' and them').replace(' and He',' and him').replace(' and She',' and her') + "</option>","<option value=' and it'> and it</option>") + "</td><td><input onclick=scoreit(this); title='Click when ready to analyse your answer' type=button id=button" + i + " value=?></input></td></tr>";
} else if (comparearr[i].split(';')[0].indexOf(' [are]') != -1) {
thisrow="<tr id=tr" + i + "><td id=one" + i + ">Are</td><td id=word" + i + ">" + comparearr[i].split(';')[0].split(' [')[0] + "</td><td id=words" + i + "><select id=selword" + i + " onchange=\"prescoreit(this,'" + comparearr[i].split(';')[0].split(" [")[0] + "');\"><option value=>Please select word for " + comparearr[i].split(';')[0].split(' [')[0] + "...</option></select></td><td id=too" + i + "><select size=2 id=stoo" + i + "><option value=than>than</option><option value='out of'>out of</option></select></td><td id=otherwords" + i + ">" + othersel.replace("selo0","selo" + i).replace("<option value='" + comparearr[i].split(';')[0].split(' [')[0] + ("'>" + comparearr[i].split(';')[0].split(' [')[0]).replace("'>I","'>me").replace("'>They","'>them").replace("'>He","'>him").replace("'>She","'>her").replace("'>they","'>them").replace("'>he","'>him").replace("'>she","'>her") + "</option>","") + "</td><td id=otherwordsplus" + i + ">" + otherselplus.replace("seloplus0","seloplus" + i).replace("<option value=' and " + comparearr[i].split(';')[0].split(' [')[0] + ("'> and " + comparearr[i].split(';')[0].split(' [')[0]).replace(' and I',' and me').replace(' and They',' and them').replace(' and He',' and him').replace(' and She',' and her') + "</option>","<option value=' and it'> and it</option>") + "</td><td><input onclick=scoreit(this); title='Click when ready to analyse your answer' type=button id=button" + i + " value=?></input></td></tr>";
} else if (comparearr[i].split(';')[0].indexOf(' [am]') != -1) {
thisrow="<tr id=tr" + i + "><td id=one" + i + ">Am</td><td id=word" + i + ">" + comparearr[i].split(';')[0].split(' [')[0] + "</td><td id=words" + i + "><select id=selword" + i + " onchange=\"prescoreit(this,'" + comparearr[i].split(';')[0].split(" [")[0] + "');\"><option value=>Please select word for " + comparearr[i].split(';')[0].split(' [')[0] + "...</option></select></td><td id=too" + i + "><select size=2 id=stoo" + i + "><option value=than>than</option><option value='out of'>out of</option></select></td><td id=otherwords" + i + ">" + othersel.replace("selo0","selo" + i).replace("<option value='" + comparearr[i].split(';')[0].split(' [')[0] + ("'>" + comparearr[i].split(';')[0].split(' [')[0]).replace("'>I","'>me").replace("'>They","'>them").replace("'>He","'>him").replace("'>She","'>her").replace("'>they","'>them").replace("'>he","'>him").replace("'>she","'>her") + "</option>","") + "</td><td id=otherwordsplus" + i + ">" + otherselplus.replace("seloplus0","seloplus" + i).replace("<option value=' and " + comparearr[i].split(';')[0].split(' [')[0] + ("'> and " + comparearr[i].split(';')[0].split(' [')[0]).replace(' and I',' and me').replace(' and They',' and them').replace(' and He',' and him').replace(' and She',' and her') + "</option>","<option value=' and it'> and it</option>") + "</td><td><input onclick=scoreit(this); title='Click when ready to analyse your answer' type=button id=button" + i + " value=?></input></td></tr>";
}
//alert(thisrow);
//thisrow="<tr id=tr" + i + "><td id=subject" + i + ">" + comparearr[i].split(';')[0] + "</td><td id=words" + i + "><select id=selword" + i + " onchange=scoreit(this,'" + comparearr[i].split(';')[0] + "');><option value=>Please select a word applicable to " + comparearr[i].split(';')[0] + "...</option></select></td><td id=okwords" + i + "></td></tr>";
thesewords=comparearr[i].split(';')[1].split(',');
var adjis='', kk, kks;
for (j=0; j<thesewords.length; j++) {
if (thesewords[j].indexOf('/') == -1) {
adjis=thesewords[j];
thesewords[j]+='/' + adjis + 'er/the ' + adjis + 'est';
} else {
kks=thesewords[j].split('/');
thesewords[j]=kks[0] + '/' + kks[1] + '/the ' + kks[2];
}
for (kk=1; kk<=2; kk++) {
k = ourwordlist.indexOf(thesewords[j].split('/')[kk]);
if (k == -1) {
ourwordlist.push(thesewords[j].split('/')[kk]);
ourwordassociation.push(";" + comparearr[i].split(';')[0].split(' [')[0]);
} else {
if (ourwordassociation[k].indexOf(comparearr[i].split(';')[0].split(' [')[0]) == -1) {
ourwordassociation[k] += ',' + comparearr[i].split(';')[0].split(' [')[0];
//alert(ourwordlist[k] + " has word associations " + ourwordassociation[k]);
}
}
}
}
document.getElementById('mytbody').innerHTML+=thisrow;
}
for (i=0; i<ourwordlist.length; i++) {
ourwordlist[i] += ourwordassociation[i];
}
ourwordlist.sort();
for (i=0; i<ourwordlist.length; i++) {
selinnards += "<option " + modeprefix + "title='" + ourwordlist[i].split(';')[1] + "' value='" + ourwordlist[i].split(';')[0] + "'>" + ourwordlist[i].split(';')[0] + "</option>";
}
for (i=0; i<comparearr.length; i++) {
document.getElementById('selword' + i).innerHTML += selinnards;
}
fillintable(-1,'');
} else if (phase < 0) {
phase = phase;
} else {
location.href='./compared_to.html?addthis=' + encodeURIComponent(addthis) + '&score=' + score + '&goes=' + goes;
}
}
function ask() {
var youridea=prompt('What is your own subject area (of the form)? For multiple new subject area ideas try "Horses [are];fast,slow,small,big/bigger/biggest","Blood Hound;fast,slow,small,big/bigger/biggest" type of entry.', 'Horses [are];fast,slow,small,big/bigger/biggest');
if (youridea != null) {
if (youridea != '') {
fillintable(1, youridea);
}
}
}
</script>
</head>
<body onload=" fillintable(0,''); " style="background-color:cyan;">
<h1>Comparisons and Superlatives <div id='ifnm' style=display:inline;></div> <a title='Your Own Subject Area' style='text-decoration:underline;cursor:pointer;' onclick='ask();'>+</a></h1>
<h3>RJM Programming - December, 2016</h3>
<h3>Thanks to Five-Minute Activities by Penny Ur and Andrew Wright page 9</h3>
<h4 id=score>Score: 0 from 0 Goes</h4>
<table cellpadding=10 cellspacing=10 border=20 id='mytable' style='background-color:#FFFF99;'><tbody id='mytbody'><tr><th>Is<br>Are<br>Am</th><th>First <br>Compare <br>Word <br><font size=1>(the <i>subject</i> of the <i>question</i> (sentence))</font></th><th>Applicable <br>Adjective <br>List</th><th>Than<br>Out of</th><th>Second <br>Compare/Superlative <br>Word</th><th>More than <br>Second <br>Superlative <br>Words (optional)</th><th>?</th></tr></tbody></table>
</body>
</html>