chkall=new Array(numxrefs)
for (i=1;i<=numxrefs; i++){chkall[i]=" "}
$okbox='
'
//********************
alph="ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]"
re = / /gi;
//str = "Apples are round, and apples are juicy.";
newstr=str.replace(re, "");
var characterCode //literal character code will be stored in this variable
var x
var y
var wnum
var cnum
function checkEnter(e,wnum,cnum){ //e is event object passed from function invocation
if(e && e.which){ //if which property of event object is supported (NN4)
e = e
characterCode = e.which //character code is contained in NN4's which property
}
else{
e = event
characterCode = e.keyCode //character code is contained in IE's keyCode property
}
//if (characterCode==8) {
//alert(characterCode)
// if (cnum) {
// x=findenum(wnum,cnum)
// }
// else {
// x=wnum
// }
// x=x-1
//alert(x)
// this.form.elements[22].focus()
// return true
//}
findxy(wnum,cnum)
document.forms['frm'].elements[x].value=String.fromCharCode(characterCode).toUpperCase()
document.forms['frm'].elements[y].value=String.fromCharCode(characterCode).toUpperCase()
element=document.forms['frm'].elements[x]
element.style.backgroundColor='beige'
element=document.forms['frm'].elements[y]
element.style.backgroundColor='beige'
// check to see if the first letter of a word
if (cnum==1 || (!cnum && x.substring(1,3) == 1)) {
if (cnum==1) {
var asciiValue = wnum.charCodeAt(0); // asciiValue
}
else {
asciiValue = (x.substring(0,1)).charCodeAt(0)
}
tmp=asciiValue-64
tmpa="IN"+tmp.toString()
chrx=String.fromCharCode(characterCode)
chry=chrx.toUpperCase()
document.getElementById(tmpa).innerHTML=chry //String.fromCharCode(characterCode).toUpperCase()
}
return true
}
// find serial element # from alph and num
function findenum(a,b) {
cntr=0
alert(A+" "+b)
for (i=0; ifunction key(){if (document.f.ky.value=="solve")'
+'{self.close();document.open("printversion.html","solution","width=30,height=30,top=100,left=700")}else {alert("Sorry, not the right key.")}}'+'script>'
ls00=''
ls1='<'+'/HEAD>'+'<'+'BODY>'
ls2=''
pop=window.open("","","width=200,height=200,scrollbars=no,left=500,top=150");
pop.document.write(ls0);
pop.document.write(ls00)
pop.document.write(ls1);
pop.document.write(ls2);
}
function print() {
document.open("printversion.html","print","width=30,height=30,top=100,left=701")
}
//***************
function check() {
for (i=1; i<=numxrefs; i++) {
if (document.forms['frm'].elements[xref[i]].value != newstr.substring(i-1,i).toUpperCase()) {
alert(xref[i]+" Not completed correctly");return false
}
}
alert("Congratulations! Completed correctly.")
return true
}
//***********************
var vis=1
function msg(mnum) {
switch(mnum) {
case 0: document.getElementById("instr").style.visibility="hidden"
break;
case 1:
case 2:
case 3:
case 4:
document.getElementById("instr").style.visibility="visible"
document.getElementById("instr").innerHTML=eval("msg"+mnum)
break;
}
}