{card=8*page+2*r+c; // card is question #,
j=QxL[card].split('|');
Answer=Q[j[0]].substr(1,1)
n=Q[j[0]].indexOf('[');m=Q[j[0]].indexOf(']');
if(n>0)
{Part97=Q[j[0]].substr(n,m-n+1);k=m+2;}
else
{Part97='';k=4;}
n=Q[j[0]].indexOf('?');
if(n<0)alert('Question '+j+' in pool has no ?');
Question=Q[j[0]].substr(k,n-k+1);
iA=Q[j[0]].indexOf('A. ',n);iB=Q[j[0]].indexOf('B. ',iA);iC=Q[j[0]].indexOf('C. ',iB);iD=Q[j[0]].indexOf('D. ',iC);
if(iA<0)alert('Question '+j+' has no "A." answer');
if(iB<0)alert('Question '+j+' has no "B." answer');
if(iC<0)alert('Question '+j+' has no "C." answer');
if(iD<0)alert('Question '+j+' has no "D." answer');
A=Q[j[0]].substr(iA+3,iB-iA-4);B=Q[j[0]].substr(iB+3,iC-iB-4);C=Q[j[0]].substr(iC+3,iD-iC-4);D=Q[j[0]].substr(iD+3,10000);
leftT=leftU='
';
j=QxL[card].split('|');
leftT+=j[0]+' '+Part97+'
';
leftT+='
'+Question+'';leftU+=j[0]+'
';
leftT+='
';
leftT+=' |
';
leftT+='A. | '+A+' |
';
leftT+='B. | '+B+' |
';
leftT+='C. | '+C+' |
';
leftT+='D. | '+D+' |
';
leftT+='
';
leftU+='
';
switch (Answer)
{case 'A':leftU+='A. | '+A+' |
';break;
case 'B':leftU+='B. | '+B+' |
';break;
case 'C':leftU+='C. | '+C+' |
';break;
case 'D':leftU+='D. | '+D+' |
';break;
}
leftU+='
';
leftU+='
';
leftU+='ARRL '+PName+' Manual: Page '+j[1]+'-'+j[2]+'
Ham Academy Lesson: '+j[3]+j[4];
leftU+='
'+PName+' Class Questions valid thru 06-30-2015
Emergency Amateur Radio Club - www.earchi.org
';
leftU+='
';
}