// 1);
if (this.gecko){
this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf('Gecko')+6, this.ua.length));
if (this.geckoVer < 20020000){this.min = false;}
}
//Look for Firebird
this.firebird = (this.ua.indexOf('Firebird') > 1);
//Look for Safari
this.safari = (this.ua.indexOf('Safari') > 1);
if (this.safari){
this.gecko = false;
}
//Look for IE
this.ie = (this.ua.indexOf('MSIE') > 0);
if (this.ie){
this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf('MSIE')+5, this.ua.length));
if (this.ieVer < 5.5){this.min = false;}
}
//Look for Opera
this.opera = (this.ua.indexOf('Opera') > 0);
if (this.opera){
this.operaVer = parseFloat(this.ua.substring(this.ua.indexOf('Opera')+6, this.ua.length));
if (this.operaVer < 7.04){this.min = false;}
}
if (this.min == false){
alert('Your browser may not be able to handle this page.');
}
//Special case for the horrible ie5mac
this.ie5mac = (this.ie&&this.mac&&(this.ieVer<6));
}
var C = new Client();
//for (prop in C){
// alert(prop + ': ' + C[prop]);
//}
//CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS
//[strNavBarJS]
function NavBtnOver(Btn){
if (Btn.className != 'NavButtonDown'){Btn.className = 'NavButtonUp';}
}
function NavBtnOut(Btn){
Btn.className = 'NavButton';
}
function NavBtnDown(Btn){
Btn.className = 'NavButtonDown';
}
//[/strNavBarJS]
function FuncBtnOver(Btn){
if (Btn.className != 'FuncButtonDown'){Btn.className = 'FuncButtonUp';}
}
function FuncBtnOut(Btn){
Btn.className = 'FuncButton';
}
function FuncBtnDown(Btn){
Btn.className = 'FuncButtonDown';
}
function FocusAButton(){
if (document.getElementById('CheckButton1') != null){
document.getElementById('CheckButton1').focus();
}
else{
if (document.getElementById('CheckButton2') != null){
document.getElementById('CheckButton2').focus();
}
else{
document.getElementsByTagName('button')[0].focus();
}
}
}
//CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX
var topZ = 1000;
function ShowMessage(Feedback){
var Output = Feedback + '
';
document.getElementById('FeedbackContent').innerHTML = Output;
var FDiv = document.getElementById('FeedbackDiv');
topZ++;
FDiv.style.zIndex = topZ;
FDiv.style.top = TopSettingWithScrollOffset(30) + 'px';
FDiv.style.display = 'block';
ShowElements(false, 'input');
ShowElements(false, 'select');
ShowElements(false, 'object');
ShowElements(true, 'object', 'FeedbackContent');
//Focus the OK button
setTimeout("document.getElementById('FeedbackOKButton').focus()", 50);
//
}
function ShowElements(Show, TagName, ContainerToReverse){
// added third argument to allow objects in the feedback box to appear
//IE bug -- hide all the form elements that will show through the popup
//FF on Mac bug : doesn't redisplay objects whose visibility is set to visible
//unless the object's display property is changed
//get container object (by Id passed in, or use document otherwise)
TopNode = document.getElementById(ContainerToReverse);
var Els;
if (TopNode != null) {
Els = TopNode.getElementsByTagName(TagName);
} else {
Els = document.getElementsByTagName(TagName);
}
for (var i=0; i ReduceToSize){
ItemToDump = Math.floor(InArray.length*Math.random());
InArray.splice(ItemToDump, 1);
}
}
function Shuffle(InArray){
var Num;
var Temp = new Array();
var Len = InArray.length;
var j = Len;
for (var i=0; i InArray[Longest].length){
Longest = i;
}
}
return Longest;
}
//UNICODE CHARACTER FUNCTIONS
function IsCombiningDiacritic(CharNum){
var Result = (((CharNum >= 0x0300)&&(CharNum <= 0x370))||((CharNum >= 0x20d0)&&(CharNum <= 0x20ff)));
Result = Result || (((CharNum >= 0x3099)&&(CharNum <= 0x309a))||((CharNum >= 0xfe20)&&(CharNum <= 0xfe23)));
return Result;
}
function IsCJK(CharNum){
return ((CharNum >= 0x3000)&&(CharNum < 0xd800));
}
//SETUP FUNCTIONS
//BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED
function ClearTextBoxes(){
var NList = document.getElementsByTagName('input');
for (var i=0; i -1)||(NList[i].id.indexOf('Gap') > -1)){
NList[i].value = '';
}
if (NList[i].id.indexOf('Chk') > -1){
NList[i].checked = '';
}
}
}
//EXTENSION TO ARRAY OBJECT
function Array_IndexOf(Input){
var Result = -1;
for (var i=0; i=this.GetL()){if(X<=this.GetR()){if(Y>=this.GetT()){if(Y<=this.GetB()){Result=true;}}}}
return Result;
}
Card.prototype.Inside=CardInside;
function CardSwapColours(){
var c=this.css.backgroundColor;
this.css.backgroundColor=this.css.color;
this.css.color=c;
}
Card.prototype.SwapColours=CardSwapColours;
function CardHighlight(){
this.css.backgroundColor='#000000';
this.css.color='#FFFFFF';
}
Card.prototype.Highlight=CardHighlight;
function CardUnhighlight(){
this.css.backgroundColor='#FFFFFF';
this.css.color='#000000';
}
Card.prototype.Unhighlight=CardUnhighlight;
function CardOverlap(OtherCard){
var smR=(this.GetR()<(OtherCard.GetR()+this.OverlapTolerance))? this.GetR(): (OtherCard.GetR()+this.OverlapTolerance);
var lgL=(this.GetL()>OtherCard.GetL())? this.GetL(): OtherCard.GetL();
var HDim=smR-lgL;
if (HDim<1){return 0;}
var smB=(this.GetB()OtherCard.GetT())? this.GetT(): OtherCard.GetT();
var VDim=smB-lgT;
if (VDim<1){return 0;}
return (HDim*VDim);
}
Card.prototype.Overlap=CardOverlap;
function CardDockToR(OtherCard){
this.SetL(OtherCard.GetR() + 5);
this.SetT(OtherCard.GetT());
}
Card.prototype.DockToR=CardDockToR;
function CardSetHome(){
this.HomeL=this.GetL();
this.HomeT=this.GetT();
}
Card.prototype.SetHome=CardSetHome;
function CardGoHome(){
this.SetL(this.HomeL);
this.SetT(this.HomeT);
}
Card.prototype.GoHome=CardGoHome;
//Fix for 6.2.5.2: avoid image dragging problem in draggable cards
function CardSetHTML(HTML){
this.elm.innerHTML = HTML;
var DragImgs = this.elm.getElementsByTagName('img');
if (DragImgs.length > 0){
for (var i=0; i -1){
//If so, send home any card that is currently docked there
for (var i=0; i OverlapArea){
OverlapArea = Temp;
Result = i;
}
}
return Result;
}
function StartUp(){
//Calculate page dimensions and positions
pg = new PageDim();
DivWidth = Math.floor((pg.W*4)/5);
DragWidth = Math.floor((DivWidth*3)/10);
LeftColPos = Math.floor(pg.W/15);
RightColPos = pg.W - (DragWidth + LeftColPos);
DragTop = parseInt(document.getElementById('CheckButtonDiv').offsetHeight) + parseInt(document.getElementById('CheckButtonDiv').offsetTop) + 10;
if (C.ie){
DragTop += 15;
}
//Reduce array if required
if (QsToShow < F.length){
ReduceItems2();
}
//Shuffle the left items if required
if (ShuffleQs == true){
F = Shuffle(F);
}
//Shuffle the items on the right
D = Shuffle(D);
var CurrTop = DragTop;
var TempInt = 0;
var DropHome = 0;
var Widest = 0;
var CardContent = '';
for (var i=0; i Widest){
Widest = FC[i].GetW();
}
}
if (Widest > DragWidth){Widest = DragWidth;}
CurrTop = DragTop;
DragWidth = Math.floor((DivWidth-Widest)/2) - 24;
RightColPos = DivWidth + LeftColPos - (DragWidth + 14);
var Highest = 0;
var WidestRight = 0;
for (i=0; i DragWidth){DC[i].SetW(DragWidth);}
DC[i].css.cursor = 'move';
DC[i].css.backgroundColor = '#FFFFFF';
DC[i].css.color = '#000000';
TempInt = DC[i].GetH();
if (TempInt > Highest){Highest = TempInt;}
TempInt = DC[i].GetW();
if (TempInt > WidestRight){WidestRight = TempInt;}
}
//Fix for 6.2: the reduction by 12 seems to be required -- no idea why!
var HeightToSet = Highest-12;
var WidthToSet = WidestRight-12;
for (i=0; i QsToShow){
ItemToDump = Math.floor(F.length*Math.random());
for (j=ItemToDump; j<(F.length-1); j++){
F[j] = F[j+1];
}
for (j=ItemToDump; j<(D.length-1); j++){
D[j] = D[j+1];
}
F.length = F.length-1;
D.length = D.length-1;
}
}
function TimerStartUp(){
setTimeout('StartUp()', 300);
}
function CheckAnswers(){
if (Locked == true){return;}
//Set the default score and response
var TotalCorrect = 0;
Score = 0;
var Feedback = '';
//for each fixed, check to see if the tag value for the draggable is the same as the fixed
if (AnswersTried.length > 0){AnswersTried += ' | ';}
var i, j;
for (i=0; i0){AnswersTried += ',';}
AnswersTried += D[i][1] + '.' + D[i][2] + '';
if ((D[i][2] == D[i][1])&&(D[i][2] > 0)){
TotalCorrect++;
}
else{
//Change made for version 6.0.3.41: don't send wrong items home,
//show them in a more conspicuous way.
// DC[i].GoHome();
DC[i].SetL(DC[i].GetL() + 10);
DC[i].Highlight();
}
}
Score = Math.floor((100*(TotalCorrect-Penalties))/F.length);
var AllDone = false;
if (TotalCorrect == F.length) {
AllDone = true;
}
if (AllDone == true){
Feedback = YourScoreIs + ' ' + Score + '%.';
ShowMessage(Feedback + ' ' + CorrectResponse);
}
else {
Feedback = YourScoreIs + ' ' + Score + '%.' + ' ' + IncorrectResponse;
ShowMessage(Feedback);
Penalties++; // Penalty for inaccurate check
}
//If the exercise is over, deal with that
if ((AllDone == true)||(TimeOver == true)){
TimeOver = true;
Locked = true;
Finished = true;
setTimeout('Finish()', SubmissionTimeout);
WriteToInstructions(Feedback);
}
}
//-->
//]]>
Opposites – Adjectives – 1
Matching exercise
Match the items on the right to the items on the left.