var GVTotalNumInSeq = 164; // total number in Algebra I course
if (typeof(GVSpecificNumInSeq) != 'undefined') {
var GVNumberInSeqSentence = "(This is exercise #"+GVSpecificNumInSeq+" of "+GVTotalNumInSeq+" total ";
GVNumberInSeqSentence += "in the online course <a href=\"table_of_contents.htm\">One Mathematical Cat, Please! A First Course in Algebra</a>.)"; }
else {
GVNumberInSeqSentence = "";
} 

var clickOnNewProblem = "Click on \"new problem\" to get started!";
var pracParticularProbType = "Want to practice a particular problem type?";

var probInstructionsTypeInAns = "To get a randomly-generated practice problem,<br/>";
probInstructionsTypeInAns += "click the \"new problem\" button above.<br />";
probInstructionsTypeInAns += "Type your answer in the box below,<br />";
probInstructionsTypeInAns += "and then press \"Enter\".";

var probInstructionsRadioButton = "To get a randomly-generated practice problem,<br/>";
probInstructionsRadioButton += "click the \"new problem\" button above.<br />";
probInstructionsRadioButton += "Select the correct radio button below,<br />";
probInstructionsRadioButton += "and then press \"Enter\".";

var probInstructionsUntimed = "To get a randomly-generated practice problem,<br/>";
probInstructionsUntimed += "click the \"new problem\" button above.<br />";
probInstructionsUntimed += "Think about your answer,<br />";
probInstructionsUntimed += "and then press \"Enter\".";

var typeInAnsInstructions = "Type your answer here, and then press \"Enter\":";

var timingButtonInstructions1 = "Want to time yourself?";
var timingButtonInstructions2 = "When you \"End Timing\" you'll get a summary sheet of your results. Good luck!";
var worksheetInstructions = "";

var typeDesiredNumWkshtProblems = "Type the desired number of worksheet problems here:";
var typeExtraSpaceWkshtProblems = "Want some extra work-space for each problem?<br />Type the desired amount here (units are pixels):";

/* Carol: take out this imbedded style AFTER entire site is updated! */

var adtext = "<div style=\"margin-top:20px;\">"; 
adtext += "<script type=\"text/javascript\"><!--";
adtext += "\n";
adtext += "google_ad_client = \"pub-9842842191946147\";";
adtext += "google_ad_slot = \"4582603325\";";
adtext += "google_ad_width = 728;";
adtext += "google_ad_height = 90;";
adtext += "//-->";
adtext += "</script>";
adtext += "<script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>";
adtext += "</div>";


function needAShortBreak() {
var str;
str = "<div style=\"font-size;small; margin-top:30px; margin-bottom:30px; margin-left:50px;\">";
str += "(Need a short break?<br />";
str += "<a href=\"http://www.onemathematicalcat.org/linkUnderMainTitle.htm\">Get to know the site creator</a>,<br />";
str += "<a href=\"http://www.onemathematicalcat.org/linkUnderMainTitle.htm\">support dynamic math-on-the-web</a>,<br />";
str += "and <a href=\"http://www.onemathematicalcat.org/linkUnderMainTitle.htm\">get some math (and non-math) gift ideas</a>.)";
str += "</div>";
return str;
}

function table_structure(text1,text2,text3,text4,text5) { // for header
var string;
string =  "<table id='pageHeader' style='width:1020px; background-image: url(http://www.onemathematicalcat.org/css/parchment_background.gif)'>";
string += "<tr style='vertical-align:top;'>";
string += "<td style='text-align:center;'>" + text1 + "</td>";
string += "<td style='text-align:center;'>" + text2 + "</td>";
string += "<td style='text-align:center;'>" + text3 + "</td>";
string += "<td style='text-align:center;'>" + text4 + "</td>";
string += "<td style='padding-top:0px; border:0px solid black; text-align:center; width:300px; vertical-align:top;'>" + text5 + "</td></tr></table>";
return string;
}

/*
function myHeader() {
var text="<table style='width:1000px; margin-bottom:12px;'>";
text += "<tr style='vertical-align:top;'>";
text += "<td style='vertical-align:top;'><img src='../../cat_logo.png' style='border:3px solid black;'></td>";
text += "<td style='padding-left:22px;padding-top:5px;'>";
text += "<table><tr><td style='padding-left:10px;padding-right:10px;text-align:center;'>"+KarlSite()+"</td>";
text += "<td style='padding-left:10px;padding-right:10px;text-align:center;'>"+videos()+"</td>";
text += "<td style='padding-left:10px;padding-right:10px;text-align:center;'>"+rentalHome()+"</td></tr>";
text += "<tr><td colspan='3' style='text-align:center;padding-top:10px;'><a href='http://www.onemathematicalcat.org/linkUnderMainTitle.htm'>Shop Amazon</a> and support my site.  Thank you!</td></tr></table>";
text += "</td>";
text += "<td style='padding-left:20px;text-align:center;'>"+website_search()+"</td></tr>";
text += "</table>";
return text;
}
*/

function myHeader() {
var text = table_structure(onlineTutor(),KarlSite(),videos(),rentalHome(),website_search());
return text;
}

function onlineTutor() {
var string;
string = "<a href='http://www.onemathematicalcat.org/linkUnderMainTitle.htm'>Shop Amazon</a><br />";
string += "and support my site";
/*
string = "<a href='http://www.onemathematicalcat.org/mathTutoring.htm'>Online Tutoring<br />with Dr. Fisher</a><br /><br />";
string += "Newest update:<br /><a href='http://www.onemathematicalcat.org/algebra_book/online_problems/horiz_vert_lines.htm'>Horizontal and Vertical Lines</a>";
*/
return string;
}

function seekJob() {
var string = "Professors, Researchers, Publishers:<br /><a href='http://www.onemathematicalcat.org/carol_vita_web.htm'>I can put <em>your</em><br />math on the web</a></a>";
return string;
}

function videos() {
var string = "<a href='http://www.onemathematicalcat.org/movies/movies_toc.htm'>Videos:<br />How to use this website</a>";
return string;
}

function KarlSite() {
var string;
string =  "Karl Finger leads<br />";
string += "<a href='http://www.fingerfolk.com/'>trips around the world</a>";
return string;
}

function KarlSite2() { // Karl's site, plus math-on-the-web
var string;
string =  "Karl Finger leads<br />";
string += "<a href='http://www.fingerfolk.com/'>trips around the world</a><br /><br />";
string += "<a href='http://www.onemathematicalcat.org/carol_vita_web.htm'>I can put <em>your</em><br />math on the web</a></a>";
return string;
}

function guestBook() {
var string;
string =  "Please<br /><a href=\"http://www.onemathematicalcat.org/guestbook.htm\">Sign my Guestbook</a>";
return string;
}

function guestBook2() { // has videos incorporated in it
var string;
string =  "<a href=\"http://www.onemathematicalcat.org/guestbook.htm\">Sign my Guestbook</a><br /><br />";
string += "<a href='http://www.onemathematicalcat.org/movies/movies_toc.htm'>videos:<br /> how to use this website</a>";
return string;
}

function rentalHome() {
var string;
string = "Enjoy our<br /><a href=\"http://www.onemathematicalcat.org/MHome2/RentHome.htm\">Vacation Rental Home</a>";
return string;
}

/* old search engine code; updated to new (below) on 12/7/10
function website_search() {
var str;
str = "<!-- SiteSearch Google --><form method=\"get\" action=\"http://www.google.com/custom\" target=\"_top\">";
str = str + "<table border=\"0\" bgcolor=\"#cccccc\"><tr><td nowrap=\"nowrap\" valign=\"top\" align=\"left\" height=\"32\">";
str = str + "<a href=\"http://www.google.com/\"><img src=\"http://www.google.com/logos/Logo_25gry.gif\" border=\"0\" alt=\"Google\"></img>";
str = str + "</a></td><td nowrap=\"nowrap\"><input type=\"hidden\" name=\"domains\" value=\"www.onemathematicalcat.org\"></input>";
str = str + "<input type=\"text\" name=\"q\" size=\"31\" maxlength=\"255\" value=\"Search my web site!\"></input>";
str = str + "<input type=\"submit\" name=\"sa\" value=\"Search\"></input></td></tr><tr><td>&nbsp;</td><td nowrap=\"nowrap\">";
str = str + "<table><tr><td><input type=\"radio\" name=\"sitesearch\" value=\"\"></input>";
str = str + "<font size=\"-1\" color=\"#000000\">Web</font></td><td><input type=\"radio\" name=\"sitesearch\"";
str = str + "value=\"www.onemathematicalcat.org\"  checked=\"checked\"></input><font size=\"-1\" color=\"#000000\">";
str = str + "www.onemathematicalcat.org</font></td></tr></table><input type=\"hidden\" name=\"client\" value=\"pub-9842842191946147\"></input>";
str = str + "<input type=\"hidden\" name=\"forid\" value=\"1\"></input><input type=\"hidden\" name=\"ie\" value=\"ISO-8859-1\"></input>";
str = str + "<input type=\"hidden\" name=\"oe\" value=\"ISO-8859-1\"></input><input type=\"hidden\" name=\"cof\" value=\"GALT:#008000;GL:1;DIV:#336699;";
str = str + "VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;\"></input>";
str = str + "<input type=\"hidden\" name=\"hl\" value=\"en\"></input></td></tr></table></form><!-- SiteSearch Google -->";
return str;
}
*/


function website_search() {
var str;
str = "<style type=\"text/css\">";
str += "@import url(http://www.google.com/cse/api/branding.css);";
str += "</style>";
str += "<div class=\"cse-branding-bottom\" style=\"padding:5px;background-color:#999999;color:#000000\">";
str += "  <div class=\"cse-branding-form\">";
str += "    <form action=\"http://www.google.com/cse\" id=\"cse-search-box\" target=\"_blank\">";
str += "      <div>";
str += "        <input type=\"hidden\" name=\"cx\" value=\"partner-pub-9842842191946147:vgql7d-ioid\" />";
str += "        <input type=\"hidden\" name=\"ie\" value=\"ISO-8859-1\" />";
str += "        <input type=\"text\" name=\"q\" size=\"31\" value=\"Search my entire site\" />";
str += "        <input type=\"submit\" name=\"sa\" value=\"Search\" />";
str += "      </div>";
str += "    </form>";
str += "  </div>";
str += "  <div class=\"cse-branding-logo\">";
str += "    <img src=\"http://www.google.com/images/poweredby_transparent/poweredby_999999.gif\" alt=\"Google\" />";
str += "  </div>";
str += "  <div class=\"cse-branding-text\">";
str += "    Custom Search";
str += "  </div>";
str += "</div>";
str += "<div style='text-align:center;font-size:small;'>Other math questions? &nbsp; Search my site here.</div>";
return str;
}


function table_structure2(text1,text2,text3) { // for footer
var string;
string = "<table style=\"width:100%; background-image: url(http://www.onemathematicalcat.org/css/parchment_background.gif); background-color:#CCCC99; padding-left:0px; padding-right:0px; margin-top:50px; \">";
string += "<tr>";
string += "<td style=\"vertical-align:top;    width:33%; text-align:left;\"   >" + text1 + "</td>";
string += "<td style=\"vertical-align:middle; width:34%; text-align:center;\" >" + text2 + "</td>";
string += "<td style=\"vertical-align:top;    width:33%; text-align:right;\"  >" + text3 + "</td></tr></table>";
return string;
}

function table_structure3(text1,text2,text3) { // for footer with both MathJax and JSXGraph notices
var string;
string = "<table style=\"width:100%; background-image: url(http://www.onemathematicalcat.org/css/parchment_background.gif); background-color:#CCCC99; padding-left:0px; padding-right:0px; margin-top:50px; \">";
string += "<tr>";
string += "<td style=\"vertical-align:top;    width:25%; text-align:left;\"   >" + text1 + "</td>";
string += "<td style=\"vertical-align:middle; width:50%; text-align:center;\" >" + text2 + "</td>";
string += "<td style=\"vertical-align:top;    width:25%; text-align:right;\"  >" + text3 + "</td></tr></table>";
return string;
}

function table_structure4(text1,text2,text3,text4) { // for footer with four slots
var string;
string = "<table style=\"width:100%; background-image: url(http://www.onemathematicalcat.org/css/parchment_background.gif); background-color:#CCCC99; padding-left:0px; padding-right:0px; margin-top:50px; \">";
string += "<tr>";
string += "<td style=\"vertical-align:top;    width:25%; text-align:left;\"   >" + text1 + "</td>";
string += "<td style=\"vertical-align:top; width:25%; text-align:center;\" >" + text2 + "</td>";
string += "<td style=\"vertical-align:top; width:25%; text-align:center;\" >" + text3 + "</td>";
string += "<td style=\"vertical-align:top;    width:25%; text-align:right;\"  >" + text4 + "</td></tr></table>";
return string;
}

// FunFactAmazonFormulaStr = "$\\displaystyle\\sqrt{\\frac{\\frac{F}{UN}\\cdot \\frac{F}{ACTS}}{A_{ma}+Z_{on}}} = \\sum_{n=1}^{\\infty}\\ \\int_T^H A_{nK}\\cdot S$";
// QEDSqr125GV = "<a href=\"http://www.onemathematicalcat.org/linkUnderMainTitle.htm\" target=\"_blank\" title=\"opens in a new window\"><img src=\"../../AdImages/QEDsmall.png\" /></a>";
// small photo of tree: <a href=\"http://www.onemathematicalcat.org/linkUnderMainTitle.htm\"><img src=\"http://www.onemathematicalcat.org/AdImages/TreeForAd.png\" /></a>

function topTable() {
var string;
string = "";
return string;
}


function botTable() {
var string;
string = "<center><table style=\"padding-bottom:0px; padding-top:40px; text-align:center;\"><tr>";
string += "<td style=\"padding-right:20px; font-family: 'Comic Sans MS', cursive;\">";
string += "<div style=\"border:3px solid green; width:600px;\">";
string += "<div style=\"border:3px solid purple;\">";
string += "<table style='width:100%; height:150px;'>";
string += "<tr><td style='font-size:small; padding-top:0px; padding-bottom:7px; text-align:center; vertical-align:top;'>A random "+funFact()+" about Dr. Fisher (the creator of this web site):</td></tr>";
string += "<tr><td style='font-size:large; text-align:center;'>"+getToKnowMe()+"</td></tr>";
string += "<tr><td style='font-size:small; text-align:center; padding-top:7px; padding-bottom:3px; vertical-align:bottom;'><a href=\"http://www.onemathematicalcat.org/linkUnderMainTitle.htm\">Need a break? Click here for more fun facts.</a></td></tr>";
string += "</table>";
string += "</div></div></td>";
string += "</tr></table></center>";
return string;
}

function rand(a,b) {
// randomly selects an integer between integers  a  and  b
var c = Math.floor((b+1-a)*Math.random() + a); 
return c;
}

function chsColor() {
var hexmat,col1,col2,col3,col4,col5,col6,hexcolor;
hexmat = ["0","1","2","3","4","5","6","7","9","A","B","C","D","E","F"];
col1 = hexmat[rand(0,14)];
col2 = hexmat[rand(0,14)];
col3 = hexmat[rand(0,14)];
col4 = hexmat[rand(0,14)];
col5 = hexmat[rand(0,14)];
col6 = hexmat[rand(0,14)];
hexcolor = "#"+col1+col2+col3+col4+col5+col6; // global variable
return hexcolor;
}

function funFact() {
var str;
str = "<span style='font-size:large; font-weight:bold;'>&nbsp;";
str += "<span style='color:"+chsColor()+";'>F</span>";
str += "<span style='color:"+chsColor()+";'>U</span>";
str += "<span style='color:"+chsColor()+";'>N</span>&nbsp;";
str += "<span style='color:"+chsColor()+";'>F</span>";
str += "<span style='color:"+chsColor()+";'>A</span>";
str += "<span style='color:"+chsColor()+";'>C</span>";
str += "<span style='color:"+chsColor()+";'>T</span>&nbsp;</span>";
return str;
}

function getToKnowMe() {
var numCases,str,chs;
// a completely random version, for each content page
// I've chosen a few favorites; complete list is in linkUnderMainTitle.htm
// All the ones here have a MAX of 4 lines
numCases = 58; // update every time you add something new, Carol!
chs = rand(1,numCases);
switch (chs) {
case 1:
str = "My favorite number is 7.";
break;
case 2:
str = "I was born on August 28, 1958.<br />(You do the math!)";
break;
case 3:
str = "I have one daughter, Julia.<br />She got her undergraduate degree in math from Carleton College.<br />";
str += "She's currently in graduate school in Arizona.";
break;
case 4:
str = "When we fostered a litter of kittens,<br />I named the tiniest one Epsilon.<br />";
str += "(It's a math thing. If you've had Calculus, you'll get it.)";
break;
case 5:
str = "I live in Monterey, Massachusetts.<br />I consider myself a country girl.";
break;
case 6:
str = "I (try to) walk three to four miles each day.<br />";
str += "I do some of my best thinking on my walks.";
break;
case 7:
str = "I love to swing.<br />(On swings.)<br />We've got two tree swings.";
break;
case 8:
str = "I have a lifelong love affair with trees.<br />";
str += "One of my dreams is to live in a tree house.";
break;
case 9:
str = "I play a mean game of ping-pong. Low, fast, defensive.<br />";
str += "When I was an undergrad at UMass, I drove the guys crazy.<br />";
str += "I'd just return everything. Eventually, they'd slam it off the table!";
break;
case 10:
str = "My favorite color is green.<br />(Green, blue, purple&#151;all pretty close.)";
break;
case 11:
str = "I believe we have great power to heal ourselves.<br />";
str += "I think the greatest health advances in the next century<br />";
str += "will come from from tapping into our own abilities to self-heal.";
break;
case 12:
str = "I love chocolate.<br />Milk, dark, white&#151;I'm not picky.<br />";
str += "(I love Idaho Spud bars. They're hard to find out my way...)";
break;
case 13:
str = "I call one of my daily philosophies &ldquo;the little Prince approach&rdquo;.<br />";
str += "I just try to accomplish a little bit every day.<br />";
str += "After a while, it adds up. (My web site is a good example.)";
break;
case 14: 
str = "I vacuum to keep my life in order.<br />";
str += "(My house filters never get very dirty,<br />";
str += "since I vacuum so much.)";
break;
case 15:
str = "My Myers-Briggs personality type is INTJ:<br />Introverted, iNtuitive, Thinking, Judging.";
break;
case 16: 
str = "I love a lot of Elton John's songs,<br />particularly the older stuff he did with Bernie Taupin.<br />";
str += "(I play them on the piano, and add harmonies. I'm an alto.)";
break;
case 17:
str = "In college, I played the piano and sang coffee-houses<br />with a friend of mine, who sang tenor.<br />";
str += "I love to sing.";
break;
case 18:
str = "I went to Monument Mountain Regional High School<br />in Great Barrington, Massachusetts.<br />";
str += "(I was the valedictorian.)";
break;
case 19:
str = "I type really fast (well over 100 words per minute).<br />";
str += "In college, I typed papers to make money.<br />";
str += "I still have my selectric typewriter (with custom math elements).";
break;
case 20:
str = "My daughter and I read books together every day of her life<br />";
str += "(without missing a day) until about age ten.<br />";
str += "We have an enormous library of children's books.";
break;
case 21:
str = "My strong preference is to get to bed early<br />and get up early.<br />";
str += "I've always been a morning person.";
break;
case 22:
str = "I was a cell-phone late-comer.<br />";
str += "Didn't make much sense,<br />since we have no service (yet) in Monterey.";
break;
case 23:
str = "I want to hike every national park in the United States.<br />";
str += "I love to hike.";
break;
case 24:
str = "When my daughter spent a year in Taiwan, I visited her.<br />";
str += "When she volunteered at an orphanage in Peru,<br />";
str += "we hiked Colca Canyon (intense!) and Machu Picchu.";
break;
case 25:
str = "I was married for 20 years.<br />";
break;
case 26:
str = "I drink whole milk and I cook with real butter.<br />";
str += "I try to avoid anything<br />with &ldquo;partially hydrogenated&rdquo; in the ingredients.";
break;
case 27:
str = "I believe in moderation in all things.<br />";
str += "(Even moderation in moderation.<br />";
str += "You need to go overboard on some stuff, like math-on-the-web.)";
break;
case 28:
str = "The &ldquo;J.V.&rdquo; in my name stands for &ldquo;Jane Vreeland&rdquo;.<br />";
str += "Jane is my father's birth-mother's name.<br />";
str += "Vreeland is my maiden name.";
break;
case 29:
str = "I had my first pair of glasses by age 7.<br />";
str += "As a teenager and younger adult, I wore hard contacts.<br />";
str += "I was classic&#151;at age 40, I needed bifocals.";
break;
case 30:
str = "I love velcro.";
break;
case 31:
str = "I have loved a golden retriever named Jesse.<br />";
str += "(Photos of her are <a href=\"http://www.onemathematicalcat.org/photos_Jesse.htm\" target=\"_blank\">here</a>;<br />the link opens in a new window.)";
break;
case 32:
str = "I like puzzles.<br />";
str += "One of my students at Miss Hall's School<br />";
str += "gave me a Japanese puzzle box, which I treasure.";
break;
case 33:
str = "I prefer &lsquo;natural&rsquo;. My home is filled with wood, stone, tile.<br />";
str += "(My Dad's dad made woodenware,<br />using tiny wooden pegs instead of nails.)";
break;
case 34:
str = "Since 1999, I've put about 6500 hours into this site.<br />(More every day.)<br />";
str += "It's my passion. It gives meaning to my life.";
break;
case 35:
str = "One of my favorite things to do<br />";
str += "is sit with a cup of tea in front of my woodstove<br />";
str += "and collect my thoughts.";
break;
case 36:
str = "I believe that out of discipline comes flexibility.";
break;
case 37:
str = "I prefer very casual attire.<br />";
str += "(If I could, I'd always wear jeans.)";
break;
case 38:
str = "I keep my email inbox practically empty.<br />";
str += "If I get more than three to four emails in there,<br />";
str += "I have to go thru them immediately.";
break;
case 39:
str = "I'm not a good multi-tasker.<br />";
str += "But, I'm a fantastic single-tasker.";
break;
case 40:
str = "I like things that are in my locus of control.<br />";
str += "(For example, I prefer a hand can-opener<br />to an electric one.)";
break;
case 41:
str = "I'm the least picky eater I know.<br />";
str += "Make me something, and I'll enjoy it and be appreciative.<br />";
str += "(If it's spicy, I'll definitely need sour cream.)";
break;
case 42:
str = "TeX transformed my professional life the first time.<br />";
str += "MathML + MathPlayer transformed it the second time.<br />";
str += "MathJax + JSXGraph transformed it the third time.";
break;
case 43:
str = "I'm very organized.<br />";
str += "(I love my label-maker.)";
break;
case 44:
str = "For breakfast, I typically have bran cereal or oatmeal.<br />";
str += "(Always with blueberries or raspberries,<br />that I picked myself and froze.)";
break;
case 45:
str = "The O'Reilly &ldquo;in-a-nutshell&rdquo; books are my favorites<br />";
str += "for learning any new technical skill.<br />";
str += "(I tend to submit errata&#151;I'm a good proof-reader.)";
break;
case 46:
str = "Crosswinds.net has been my web server from the very beginning.<br />";
str += "I love them.<br />There's a real person on the other end.";
break;
case 47:
str = "When I use my credit card,<br />";
str += "I immediately subtract the amount in my checkbook.<br />";
str += "I never get any surprises, and I always live within my means.";
break;
case 48:
str = "Here's my undergraduate degree:<br />Bachelor of Science, Magna Cum Laude, Civil Engineering,<br />";
str += "University of Massachusetts, Amherst, February 1981";
break;
case 49:
str = "I got a Master's degree enroute to my doctorate:<br />Master of Arts in Mathematics,<br />";
str += "University of Oklahoma, Norman, May 1984 (GPA: 4.0/4.0)";
break;
case 50:
str = "Here's my doctorate:<br />Doctor of Arts in Mathematics,<br />";
str += "Idaho State University, Pocatello, May 1994 (GPA: 4.0/4.0)";
break;
case 51:
str = "My dissertation title:<br />";
str += "&ldquo;Detecting Hidden Periodicities in Discrete-Domain Data&rdquo;<br />";
str += "(in other words: finding hidden patterns in data sets)";
break;
case 52:
str = "I'll never forget when I saw my first stereogram.<br />";
str += "It was hard for me&#151;took about 3 hours.<br />";
str += "What a thrill when that 3D image emerged from the page!";
break;
case 53:
str = "I have one older brother, one older sister,<br />and two younger sisters.<br />";
str += "(So, I'm a middle child.)";
break;
case 54:
str = "Every day, I try to do something good<br />for my mind, my body, and my spirit.";
break;
case 55:
str = "I love whipped cream.<br />";
str += "For example, people might say to me:<br />";
str += "&ldquo;Would you like some hot chocolate with your whipped cream?&rdquo;";
break;
case 56:
str = "my parenting philosophy: do everything with love as the basis;<br />";
str += "then, you can make a bunch of mistakes<br />";
str += "and everything will still turn out fine";
break;
case 57:
str = "I want you to see my ads&#151;but not while you're doing math.<br />";
str += "So, I keep my big ads (and fun facts) at the top/bottom.<br />";
str += "(Sometimes there's a small &lsquo;support me&rsquo; link in the middle.)";
break;
case 58:
str = "I ran a lot as a young adult.<br />";
str += "My best five-mile time was 30 minutes, 12 seconds.<br />";
str += "(Just a bit slower than 6-minute pace.)";
break;
} // end switch
return str;
}

function MathJaxNotice() {
var string;
/*
string = "<center>This page has been updated to use <a href=\"http://www.mathjax.org/\">MathJax</a>,<br />";
string += "so you should see beautiful mathematics on all major platforms and browsers.<br />";
string += "Please let me know if you experience any problems:<br />";
string += "<img style='vertical-align: bottom;' src='../../graphics/email_greenbg_medium.png' title='an image, to prevent email spidering'></center>";
*/
string = topTable();
return string;
}

function MathJaxNoticeGlobal() {
var string;
string = topTable();
return string;
}


function MathJaxAndJSXGraphNotice() {
var string;
string = topTable();
return string;
}

function myFooter() { // use in Algebra I course
var text;
text = botTable();
text += table_structure2(foot1(),foot2(),foot3());
return text;
}

/*
function myFooterMathJax() { // use in Algebra I course
var text;
text = table_structure2(foot1(),foot2MathJax(),foot3());
return text;
}
*/

function myFooterMathJax() { // use in Algebra I course
var text;
text = botTable();
text += table_structure4(foot1(),donation(),foot2MathJax(),foot3());
return text;
}

// modified on November 7, 2010 to merge MathJax and JSXGraph
function myFooterMathJaxAndJSXGraph() { // use in Algebra I course
var text;
text = botTable();
text += table_structure4(foot1(),donation(),foot2MathJaxAndJSXGraph(),foot3());
return text;
}


function myFooterGlobal() { // can be used anywhere; uses absolute (not relative) URLs
var text;
text = botTable();
text += table_structure2(foot1(),foot2Global(),foot3Global());
return text;
}

function myFooterGlobalMathJax() { // can be used anywhere; uses absolute (not relative) URLs
var text;
text = botTable();
text += table_structure4(foot1(),donation(),foot2MathJax(),foot3Global());
return text;
}

function myFooterGlobalMathJaxAndJSXGraph() { // can be used anywhere; uses absolute (not relative) URLs
var text;
text = botTable();
text += table_structure2(foot1(),foot2MathJaxAndJSXGraph(),foot3Global());
return text;
}

function linksBelowHomepageLink() { // links from Algebra I curriculum
var str;
str = "Check out my online courses: &nbsp; &nbsp; ";
str += "<a href=\"http://www.onemathematicalcat.org/algebra_book/online_problems/table_of_contents.htm\">Algebra I</a> &nbsp; &nbsp; &nbsp; ";
str += "<a href=\"http://www.onemathematicalcat.org/Math/Geometry_obj/table_of_contents_geom.htm\">Geometry</a> &nbsp; &nbsp; &nbsp;";
str += "<a href=\"http://www.onemathematicalcat.org/Math/Algebra_II_obj/table_of_contents.htm\">Algebra II</a>";
str += adtext;
return str;
}

function linksBelowHomepageLinkGeom() { // links from Geometry curriculum
var str;
str = "Check out my other pages including about 250 web exercises like this one: &nbsp; &nbsp; ";
str += "<a href=\"http://www.onemathematicalcat.org/algebra_book/online_problems/table_of_contents.htm\">Algebra I</a> &nbsp; &nbsp; &nbsp; ";
str += "<a href=\"http://www.onemathematicalcat.org/Math/Geometry_obj/table_of_contents_geom.htm\">Geometry</a> &nbsp; &nbsp; &nbsp;";
str += "<a href=\"http://www.onemathematicalcat.org/Math/Algebra_II_obj/table_of_contents.htm\">Algebra II</a>";
// str = "<a href=\"table_of_contents_geom.htm\">Table of Contents for the Geometry course \"One Mathematical Cat, Please!\"</a><br />";
str += adtext;
return str;
}

function linksBelowHomepageLinkAlgII() { // links from Algebra II curriculum
var str;
str = "Check out my other pages including about 250 web exercises like this one: &nbsp; &nbsp; ";
str += "<a href=\"http://www.onemathematicalcat.org/algebra_book/online_problems/table_of_contents.htm\">Algebra I</a> &nbsp; &nbsp; &nbsp; ";
str += "<a href=\"http://www.onemathematicalcat.org/Math/Geometry_obj/table_of_contents_geom.htm\">Geometry</a> &nbsp; &nbsp; &nbsp;";
str += "<a href=\"http://www.onemathematicalcat.org/Math/Algebra_II_obj/table_of_contents.htm\">Algebra II</a>";
str += adtext;
return str;
}

/* changed on October 27, 2010 to StatCounter.com, due to dg.specificclick.net cookie
   Started at 311,735 visitors and pageloads; only count unique visitors (within 30 minutes)
*/

function foot1() {
var str;
str = "<small><script>document.write(\"last modified<br />\" + document.lastModified)</script><br>";
str += "copyright 2004&#150;2010<br />Dr. Carol J.V. Fisher</small><br>";
/*
str += "<!-- Start of StatCounter Code -->";
str += "<script type=\"text/javascript\">";
str += "var sc_project=6340423;";
str += "var sc_invisible=0;";
str += "var sc_security=\"fc9e75ad\";";
str += "var sc_text=2;";
str += "</script>";
str += "<script type=\"text/javascript\"";
str += "src=\"http://www.statcounter.com/counter/counter.js\"></script><noscript><div";
str += "class=\"statcounter\"><a title=\"tumblr page counter\"";
str += "href=\"http://statcounter.com/tumblr/\" target=\"_blank\"><img";
str += "class=\"statcounter\"";
str += "src=\"http://c.statcounter.com/6340423/0/fc9e75ad/0/\"";
str += "alt=\"tumblr page counter\" ></a></div></noscript>";
str += "<!-- End of StatCounter Code -->";
*/
return str;
}

/* old SiteMeter code
str = str + "<!--WEBBOT bot=\"HTMLMarkup\" startspan ALT=\"Site Meter\" -->";
str = str + "<script type=\"text/javascript\" language=\"JavaScript\">var site=\"sm9CarolFisher\"</script>";
str = str + "<script type=\"text/javascript\" language=\"JavaScript1.2\" src=\"http://sm9.sitemeter.com/js/counter.js?site=sm9CarolFisher\">";
str = str + "</script><noscript><a href=\"http://sm9.sitemeter.com/stats.asp?site=sm9CarolFisher\" target=\"_top\">";
str = str + "<img src=\"http://sm9.sitemeter.com/meter.asp?site=sm9CarolFisher\" alt=\"Site Meter\" border=0></a></noscript>";
str = str + "<!-- Copyright (c)2000 Site Meter -->";
str = str + "<!--WEBBOT bot=\"HTMLMarkup\" Endspan -->";
*/

function foot2() {
var str;
str = donation();
return str;
}

// from Algebra I curriculum
function foot2MathJax() {
var str;
str = "<a href=\"http://www.mathjax.org/\" style=\"text-align:center; vertical-align:middle;\"><img src='http://onemathematicalcat.org/graphics/MathJaxBadge.gif' border=\"0\" alt='Powered by MathJax' title='Powered by MathJax' /></a>";
return str;
}

function foot2MathJaxAndJSXGraph() {
var str;
str = "<table style=\"margin-left:auto; margin-right:auto;\">";
str += "<tr><td><a href=\"http://www.mathjax.org/\" style=\" text-align:center;\"><img src=\"http://onemathematicalcat.org/graphics/MathJaxBadge.gif\" border=\"0\" alt=\"Powered by MathJax\" title=\"Powered by MathJax\" /></a></td></tr>";
str += "<tr><td style='text-align:center;'>and <a href=\"http://www.jsxgraph.org\">JSXGraph</a></td></tr>";
str += "</table>";
return str;
}

function foot2Global() { // absolute address, can be used from ANY page
var str;
//str = "<a href=\"http://www.onemathematicalcat.org/index.htm\" align=\"center\" valign=\"middle\">Dr. Carol J.V. Fisher's Homepage</a>";
str = donation();
return str;
}

function foot3() {
var str;
str = "<!-- Creative Commons License -->";
str = str + "<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/2.5/\">";
str = str + "<img alt=\"Creative Commons License\" border=\"0\" src=\"../../graphics/cc_somerights.gif\" /></a><br />";
str = str + "Please read my<br/><a href=\"terms_of_use.htm\">TERMS OF USE</a>";
str = str + "<!-- /Creative Commons License -->";
str = str + "<!-- <rdf:RDF xmlns=\"http://web.resource.org/cc/\"";
str = str + "xmlns:dc=\"http://purl.org/dc/elements/1.1/\"";
str = str + "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
str = str + "<Work rdf:about=\"\"><license rdf:resource=\"http://creativecommons.org/licenses/by-nc/2.5/\" />";
str = str + "</Work><License rdf:about=\"http://creativecommons.org/licenses/by-nc/2.5/\">";
str = str + "<permits rdf:resource=\"http://web.resource.org/cc/Reproduction\" />";
str = str + "<permits rdf:resource=\"http://web.resource.org/cc/Distribution\" />";
str = str + "<requires rdf:resource=\"http://web.resource.org/cc/Notice\" />";
str = str + "<requires rdf:resource=\"http://web.resource.org/cc/Attribution\" />";
str = str + "<prohibits rdf:resource=\"http://web.resource.org/cc/CommercialUse\" />";
str = str + "<permits rdf:resource=\"http://web.resource.org/cc/DerivativeWorks\" /></License>";
str = str + "</rdf:RDF> -->";
return str;
}

var donationString = "<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>";
donationString += "<input type='hidden' name='cmd' value='_s-xclick'>";
donationString += "<input type='hidden' name='hosted_button_id' value='5006438'>";
donationString += "<input type='image' src='https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif' border='0' name='submit' alt='PayPal - The safer, easier way to pay online!'>";
donationString += "<img alt='' border='0' src='https://www.paypal.com/en_US/i/scr/pixel.gif' width='1' height='1'>";

function donation() {
var string;
string = "<div style='font-size:small; color:green;'>";
string += "<center>"+donationString+"<br /><a href=\"http://www.onemathematicalcat.org/linkUnderMainTitle.htm\">or buy something at Amazon</a><br />to support my site.  Thank you.</center></div>";
return string;
}

function foot3Global() { // absolute addresses; can be used from ANY page
var str;
str = "<!-- Creative Commons License -->";
str = str + "<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/2.5/\">";
str = str + "<img alt=\"Creative Commons License\" border=\"0\" src=\"http://www.onemathematicalcat.org/graphics/cc_somerights.gif\" /></a><br />";
str = str + "Please read my<br/><a href=\"http://www.onemathematicalcat.org/algebra_book/online_problems/terms_of_use.htm\">TERMS OF USE</a>";
str = str + "<!-- /Creative Commons License -->";
str = str + "<!-- <rdf:RDF xmlns=\"http://web.resource.org/cc/\"";
str = str + "xmlns:dc=\"http://purl.org/dc/elements/1.1/\"";
str = str + "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
str = str + "<Work rdf:about=\"\"><license rdf:resource=\"http://creativecommons.org/licenses/by-nc/2.5/\" />";
str = str + "</Work><License rdf:about=\"http://creativecommons.org/licenses/by-nc/2.5/\">";
str = str + "<permits rdf:resource=\"http://web.resource.org/cc/Reproduction\" />";
str = str + "<permits rdf:resource=\"http://web.resource.org/cc/Distribution\" />";
str = str + "<requires rdf:resource=\"http://web.resource.org/cc/Notice\" />";
str = str + "<requires rdf:resource=\"http://web.resource.org/cc/Attribution\" />";
str = str + "<prohibits rdf:resource=\"http://web.resource.org/cc/CommercialUse\" />";
str = str + "<permits rdf:resource=\"http://web.resource.org/cc/DerivativeWorks\" /></License>";
str = str + "</rdf:RDF> -->";
return str;
}

function detectBrowser() {
  var browser=navigator.appName;
  var b_version=navigator.appVersion;
  var version=parseFloat(b_version);
string = "Sorry, people.\nThis page has special requirements due to its math content.\n\n";
string = string + "With your viewing scenario, you may see some garbage, and/or things may not work correctly.\n\n";
string = string + "Please watch the short \"Welcome\" video from my homepage.\n";
string = string + "Everything is free and easy.\n";
string = string + "It only takes a few minutes to set things up...\n";
string = string + "...so you can use my HUNDREDS of web exercises.\n\n";
string = string + "Hope to see you back here soon!";
  if (browser != "Microsoft Internet Explorer") {
     alert(string);
     return;
  }
  else if (!isMPInstalled()) { // if in IE, but MathPlayer isn't installed...
  string = "This web exercise requires MathPlayer. Without it, you'll see garbage instead of beautiful mathematics.";
  string = string + " Please read \"Will this website work on your computer?\" from my homepage.";
  alert(string);
  return;
  }
}

// returns True if MathPlayer is installed
function isMPInstalled()
{
  try {
    var oMP = new ActiveXObject("MathPlayer.Factory.1");
    return true;
  }
  catch(e) {
    return false;
  }
}

function changeFocus(dvIdName) {
// dvIDName:  STRING,  the  id  of the element that is to gain focus
document.getElementById(dvIdName).focus();
document.getElementById(dvIdName).select();
// must include this line in form element:
// onkeydown="if ((event.keyCode!==13)&&(event.keyCode!==9)) { ; } else { changeFocus('2_1'); return false; }"
// Note: the "return false" "flushes" things; otherwise doesn't work in Safari
}

/* Comment out unused functions, for faster loading

function newWebExer() {
var str;
str = "<table cellpadding=7 cellspacing=0 width=\"100%\" style=\"border-style: groove; border-color: green; border-width: thick;\"><tr>";
str = str + "<td align=center><small>Check out my newest web exercise:</small><br /><a href=\"http://www.onemathematicalcat.org/algebra_book/online_problems/mental_math.htm\"><font color=green><b>Mental Math: Addition</b></font></a><br />";
str = str + "</td></tr></table>";
return str;
}

function sell_books() {
var str;
str = "<table height=\"100%\" cellpadding=\"5\" width=\"100%\" style=\"border-style: groove; border-color: green; border-width: thin;\"><tr>";
str = str + "<td align=right><a href=\"http://www.onemathematicalcat.org/sell_books.htm\">";
str = str + "<img src=\"http://www.onemathematicalcat.org/graphics/cat_book_purple_for_small_ad.png\">";
str = str + "</a></td><td align=\"center\"><a href=\"http://www.onemathematicalcat.org/sell_books.htm\">";
str = str + "<small>s'tI a kciuq .daer<br />oD !tI</small></a></td>";
str = str + "<td align=left><a href=\"http://www.onemathematicalcat.org/sell_books.htm\">";
str = str + "<img src=\"http://www.onemathematicalcat.org/graphics/cat_book_big_for_small_ad.png\"></a>";
str = str + "</td></tr></table>";
return str;
}

function GoogleAd() {
var str;
str = "<table><tr><td>";
str = str + "<script type=\"text/javascript\">google_ad_client = \"pub-9842842191946147\";";
str = str + "google_ad_slot = \"9090067188\";";
str = str + "google_ad_width = 234;";
str = str + "google_ad_height = 60;</script>";
str = str + "<script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>";
str = str + "</td></tr></table>";
return str;
}

// The $3 Solution.  Get Affordable Math Help.
// Dr. Fisher is IN.  Get Math Help. Fast.
function threeDolSoln() {
var str;
str = "<table cellpadding=7 cellspacing=0 width=\"100%\" style=\"border-style: groove; border-color: green; border-width: thick;\"><tr>";
str = str + "<td align=center><a href=\"http://www.onemathematicalcat.org/threeDollarSolution.htm\"><font color=green><b>The $3 Math Solution<br />";
str = str + "Get Help from Dr. Fisher</b></font></a></td>";
str = str + "</td></tr></table>";
return str;
}

function testimonials() {
var str;
str = "<table cellpadding=7 cellspacing=0 width=\"100%\" style=\"border-style: groove; border-color: green; border-width: thick;\"><tr>";
str = str + "<td align=center><a href=\"http://www.onemathematicalcat.org/testimonials.htm\"><font color=green><b>TESTIMONIALS for<br />";
str = str + "this web site</b></font></a></td>";
str = str + "</td></tr></table>";
return str;
}

*/



