function Question (qname,
type,
qstring,
response,
comment,
corrects,
explan,
score,
ifcorrect,ifwrong,ifnull,
img)
{this.qname=qname;
this.type=type;
this.qstring=qstring;
this.response=response;
this.comment=comment;
this.corrects=corrects;
this.explan=explan;
this.score=score;
this.ifcorrect=ifcorrect;
this.ifwrong=ifwrong;
this.ifnull=ifnull;
this.img=img;
}

var zin=1,top=0, mycount=0, waitTime=0, qright=0, mycomment;
var global=new Array(3);
var recent, recent2, recdone=false, opera7, opera=CheckOpera56();
function cachewrite(s,idx){global[idx]+=s;}
function CheckOpera56()
{
var version;
if (navigator.userAgent.toLowerCase().indexOf('opera') == -1) return false;
version=parseInt(navigator.appVersion.toLowerCase());
if (version>6) {opera7=true; return false;}
if (version<5) return false;
return true;
}
resp=new Array("bet","check and call","check and fold","check and raise")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest001 = new Question(
"Question 1",
0,
"<font face=\"Arial\" size=\"2\">You have 8</font><img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/><font face=\"Arial\" size=\"2\">&#160;7</font><img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/><font face=\"Arial\" size=\"2\">&#160;in the big blind. An early position player raises, two players call, and the small blind folds. You call. The flop comes J</font><img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/><font face=\"Arial\" size=\"2\">&#160;9</font><img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/><font face=\"Arial\" size=\"2\">&#160;4</font><img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/><font face=\"Arial\" size=\"2\">. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">You have a gutshot draw and a back door flush draw, which gives you about a 22% chance of improving to a strong hand by the river. But notice that any ten could give someone a higher straight, and that the hand that would make this higher straight&mdash;namely, KQ&mdash;is a hand that many players will call a raise with. Thus, the odds of this hand actually being out are probably slightly higher than usual. Also, the Ts could be a disaster. Even if the pre-flop raiser bets and everyone calls you&rsquo;re only getting about 11:1 on the call, which isn&rsquo;t all that much of an overlay.</font></small>",
valu,
1,
0,
0,
"");

resp=new Array("bet","check and call","check and fold","check and raise")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest002 = new Question(
"Question 2",
0,
"<font face=\"Arial\" size=\"2\">You have A<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 3<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> in the small blind. A middle position player raises, and four players call. You call and big blind calls. The flop comes A<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 9<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 5<img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">This is a toughie, as you could make a case for all four options. Betting is OK here, so long as you feel you could comfortably call the raise and fold on the turn if you check, there&rsquo;s a bet and a 3 didn&rsquo;t drop on the turn. Otherwise you&rsquo;re looking for one of the other three options. Typically, I check in this spot. If the pre-flop raiser bets and two other players call I might fold, since I have to worry about my kicker. If the pre-flop raiser bets and only one (or no) players call I&rsquo;ll either check raise the flop or call the flop bet and lead out on the turn (with the intention of folding if I&rsquo;m raised). If any of your opponents are maniacs you&rsquo;re probably going to have to show this hand down, which means folding at any spot is out of the question. If your opponents are reasonable, however, the above technique should yield the information you need in order for you to play the hand well. </font><br></small>",
valu,
1,
0,
0,
"");

resp=new Array("reraise","call","fold")
corr=new Array("1","0","0")
comm=""
valu=""
quest003 = new Question(
"Question 3",
0,
"<font face=\"Arial\" size=\"2\">You&rsquo;re in the big blind with the K<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> Q<img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. Two players call in late position, the small blind calls and you check. The flop comes K<img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 8<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 6<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. You bet, one of the pre-flop callers raises, and all fold back to you. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">You almost certainly have the best hand right now, as your opponent would have likely raised before the flop with AK. His most likely hands are KJ, KT, or a flush draw&mdash;all hands you would like to collect more money from.</font></small>",
valu,
1,
0,
0,
"");

resp=new Array("bet","check with the intention of raising","check with the intention of calling, and betting on the turn","call with the intention of calling, and check-raising (or lead betting) the turn")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest004 = new Question(
"Question 4",
0,
"<font face=\"Arial\" size=\"2\">You have 9<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 9<img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> in early position. One person calls, and you call. All fold to the button who raises. both of the blinds call, the other early position player calls, and you call. The flop comes 9<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 6<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 4<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">Bet your hand. Notice that if the pre-flop raiser raises your bet (and he will raise if he has an overpair), the rest of the field is going to be looking at calling two bets cold. As with the last example, there&rsquo;s no guarantee that anyone who has a hand that you&rsquo;d like to see fold will in fact fold for two bets. However, because of your position relative to the pre-flop raiser, there&rsquo;s no obvious way to be sure the rest of the field will be forced to call two bets cold on the turn if you just check and call the flop. If you call the flop, then lead bet the turn, the pre-flop raiser may just call your turn bet with a hand as big as an overpair, since he may be afraid that you&rsquo;ve slowplayed a monster (which in fact you have). If you were on the pre-flop raiser&rsquo;s left, you <i>could </i>make an argument of just calling a flop bet with the intention of raising a turn bet, since in this scenario you could force the field to call two bets cold. But that&rsquo;s not the case here.</font><br><br /><br><font face=\"Arial\" size=\"2\">A good rule of thumb is this: If the player who is most likely to have a quality hand is on your <i>right,</i> you can consider just calling on the flop with the intention of raising the turn. If, however, that player is on your <i>left,</i> you usually can&rsquo;t consider this play, since you can&rsquo;t be sure he&rsquo;ll raise on the turn for you if you bet the turn. Also, notice that in this case you&rsquo;re in great shape if the pre-flop raiser raises your flop bet. You&rsquo;ve got the nuts right now (always a nice spot to be in), and if either of the blinds or the other early position player calls the pre-flop raiser&rsquo;s flop raise you&rsquo;ll be able to then make it three bets, thereby charging them a small fortune to continue with their goofy draws. Almost anytime you can get three bets into the pot on the flop with a big hand you should do so, as there&rsquo;s no guarantee that everyone will be as in love with their hands on the turn as they are on the flop. As we mentioned in the Hold &lsquo;em primer, the whole idea behind poker is to charge your opponents as much as possible to continue with their hands when you have a big holding. </font><br></small>",
valu,
1,
0,
0,
"");

resp=new Array("call with the intention of raising the turn","raise")
corr=new Array("0","1")
comm=""
valu=""
quest005 = new Question(
"Question 5",
0,
"<font face=\"Arial\" size=\"2\">You have Q<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> J<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> in middle position. Two players call, you call, and the button and both blinds call. The flop comes: Q<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> J<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 6<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. The first player bets, and the second player raises. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">There are a lot possible hands out there that could be drawing to an inside straight, and you&rsquo;d like to get these hands to fold; if being forced to call three bets cold on the flop won&rsquo;t persuade them to muck, then nothing will. Further, while you probably won&rsquo;t get a flush draw to fold you&rsquo;d like to charge him as much as possible to continue with the hand while he&rsquo;s still an underdog. Notice that the pot only has nine small bets in it when the action gets to you, and that by raising you&rsquo;ll put an additional three bets in, thereby giving someone who wants to draw only 4:1 on their money (the twelve small bets that are in the pot after you&rsquo;ve raised verses the three small bets they have to put in to continue with the hand). By giving your opponents these kinds of horrible odds, you&rsquo;ll have a chance of getting hands like Ac 6c, or Ad Td, to fold. Since these are hands that you&rsquo;d<i> like </i>to see fold, since they&rsquo;re draws are &lsquo;live&rsquo; against your hand, it behooves you to charge them as much as possible. </font><br><br /><br><font face=\"Arial\" size=\"2\">As we said in the last example, anytime you three-bet a flop with a big hand you&rsquo;re probably making the right move. Raise this puppy to the hilt.</font><br></small>",
valu,
1,
0,
0,
"");

resp=new Array("call","fold","raise")
corr=new Array("0","0","1")
comm=""
valu=""
quest006 = new Question(
"Question 6",
0,
"<font face=\"Arial\" size=\"2\">You have K<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 7<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> on the button. Four players call to you, you call and one blind calls. The flop comes T<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 6<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 5<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. The big blind bets and two players call. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">You&rsquo;ve got nine outs to the flush, and a probable three more outs to the king. With what appears to be a twelve-out hand, you&rsquo;re going to improve your hand by the river around 40% of the time. When your odds of improving are this good you can comfortably raise for value. </font><br><br /><br><font face=\"Arial\" size=\"2\">In earlier examples we discussed raising with hands where you wanted people to fold. With a hand like this, however, you want people to call. If you hit a diamond you have a big hand, and if you don&rsquo;t hit one you have nothing. Thus, you&rsquo;d like to have other players along for the ride, since that increases your chances of having someone around to pay you off if you do hit. Note that there are no players left to act between you and the player in the blind who lead bet the flop, so a raise here won&rsquo;t knock anyone out (players who have already called one bet will almost always call a second bet here). Also, if the turn is a brick everyone might check to you, thereby affording you the luxury of checking along with them and looking at the river card &lsquo;for free&rsquo;. If, however, you do hit on the turn, you&rsquo;ll be betting a big hand into a pot that&rsquo;s three bets bigger (assuming the blind and the two other players call your raise) then it would have been if you just called the flop.</font><br><font face=\"Arial\" size=\"2\">&#160; </font><br></small>",
valu,
1,
0,
0,
"");

resp=new Array("call","fold")
corr=new Array("0","1")
comm=""
valu=""
quest007 = new Question(
"Question 7",
0,
"<font face=\"Arial\" size=\"2\">You have A<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> Q<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> in middle-to-late position. Two callers to you and you raise. Both blinds call. The flop comes T<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 9<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 6<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. The small blind bets, the big blind folds, and the next player raises. All fold to you. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">You have about a 10% chance of spiking an ace or a queen on the turn, but you&rsquo;re only getting pot odds of 6.5:1. Even with your implied odds (see the article <i>Pot Odds 101</i> for a more detailed explanation of this) you&rsquo;re not getting enough of an overlay to call. Also, the ace or queen of hearts could be bad cards for you. In sum, you&rsquo;ve missed the flop and your opponents haven&rsquo;t. Fold here and look for a&#160; better spot for your money.</font><br></small>",
valu,
1,
0,
0,
"");

resp=new Array("check, with the intention of check-raising if someone behind you bets","check, with then intention of dumping as much money as possible in the pot on hte turn","bet")
corr=new Array("0","0","1")
comm=""
valu=""
quest008 = new Question(
"Question 8",
0,
"<font face=\"Arial\" size=\"2\">You have T<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> T<img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> in middle position. Two callers to you, you call, and the button and both blinds call. The flop comes T<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> T<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 8<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. All check to you. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">The flop is coordinated, which means there are probably at least a few players who have at least a piece of this flop. Since almost everyone is drawing dead to your hand, you&rsquo;d like to collect as many bets as possible from your opponents. Also, note that nobody is going to dream you&rsquo;ve got quads, since 99% of all Hold &lsquo;em players would check here, worried that a bet might &lsquo;scare off&rsquo; customers. But notice that anybody who could make a quality second best hand on the turn will happily call a bet here. Nobody&rsquo;s folding a hand like Jd 9d, or Ah 3h, or even something like Qs Js. Since your chances for really collecting big money on this hand lay with the possibility that someone could make a big second-best hand you might as well bet, since you&rsquo;re not going to scare these people off. In other words, anyone who has a hand that you&rsquo;d like to see continue on is going to continue on, whether you bet or not. Thus, you might as well bet.</font><br><br /><br><font face=\"Arial\" size=\"2\">Further, as we mentioned earlier there isn&rsquo;t a player on the planet who&rsquo;s going to think your bet represents quad tens. In fact, by betting here they&rsquo;ll think you <i>don&rsquo;t </i>have a hand that big. If someone hits a straight or a flush on the turn they might give you a ton of action, as they may assume you&rsquo;re just overplaying trip tens. Mediocre players often slowplay the nuts on the flop, even if the situation doesn&rsquo;t warrant it. By playing your hand &lsquo;fast&rsquo; here your hand will gain some &lsquo;deception&rsquo; value, which could parlay into big profits on the turn and/or river. </font><br></small>",
valu,
1,
0,
0,
"");

resp=new Array("raise","call","fold")
corr=new Array("0","1","0")
comm=""
valu=""
quest009 = new Question(
"Question 9",
0,
"<font face=\"Times New Roman\" size=\"2\">You have the 5<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 4<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> on the button, and call after four other players have called. The small blind calls and the big blind checks. The flop comes Q<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 6<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 3<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>.&#160; The small blind bets, the big blind calls and all others fold to you. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">I would typically call here. You&rsquo;re getting 9:1 in immediate odds from the pot, and the fact that you have position on the raiser means you should be able to extract the maximum if you spike a six. The key here is that the flop is a rainbow. If the board was two-suited (in a suit other than spades, obviously) I would fold.</font></small>",
valu,
1,
0,
0,
"");

resp=new Array("call","fold","raise")
corr=new Array("0","1","0")
comm=""
valu=""
quest010 = new Question(
"Question 10",
0,
"<font face=\"Arial\" size=\"2\">You have the J<img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> J<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>, and raise in middle position after one limper. Two players behind you call the raise, the small blind and big blind both call, and the original limper calls as well. The flop comes K<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> T<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 7<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. The small blind bets, the big blind raises, and the original limper folds. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">You are getting 7.5:1 in pot odds right now, and you&rsquo;re about a 22:1 dog to hit a jack on the turn. To make matters worse you have no idea what kinds of hands are left behind you to act. If one of the players who cold called your raise has AQ you have no outs against someone holding a king. There are much better places for your money than this hand. </font><br></small>",
valu,
1,
0,
0,
"");

resp=new Array("raise","call","fold")
corr=new Array("1","0","0")
comm=""
valu=""
quest011 = new Question(
"Question 11",
0,
"<font face=\"Arial\" size=\"2\">You hold the T<img src=\"spade.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> T<img src=\"club.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>, and raise in middle position after one limper. Only the big blind and the original limper call. The flop comes 9<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 7<img src=\"heart.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/> 3<img src=\"diamond.PNG\" width=\"11\" height=\"11\" border=\"0\" alt=\"graphic\"/>. The big blind bets and the limpoer raises. You should:</font><br>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"2\">If someone has a set you&rsquo;re just going to have to lose a bunch of chips&mdash;there&rsquo;s no way around. Most of the time, however, you&rsquo;ll find yourself up against a pair of either 9&rsquo;s or 7&rsquo;s and a flush draw, which means you should finish the hand as a winner about &#189; the time. Since you&rsquo;re getting 2:1 on every dollar you put in you shouldn&rsquo;t be afraid to pump up the pot. If someone catches a card to beat you at least you have the consolation of knowing you got your money in with the best of it.</font><br></small>",
valu,
1,
0,
0,
"");

questions = new Array (
quest001,quest002,quest003,quest004,quest005,quest006,quest007,quest008,quest009,quest010,quest011)

function doQuestion(quest)
{
var numdo;
var numord=eval(quest+1);
var i=-1, ii, type, myname, gadget;
type=questions[quest].type;
numdo=type>=3?1:questions[quest].response.length;


document.writeln ("<a name=\""+questions[quest].qname+"\"></a>")
document.write("\n")
document.write("       ")
if (questions[quest].img!="") {
document.write("\n")
document.write("          <p><img border=\"0\" src=\"")
document.write(questions[quest].img)
document.write("\"></p>\n")
document.write("       ")
}
document.write("\n")
document.write("       <p><small><font face=\"Verdana,Arial\">")
document.write(numord)
document.write(". ")
document.writeln(questions[quest].qstring)
document.write("</font></small></p>\n")
document.write("       ")
for (i=0; i<numdo; i++) {
myname=questions[quest].qname;
gadget="radio";
if (type>=3) gadget="text";
else if (type==1) {
myname+="_"+(i<9?"0":"")+(i+1);
gadget="checkbox";}
document.write("\n")
document.write("          ")
document.write(type==7?"<textarea name=\""+myname+"\" rows=5 cols=30 class=\"input\">":" <input type="+gadget+" name=\""+myname);
if (type<3) document.write("\" value=\""+i+"\">\n")
else document.write(type==7?"</textarea>":"\" class=\"input\" value=\"\">\n")
document.write(" <small><font face=\"Verdana,Arial\">")
if (type<3) document.write(questions[quest].response[i]);
document.write("</font></small><br>\n")
document.write("       ")
}
document.write("\n")
document.write("    ")
}
function doTest() {
var count, i;

count=questions.length;
for (i=0; i<count; i++) doQuestion(i);
}
function fill(s,l){
s=s+""
for (y=1;y<=l;y++)
if (s.length>=l) break; else s="0"+s;
return s
}
function CheckQName(wapf,ii,i,multi,selection){
var len;
if (!multi) return(wapf.elements[ii].name==questions[i].qname);
len=questions[i].qname.length;
if (wapf.elements[ii].name.substring(0,len)!=questions[i].qname) return false;
if (wapf.elements[ii].name.substring(len,len+1)!="_") return false;
if (eval(wapf.elements[ii].name.substring(len+1,len+3))==(selection+1)) return true;
return false;
}
function errore(uno,due,tre)
{
if (!errori) global[1]="<H3>You have made the following errors</H3>";
++errori;
cachewrite("<p><b>"+uno+"</b><br>"+due+"<br>"+mycomment+tre+"</p>",2);
mycomment="";
}
function testIE5plus(){
var pos=navigator.appVersion.lastIndexOf('MSIE ');
if (pos != -1) {
pos+=5;
if (eval(navigator.appVersion.charAt(pos))>4)
return true;}
return false;}
function correct(wapf)
{
var i, ii, t, re, tmp, selection, multi, multipage=0, type, isnull, iswrong, iscorrect, evaluation=0, total=0, udat;
errori=waitTime=0;
udat=new Array();
for (i=0, ii=0; i<wapf.elements.length; i++)
{tmp=wapf.elements[i];
if (tmp.name.substring(0,13)=="Quiz.UserData"){
t=tmp.name.substring(14,tmp.name.length);
re=new RegExp("_", "g");
t=t.replace(re," ");
udat[ii++]=t+": <i>"+tmp.value+"</i><br>";
if (opera) tmp.value="";}}
global[0]=global[2]="";
global[1]="<h3>Congratulations, you haven't made any errors</h3>";
cachewrite("<html><head><title>Results</title><BASE target='_blank'></head><body bgcolor='#FFFFFF'><font face='Verdana, Arial'><table border=0 cellpadding=0 cellspacing=0 width='100%' bgcolor='#C0C0C0'><tr><td width='100%'><font face='Verdana, Arial' size=5 color='#FFFFFF'><b>&nbsp;Results</b></font></td></tr></table>",0)
now= new Date()
cachewrite("<small><p>"+fill((now.getMonth()+1),2)+"/"+fill(now.getDate(),2)+"/"+now.getYear()+"&nbsp;&nbsp;"+fill(now.getHours(),2)+":"+fill(now.getMinutes(),2)+"</p>",0)
cachewrite("<b>Quiz: How's Your Play on the Flop?</b><br><br>\n",0);
if (udat.length>0) {
cachewrite("<b>Information</b><br>\n",0);
for (i=0; i<udat.length; i++) cachewrite(udat[i],0);}
if (opera7 && multipage) {
for (i=0; i<questions.length; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.display=id2.style.display="block";}
document.getElementById('wq_final').style.display='block';
}

for (i=0; i<questions.length; i++) {
if (opera && multipage) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.visibility=id2.style.visibility="visible";}
type=questions[i].type;
if (type==1) multi=1;
else multi=0;
isnull=true;
iscorrect=false;iswrong=false;
selection=0;
evaluation=0;
mycomment="";
for (ii=0; ii<wapf.elements.length; ii++) {
if (CheckQName(wapf,ii,i,multi,selection)) {
if (type>=3 && wapf.elements[ii].value!="") {
isnull=false;
if (wapf.elements[ii].value.toLowerCase()==questions[i].corrects.toLowerCase()) iscorrect=true;
else iswrong=true;
++selection;}
else if (wapf.elements[ii].checked) {
if (questions[i].score!="") evaluation+=questions[i].score[selection];
if (isnull) isnull=false;
if (questions[i].corrects[selection]=="1") iscorrect=(iswrong==false)?true:false;
else {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  shouldn't have been selected.",questions[i].explan)
}
if (questions[i].comment!="" && questions[i].comment[selection]!="")
mycomment+=((iscorrect || questions[i].corrects=='')?"<b>"+questions[i].qname+"</b><br>":"")+"<small>"+questions[i].comment[selection]+"</small><br>";
} else {
if (questions[i].corrects[selection]=="1") {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  should have been selected.",questions[i].explan);
}}
++selection;
}}
if (multi==false && (isnull || iswrong)) {
var okresp="", z;
if (type>=3) okresp=questions[i].corrects;
else {
for (z=0; z<questions[i].corrects.length; z++) {
if (questions[i].corrects[z]==1) {
okresp=questions[i].response[z];
break;
}}}
if (okresp!="") errore(questions[i].qname,"The right answer was <i>"+okresp+".</i>",questions[i].explan);
}
if (mycomment!="") cachewrite(mycomment,2);
if (questions[i].corrects!="") ++qright;
if (isnull) evaluation+=questions[i].ifnull;
else if (iswrong) evaluation+=questions[i].ifwrong;
else if (iscorrect) evaluation+=questions[i].ifcorrect;
total+=evaluation;}
if (qright==0) global[1]="<br>";
if (errori) cachewrite("<br><b>You have made "+errori+" "+(errori==1?"error":"errors")+".</b>",2);
cachewrite("<br><b>Total score: "+total+".</b><br>",2);

cachewrite("</small><hr noshade><center><form>",2)
printest=(((navigator.appName=="Netscape") && (navigator.appVersion.charAt(0)>="4")) || (testIE5plus() == true))? "print()": "alert('This button can be used with Netscape Navigator 4 or Microsoft Internet Explorer 5 only. If you want to print with other browsers, please select the Print command in the File menu.')"
cachewrite("<input type='button' value='Print...' onClick='"+printest+"'>&nbsp;&nbsp;&nbsp;&nbsp;",2)
cachewrite("<input type='button' value='Close' onClick='window.close()'></form></center>",2)
cachewrite(aknw,2)
winr=window.open('','wapres', 'titlebar=1,location=0,directories=0,menubar=1,toolbar=0,scrollbars=1,resizable=1,status=1')
for (i=0; i<3; i++) winr.document.write(global[i]);winr.document.close()
if ((opera || opera7) && multipage) {
document.forms[0].elements[0].value='Print...';
document.forms[0].elements[1].value='Close';
for (i=0; i<questions.length; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
opera?id.style.visibility=id2.style.visibility="hidden":id.style.display=id2.style.display="none";}}
}
aknw="<br><p align='center'><small><small>Created and managed with <a title='Click here to visit WebQuiz site' href='http://www.smartlite.it/go.asp?OLDLP' target = '_blank'>SmartLite WebQuiz</a></small></small></p>"
