var index1=Math.round(Math.random()*(4-1))+1;
var question1=new Array(5);
var truevalue1=new Array(5);
var closevalue1=new Array(5);
	
question1[0]='+3 + 8 =';
truevalue1[0]='11';
closevalue1[0]='+11';

question1[1]='+3 + 8 =';
truevalue1[1]='11';
closevalue1[1]='+11';

question1[2]='+15 + 254 =';
truevalue1[2]='269';
closevalue1[2]='+269';

question1[3]='-8 + (-25) =';
truevalue1[3]='-33';
closevalue1[3]='-33';

question1[4]='+4 + (-6) =';
truevalue1[4]='-2';
closevalue1[4]='-2';

question1[5]='-8 + 5 =';
truevalue1[5]='-3';
closevalue1[5]='-3';

window.document.write('<CENTER><H2><B>Signed Numbers</B></H2></CENTER><BR><HR><BR><P ALIGN="LEFT"><FONT SIZE=+2>A. The Sizes of Signed Numbers:</FONT><BR>In chemistry we very frequently work with plain numbers like 1, 2, 3, etc.  We also encounter negative  numbers such as -1, -2, -3, etc., in addition to zero.  A common way to show the relationship of these signed numbers is with a number line.</P><CENTER><IMG SRC="/wps/media/objects/602/616516/mathtutorial/numberline.gif" WIDTH="400" HEIGHT="32" BORDER="0"></CENTER><P ALIGN="LEFT">As we move toward the right end of the line, the numbers get bigger.  One way in which this is used in chemistry is in temperature measurements.  Thus, a +30 degrees is a higher temperature than a +20 degrees.  Likewise, a -10 degrees is a higher temperature than a -20 degrees.</P>');

window.document.write('<P ALIGN="LEFT"><FONT SIZE=+2>B. Adding Signed Numbers:</FONT><BR>Adding numbers of the same sign is quite simple.  Just add the two numbers, and retain the sign.   For example, if  +5 is added to  +3, the result is  +8.</P><CENTER><IMG SRC="/wps/media/objects/602/616516/mathtutorial/numberline1.gif" WIDTH="400" HEIGHT="86" BORDER="0"></CENTER><P ALIGN="LEFT">If  -8 is added to  -9, the result is  -17.</P><CENTER><IMG SRC="/wps/media/objects/602/616516/mathtutorial/numberline2.gif" WIDTH="400" HEIGHT="86" BORDER="0"></CENTER><P ALIGN="LEFT">If you added numbers with different signs, the result is the same as subtraction.  Simply subtract the smaller number from the larger number, and then retain the sign of the larger number.  For example, let&acute;s add  +8 and  -14.</P><CENTER><IMG SRC="/wps/media/objects/602/616516/mathtutorial/numberline3.gif" WIDTH="400" HEIGHT="129" BORDER="0"></CENTER><P ALIGN="LEFT">What is the result when the following numbers are added?</P><TABLE CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" WIDTH="75%"><TR><TD ALIGN="CENTER">'+ question1[index1] + ' <INPUT TYPE="TEXT" SIZE="20" NAME="question1"></TD></TR></TABLE>');

var index2=Math.round(Math.random()*(4-1))+1;
var question2=new Array(5);
var truevalue2=new Array(5);
var closevalue2=new Array(5);
	
question2[0]='67 - 45 =';
truevalue2[0]='22';
closevalue2[0]='+22';

question2[1]='67 - 45 =';
truevalue2[1]='22';
closevalue2[1]='+22';

question2[2]='23 - (-17) =';
truevalue2[2]='40';
closevalue2[2]='+40';

question2[3]='-28 - 19 =';
truevalue2[3]='-47';
closevalue2[3]='-47';

question2[4]='-39 - (-33) =';
truevalue2[4]='-6';
closevalue2[4]='-6';

question2[5]='49 - (91) =';
truevalue2[5]='-42';
closevalue2[5]='-42';

window.document.write('<P ALIGN="LEFT"><FONT SIZE=+2>C. Subtracting Signed Numbers:</FONT><BR>When you subtract signed numbers, simply add the opposite of the second number to the first number.  For example, subtract 15 from 12, i.e.,</P><P ALIGN="CENTER">12 - 15 =</P><P ALIGN="LEFT">Let&acute;s first put in the signs of the numbers.</P><P ALIGN="CENTER">+12 - (+15) =</P><P ALIGN="LEFT">Now make this an addition, and change the sign of the second number.</P><P ALIGN="CENTER">+12 + (-15) =</P><P ALIGN="LEFT">We can now use the rule we looked at above when we added numbers with opposite signs, i.e., take their difference and use the sign of the larger number.</P><P ALIGN="CENTER">+12 + (-15) = -3</P><P ALIGN="LEFT">Here&acute;s another example. Subtract -25 from -58.</P><P ALIGN="CENTER">-58   - (-25) = -58 + (+25) = -33</P><P ALIGN="LEFT">What is the result when the following numbers are subtracted?</P><TABLE CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" WIDTH="75%"><TR><TD ALIGN="CENTER">'+ question2[index2] + ' <INPUT TYPE="TEXT" SIZE="20" NAME="question2"></TD></TR></TABLE>');

var index3=Math.round(Math.random()*(6-1))+1;
var question3=new Array(7);
var truevalue3=new Array(7);
var closevalue3=new Array(7);
	
question3[0]='51 (6) =';
truevalue3[0]='306';
closevalue3[0]='+306';

question3[1]='51 (6) =';
truevalue3[1]='306';
closevalue3[1]='+306';

question3[2]='-16 &divide; -2 =';
truevalue3[2]='8';
closevalue3[2]='+8';

question3[3]='-45 (5) =';
truevalue3[3]='-225';
closevalue3[3]='-225';

question3[4]='-75 &divide; 5 =';
truevalue3[4]='-15';
closevalue3[4]='-15';

question3[5]='-28 (-6) =';
truevalue3[5]='168';
closevalue3[5]='+168';

question3[6]='82 (2) =';
truevalue3[6]='164';
closevalue3[6]='+164';

question3[7]='44 &divide; -4 =';
truevalue3[7]='-11';
closevalue3[7]='-11';

window.document.write('<P ALIGN="LEFT"><FONT SIZE=+2>D. Multiplying and Dividing Signed Numbers:</FONT><BR>You may encounter different symbols to represent multiplying.  Here are the most common ones.</P><TABLE CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" WIDTH="75%"><TR><TD ALIGN="CENTER">2 x 3 = 6</TD><TD ALIGN="CENTER">2 <IMG SRC="/wps/media/objects/602/616516/mathtutorial/bullet.gif" WIDTH="4" HEIGHT="13" BORDER="0"> 3 = 6</TD><TD ALIGN="CENTER">2(3) = 6</TD></TR></TABLE><P ALIGN="LEFT">Likewise, several symbols are used to designate division. The most common are:</P><TABLE CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" WIDTH="75%"><TR><TD ALIGN="CENTER">6 / 2 = 3</TD><TD ALIGN="CENTER">6 &divide; 2 = 3</TD></TR></TABLE><P ALIGN="LEFT">When multiplying signed numbers, three rules apply.</P><OL COLOR="#0000FF"><LI><FONT COLOR="#0000FF"> A positive number times a positive number equals a positive number.</FONT></LI><LI><FONT COLOR="#0000FF">A positive number times a negative number equals a negative number.</FONT></LI><LI><FONT COLOR="#0000FF">A negative number times a negative number equals a positive number.</FONT></LI></OL><P ALIGN="LEFT">Here are a few examples</P><TABLE CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER"><TR><TD WIDTH="70" ALIGN=CENTER>6 (8) = 48</TD><TD WIDTH="65" ALIGN=CENTER>(Rule 1)</TD></TR><TR><TD ALIGN=CENTER>-3 (4) = -12</TD><TD ALIGN=CENTER>(Rule 2)</TD></TR><TR><TD ALIGN=CENTER>-6 (-2) = 12</TD><TD ALIGN=CENTER>(Rule 3)</TD></TR></TABLE><P ALIGN="LEFT">The  same rules for signed numbers apply when carrying out a division.</P><OL><LI><FONT COLOR="#0000FF">A positive number divided by a positive number equals a positive number.</FONT></LI><LI><FONT COLOR="#0000FF">A positive number divided by a negative number (or vice versa) equals a negative number.</FONT></LI><LI><FONT COLOR="#0000FF">A negative number divided by a negative number equals a positive number.</FONT></LI></OL><P ALIGN="LEFT">Here are a few examples of divisions.</P><TABLE CELLSPACING="0" CELLPADDING="0"><TR><TD WIDTH="93" ALIGN=CENTER>6 &divide; 2 = 3</TD><TD WIDTH="70" ALIGN=CENTER>(Rule 1)</TD></TR><TR><TD ALIGN=CENTER>-6 &divide; 2 = -3</TD><TD ALIGN=CENTER>(Rule 2)</TD></TR><TR><TD ALIGN=CENTER>6 &divide; -2 = -3</TD><TD ALIGN=CENTER>(Rule 3)</TD></TR><TR><TD ALIGN=CENTER>-6 &divide; -2 = 3</TD><TD ALIGN=CENTER>(Rule4)</TD></TR></TABLE><P ALIGN="LEFT">Try the following problem.</P><TABLE CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" WIDTH="75%"><TR><TD ALIGN="CENTER">'+ question3[index3] + ' <INPUT TYPE="TEXT" SIZE="20" NAME="question3"></TD></TR></TABLE>');
