var s0; var s1a; var s1b; var s1c;var s2; var tcorrect = 0;var twrong = 0; var ttotal = 1; var tpercent = 0; tstring = ""; ttemptotal = 0; ttempcorrect = 0; ttempwrong = 0; tsubtotal = "Scores for each set of 10 questions are:<br> ";
var twin; var rpthrs; var rptmns; var rptscs; var rptstr = "";var rptmnth; var rptyr; var rptday;var rptsalt=-1;
function rept(){
var rpttme= new Date();
   rptyr=rpttme.getFullYear();
   rptmnth=(rpttme.getMonth() + 1);
	 rptday=rpttme.getDate();
   rpthrs= rpttme.getHours();
   rptmns= rpttme.getMinutes();
	 s0=location.pathname;
	 s1a=0;s1a=s0.lastIndexOf("\\");
	 s1b=0;s1b=s0.lastIndexOf('/');
	 s1c=Math.max(s1a,s1b)
	 s2=s0.substr(s1c);
	 if (rptsalt==-1){rptsalt=(Math.floor(50*(Math.random()))+11)};
	 if (rptmns < 10){rptstr = (rpthrs + ":0" + rptmns + "," + rptmnth + "/" + rptday + "/" + rptyr)}
	 else {rptstr = (rpthrs + ":" + rptmns + "," + rptmnth + "/" + rptday + "/" + rptyr)}
   ttotal = (tcorrect + twrong);
   rptscs= (ttotal+rpthrs*3777+rptmns*59+rptyr+rptmnth+rptday+rptsalt+tcorrect);
	 tpercent = Math.round(tcorrect/ttotal*100);
   if (ttotal>9){temp_string=("<html><body> Date: " + rptstr + "<p> Correct = " + tcorrect + "&nbsp;&nbsp; Incorrect = " + twrong + "<br>Total Questions = " + ttotal + "<br>Percent correct = " + tpercent + "<p>" + tsubtotal + "The remaining questions had: " + ttempcorrect + " correct & " +ttempwrong + " incorrect<hr> The lessons on the <a href='report-example.htm'>Math CD</a> have enhanced reporting.<hr></body></html>"); 	twin = window.open("", "_blank", "width=" + 500 + ",height=" + 250 + ",status=no,menubar=no,toolbar=yes,scrollbars=yes,resizable=yes,dependent=yes;alwaysRaised=yes,screenX=0,screenY=0")}
   else {temp_string=("<html><body> Date: " + rptstr + "<p> Correct = " + tcorrect + "&nbsp;&nbsp; Incorrect = " + twrong + "<br>Total Questions = " + ttotal + "<br>Percent correct = " + tpercent + "<p>" + "The questions had: " + ttempcorrect + " correct & " +ttempwrong + " incorrect<hr> The lessons on the <a href='report-example.htm'>Math CD</a> have enhanced reporting.<hr></body></html>"); 	twin = window.open("", "_blank", "width=" + 500 + ",height=" + 250 + ",status=no,menubar=no,toolbar=yes,scrollbars=yes,resizable=yes,dependent=yes;alwaysRaised=yes,screenX=0,screenY=0")};
  twin.document.write (temp_string);
	twin.document.close();
  twin.focus();
}
genadv0 = new Array;
genadv0[0]="Practice basic arithmetic with the Math CD";
genadv0[1]="Increase your math speed, accuracy and confidence with the Math CD";
genadv0[2]="Master basic arithmetic with the Math CD";
genadv0[3]="Practice math offline with the Math CD";
genadv0[4]="Learn math offline with the Math CD";
genadv0[5]="Master basic arithmetic with the Math CD";
genadv0[6]="Don't tie up a phone line. Buy the Math CD";
genadv0[7]="Increase your math speed, accuracy and confidence with the Math CD";
genadv0[8]="Get ahead in math with the Math CD";
genadv0[9]="Increase your math speed, accuracy and confidence with the Math CD";
genadv0[10]="Pages load faster with the Math CD";
genadv0[11]="Increase your math speed, accuracy and confidence with the Math CD";
genadv0[12]="Bright and Light Colored backgrounds on the Math CD";
genadv0[13]="Add to your math skills with the Math CD";
genadv0[14]="Multiply your math knowledge with the Math CD";
genadv0[15]="Learn basic computation with the Math CD";
genadv0[16]="Add to your math skills with the Math CD.";
genadv0[17]="Add to your math skills with the Math CD.";
genadv0[18]="Add to your math skills with the Math CD.";
genadv0[19]="Learn at your own pace!";
genadv0[20]="Quick mastery of basic arithmetic with the Math CD!";
genadv0[21]="Acquire basic numeracy skills with the Math CD!";
genadv0[22]="Quick mastery of basic arithmetic with the Math CD!";
genadv0[23]="Receive immediate feedback with the Math CD.";
genadv0[24]="Build confidence in your math ability with the Math CD!";
genadv0[25]="Hundreds of interactive math lessons for the price of a music CD!";
genadv0[26]="Quick mastery of basic arithmetic with the Math CD!.";
var genadv1 = new Array; 
genadv1[0] = "cd.htm";
genadv1[1] = "cd.htm";
genadv1[2] = "cd.htm";
genadv1[3] = "cd.htm";
genadv1[4] = "cd.htm";
genadv1[5] = "cd.htm";
genadv1[6] = "cd.htm";
genadv1[7] = "light-example.htm";
genadv1[8] = "cd.htm";
genadv1[9] = "cd.htm";
genadv1[10] = "cd.htm";
genadv1[11] = "cd.htm";
genadv1[12] = "light-example.htm";
genadv1[13] = "cd.htm";
genadv1[14] = "cd.htm";
genadv1[15] = "cd.htm";
genadv1[16] = "cd.htm";
genadv1[17] = "cd.htm";
genadv1[18] = "cd.htm";
genadv1[19] = "cd.htm";
genadv1[20] = "cd.htm";
genadv1[21] = "cd.htm";
genadv1[22] = "cd.htm";
genadv1[23] = "cd.htm";
genadv1[24] = "cd.htm";
genadv1[25] = "number-of-lessons.htm";
genadv1[26] = "cd.htm";

var adno=4;
function wr0genad(){
adno = Math.round(26*Math.random());
document.write("<p></p><center><table BORDER=4 COLS=1 BGCOLOR='#c0c0c0' BORDERCOLOR='#FF0000' width='60%'><tr><td><font face='arial,verdana,helvetica' size='2' COLOR='#000000'>")
document.write("<blockquote><br><center><b><A HREF='" + genadv1[adno] + "'><font color='#0000FF'>" + genadv0[adno] + "</font></a></b></center></blockquote>");
document.write("</font></tr></td></table></center><p></p>");
};

genadvc = new Array;
genadvc[0]="Please tell students and teachers about AAAKnow.com";
genadvd = new Array;
genadvd[0] = "Please tell students and teachers about AAAKnow.com";
var adnoc=0;
function wrbgenad(){
adnoc= Math.round(0*Math.random());
//document.write("<p></p><center><table BORDER=4 COLS=1 BGCOLOR='#FFFF00' BORDERCOLOR='#FF0000' width='60%'><tr><td><font face='arial,verdana,helvetica' size='2' COLOR='#000000'>")
//document.write("<blockquote><br><center><b><A HREF='" + genadvd[adnoc] + "'><font color='#0000FF'>" + genadvc[adnoc] + "</font></a></b></center></blockquote>");
//document.write("</font></tr></td></table></center><p></p>");
};

genadv2 = new Array;
genadv2[0]="Please tell others about this site.";
genadv3 = new Array;
genadv3[0] = "sample.htm";
var adno2;
function wr2genad(){
adno2 = Math.round(0*Math.random());
document.write("<p></p><center><iframe src='http://rcm.amazon.com/e/cm?t=aaamath&o=1&p=13&l=ur1&category=home&banner=1KCJXE8FXDSDTBZ6SWG2&f=ifr' width='468' height='60' scrolling='no' border='0' style='border:none;' frameborder='0'></iframe></center>")
document.write("<p></p>");

//document.write("<p></p><center><table BORDER=4 COLS=1 BGCOLOR='#FFd700' BORDERCOLOR='#FF0000' width='60%'><tr><td><font face='arial,verdana,helvetica' size='2' COLOR='#000000'>")
//document.write("<blockquote><br><center><b><A HREF='" + genadv3[adno2] + "'><font color='#0000FF'>" + genadv2[adno2] + "</font></a></b></center></blockquote>");
//document.write("</font></tr></td></table></center><p></p>");
};


genadv4 = new Array;
genadv4[0]="Buy the Math Lessons on a CD";
genadv5 = new Array;
genadv5[0] = "cd.htm";
var adno4;
function wr6genad(){
adno4 = Math.round(26*Math.random());
};


genadv6 = new Array;
genadv6[0]="Buy the Math Lessons on a CD";
genadv7 = new Array;
genadv7[0] = "cd.htm";
var blank_var; 
blank_var = ("target = '_blank'");
var home_ref; var ref_school; var ref_class;
announce_ref = ("cd.htm'><img SRC='cover5.jpg' BORDER=3 height=150 width=174 alt='Learn About the Math CD'>");
home_ref = ("http://s1.amazon.com/exec/varzea/ts/exchange-glance/Y02Y3506635Y2415835' " + blank_var + "><img SRC='cover5.jpg' BORDER=3 height=150 width=174>");
ref_school = ("http://s1.amazon.com/exec/varzea/ts/exchange-glance/Y02Y1760096Y6801626' " + blank_var + "><img SRC='cover5.jpg' BORDER=3 height=150 width=174>");
ref_class = ("http://s1.amazon.com/exec/varzea/ts/exchange-glance/Y03Y0396046Y7080185' " + blank_var + "><img SRC='cover5.jpg' BORDER=3 height=150 width=174>");
var adno6;
function wr4genad(){
adno6 = Math.round(0*Math.random());
document.write("<br><center><A HREF='" + announce_ref + "</a></b></center><center><b>Math CD. Click Here!</b></center></blockquote>");
};

function wr4cgenad(){
adno6 = Math.round(0*Math.random());
document.write("<br><center><A HREF='" + ref_class + "</a></b></center></blockquote>");
};

function wr4sgenad(){
adno6 = Math.round(0*Math.random());
document.write("<br><center><A HREF='" + ref_school + "</a></b></center></blockquote>");
};

genadv8 = new Array;
genadv8[0]="Buy the Math Lessons on a CD";
genadv9 = new Array;
genadv9[0] = "cd.htm";
var adno8;
function wr8genad(){
adno8 = Math.round(0*Math.random());
document.write("<p></p><center><table BORDER=4 COLS=1 BGCOLOR='#4169e1' BORDERCOLOR='#606060' width='90%'><tr><td><font face='arial,verdana,helvetica' size='2' COLOR='#000000'>")
document.write("<blockquote><br><center><b><A HREF='" + genadv9[adno8] + "'><font color='#ffffFF'>" + genadv8[adno8] + "</font></a></b></center></blockquote>");
document.write("</font></tr></td></table></center><p></p>");
};


genadva = new Array;
genadva[0]="Please tell others about this site";
genadvb = new Array;
genadvb[0] = "sample.htm";
var adnoa;
function wragenad(){
adnoa = Math.round(0*Math.random());
document.write("<p></p><center><iframe src='http://rcm.amazon.com/e/cm?t=aaamath&o=1&p=13&l=ur1&category=home&banner=1KCJXE8FXDSDTBZ6SWG2&f=ifr' width='468' height='60' scrolling='no' border='0' style='border:none;' frameborder='0'></iframe></center>")
document.write("<p></p>");
//document.write("<p></p><center><table BORDER=4 COLS=1 BGCOLOR='#FFFFff' BORDERCOLOR='#228b22' width='60%'><tr><td><font face='arial,verdana,helvetica' size='2' COLOR='#000000'>")
//document.write("<blockquote><br><center><b><A HREF='" + genadvb[adnoa] + "'><font color='#0000FF'>" + genadva[adnoa] + "</font></a></b></center></blockquote>");
//document.write("</font></tr></td></table></center><p></p>");
};
