var molFile = new Array();
var molFormula = new Array();
var molInfo = new Array();
var shapeArray = new Array();
var eGroupArray = new Array();
var pathArray = new Array();
var letterConvert = new Array();
var molNum;
var molPath;
var molShape;
var molShapeNum;
var molEGroup;
var molEGroupNum;
//var vrmlMod;
var tempValue2;
var possMolecules;
var quizType;
var textLength = 25;
var quizWidth;
var quizHeight;
var animWidth = 400;
var animHeight = 425;
var jmolWidth = 500;
var jmolHeight = 500;
//var vrmlWidth = 500;
//var vrmlHeight = 380;
var rulesWindowOpened;
var quizWindowOpened;
var helpWindowOpened;
var tableWindowOpened;
var animWindowOpened;
var jmolWindowOpened;
//var vrmlWindowOpened;
var defaultValue = 'Don\'t Peek!';
var is_macie;
var is_winie;
var is_justie;
var is_macnn4;
var is_macnav;
var emailAdd = 'chemistry@chemistry.alanearhart.org';
var dateMod = '11\/30\/06';  

// antimony 0-7

molFile[0] = 'sb1h3';
molFormula[0] = 'SbH<SUB>3</SUB>';
molInfo[0] = '3d';
molFile[1] = 'sb1br3';
molFormula[1] = 'SbBr<SUB>3</SUB>';
molInfo[1] = '3d';
molFile[2] = 'sb1cl3';
molFormula[2] = 'SbCl<SUB>3</SUB>';
molInfo[2] = '3d';
molFile[3] = 'sb1f3';
molFormula[3] = 'SbF<SUB>3</SUB>';
molInfo[3] = '3d';
molFile[4] = 'sb1i3';
molFormula[4] = 'SbI<SUB>3</SUB>';
molInfo[4] = '3d';
molFile[5] = 'sb1cl5';
molFormula[5] = 'SbCl<SUB>5</SUB>';
molInfo[5] = '4h';
molFile[6] = 'sb1f5';
molFormula[6] = 'SbF<SUB>5</SUB>';
molInfo[6] = '4h';
molFile[7] = 'sb1i5';
molFormula[7] = 'SbI<SUB>5</SUB>';
molInfo[7] = '4h';

// arsenic 8-14

molFile[8] = 'as1h3';
molFormula[8] = 'AsH<SUB>3</SUB>';
molInfo[8] = '3d';
molFile[9] = 'as1cl3';
molFormula[9] = 'AsCl<SUB>3</SUB>';
molInfo[9] = '3d';
molFile[10] = 'as1f3';
molFormula[10] = 'AsF<SUB>3</SUB>';
molInfo[10] = '3d';
molFile[11] = 'as1i3';
molFormula[11] = 'AsI<SUB>3</SUB>';
molInfo[11] = '3d';
molFile[12] = 'as1br3';
molFormula[12] = 'AsBr<SUB>3</SUB>';
molInfo[12] = '3d';
molFile[13] = 'as1f5';
molFormula[13] = 'AsF<SUB>5</SUB>';
molInfo[13] = '4h';
molFile[14] = 'as1i5';
molFormula[14] = 'AsI<SUB>5</SUB>';
molInfo[14] = '4h';

// beryllium 15-17

molFile[15] = 'be1h2';
molFormula[15] = 'BeH<SUB>2</SUB>';
molInfo[15] = '1a';
molFile[16] = 'be1f2';
molFormula[16] = 'BeF<SUB>2</SUB>';
molInfo[16] = '1a';
molFile[17] = 'be1cl2';
molFormula[17] = 'BeCl<SUB>2</SUB>';
molInfo[17] = '1a';

// boron 18-22

//molFile[18] = 'b1h3';
//molFormula[18] = 'BH<SUB>3</SUB>';
//molInfo[18] = '2c';
molFile[19] = 'b1f3';
molFormula[19] = 'BF<SUB>3</SUB>';
molInfo[19] = '2c';
molFile[20] = 'b1cl3';
molFormula[20] = 'BCl<SUB>3</SUB>';
molInfo[20] = '2c';
molFile[21] = 'b1br3';
molFormula[21] = 'BBr<SUB>3</SUB>';
molInfo[21] = '2c';
molFile[22] = 'b1i3';
molFormula[22] = 'BI<SUB>3</SUB>';
molInfo[22] = '2c';

// bromine 23-27

molFile[23] = 'br1f1';
molFormula[23] = 'BrF';
molInfo[23] = '3a';
molFile[24] = 'br1cl1';
molFormula[24] = 'BrCl';
molInfo[24] = '3a';
molFile[25] = 'br1f3';
molFormula[25] = 'BrF<SUB>3</SUB>';
molInfo[25] = '4f';
molFile[26] = 'br1f5';
molFormula[26] = 'BrF<SUB>5</SUB>';
molInfo[26] = '5j';
molFile[27] = 'br2';
molFormula[27] = 'Br<SUB>2</SUB>';
molInfo[27] = '3a';

// carbon 28-51

molFile[28] = 'c1h4';
molFormula[28] = 'CH<SUB>4</SUB>';
molInfo[28] = '3e';
molFile[29] = 'c1f4';
molFormula[29] = 'CF<SUB>4</SUB>';
molInfo[29] = '3e';
molFile[30] = 'c1cl4';
molFormula[30] = 'CCl<SUB>4</SUB>';
molInfo[30] = '3e';
molFile[31] = 'c1br4';
molFormula[31] = 'CBr<SUB>4</SUB>';
molInfo[31] = '3e';
molFile[32] = 'c1i4';
molFormula[32] = 'CI<SUB>4</SUB>';
molInfo[32] = '3e';
molFile[33] = 'c1h1f3';
molFormula[33] = 'CHF<SUB>3</SUB>';
molInfo[33] = '3e';
molFile[34] = 'c1h1cl3';
molFormula[34] = 'CHCl<SUB>3</SUB>';
molInfo[34] = '3e';
molFile[35] = 'c1h1br3';
molFormula[35] = 'CHBr<SUB>3</SUB>';
molInfo[35] = '3e';
molFile[36] = 'c1h1i3';
molFormula[36] = 'CHI<SUB>3</SUB>';
molInfo[36] = '3e';
molFile[37] = 'c1cl1f3';
molFormula[37] = 'CClF<SUB>3</SUB>';
molInfo[37] = '3e';
molFile[38] = 'c1h2cl2';
molFormula[38] = 'CH<SUB>2</SUB>Cl<SUB>2</SUB>';
molInfo[38] = '3e';
// molFile[39] = 'c1h2cl1f1';
// molFormula[39] = 'CH<SUB>2</SUB>ClF';
// molInfo[39] = '3e';
molFile[40] = 'c1h2br2';
molFormula[40] = 'CH<SUB>2</SUB>Br<SUB>2</SUB>';
molInfo[40] = '3e';
molFile[41] = 'c1h3cl1';
molFormula[41] = 'CH<SUB>3</SUB>Cl';
molInfo[41] = '3e';
molFile[42] = 'c1h3br1';
molFormula[42] = 'CH<SUB>3</SUB>Br';
molInfo[42] = '3e';
molFile[43] = 'c1f2cl2';
molFormula[43] = 'CF<SUB>2</SUB>Cl<SUB>2</SUB>';
molInfo[43] = '3e';
molFile[44] = 'c1f3i1';
molFormula[44] = 'CF<SUB>3</SUB>I';
molInfo[44] = '3e';
molFile[45] = 'c1cl3f1';
molFormula[45] = 'CCl<SUB>3</SUB>F';
molInfo[45] = '3e';
molFile[46] = 'c1o1';
molFormula[46] = 'CO';
molInfo[46] = '1a';
molFile[47] = 'c1o2';
molFormula[47] = 'CO<SUB>2</SUB>';
molInfo[47] = '1a';
molFile[48] = 'c1o1cl2';
molFormula[48] = 'COCl<SUB>2</SUB>';
molInfo[48] = '2c';
molFile[49] = 'c1s1';
molFormula[49] = 'CS';
molInfo[49] = '1a';
molFile[50] = 'c1s2';
molFormula[50] = 'CS<SUB>2</SUB>';
molInfo[50] = '1a';
molFile[51] = 'c1se2';
molFormula[51] = 'CSe<SUB>2</SUB>';
molInfo[51] = '1a';
// molFile[] = 'c1o1br2';
// molFormula[] = 'COBr<SUB>2</SUB>';
// molInfo[] = '';
// molFile[] = 'c1o1br2';
// molFormula[] = 'COBr<SUB>2</SUB>';
// molInfo[] = '';
// molFile[] = 'c1o1br2';
// molFormula[] = 'COBr<SUB>2</SUB>';
// molInfo[] = '';
// molInfo[] = '';
// molFile[] = 'c1h3f1';
// molFormula[] = 'CH<SUB>3</SUB>F';
// molInfo[] = '';
// molInfo[] = '';
// molFile[] = 'c1h3i1';
// molFormula[] = 'CH<SUB>3</SUB>I';
// molInfo[] = '';
// molFile[] = 'c1h2f2';
// molFormula[] = 'CH<SUB>2</SUB>F<SUB>2</SUB>';
// molInfo[] = '';

// chlorine 52-55

molFile[52] = 'cl1f1';
molFormula[52] = 'ClF';
molInfo[52] = '3a';
molFile[53] = 'cl2';
molFormula[53] = 'Cl<SUB>2</SUB>';
molInfo[53] = '3a';
molFile[54] = 'cl1f3';
molFormula[54] = 'ClF<SUB>3</SUB>';
molInfo[54] = '4f';
molFile[55] = 'cl1f5';
molFormula[55] = 'ClF<SUB>5</SUB>';
molInfo[55] = '5j';

// fluorine 56

molFile[56] = 'f2';
molFormula[56] = 'F<SUB>2</SUB>';
molInfo[56] = '3a';

// germanium 57-66

molFile[57] = 'ge1h4';
molFormula[57] = 'GeH<SUB>4</SUB>';
molInfo[57] = '3e';
molFile[58] = 'ge1f4';
molFormula[58] = 'GeF<SUB>4</SUB>';
molInfo[58] = '3e';
molFile[59] = 'ge1cl4';
molFormula[59] = 'GeCl<SUB>4</SUB>';
molInfo[59] = '3e';
molFile[60] = 'ge1br4';
molFormula[60] = 'GeBr<SUB>4</SUB>';
molInfo[60] = '3e';
molFile[61] = 'ge1o1';
molFormula[61] = 'GeO';
molInfo[61] = '1a';
molFile[62] = 'ge1s1';
molFormula[62] = 'GeS';
molInfo[62] = '1a';
molFile[63] = 'ge1se1';
molFormula[63] = 'GeSe';
molInfo[63] = '1a';
molFile[64] = 'ge1te1';
molFormula[64] = 'GeTe';
molInfo[64] = '1a';
molFile[65] = 'ge1o2';
molFormula[65] = 'GeO<SUB>2</SUB>';
molInfo[65] = '1a';
molFile[66] = 'ge1s2';
molFormula[66] = 'GeS<SUB>2</SUB>';
molInfo[66] = '1a';

// hydrogen (binary compounds) 67-75

molFile[67] = 'h1f1';
molFormula[67] = 'HF';
molInfo[67] = '3a';
molFile[68] = 'h1cl1';
molFormula[68] = 'HCl';
molInfo[68] = '3a';
molFile[69] = 'h1br1';
molFormula[69] = 'HBr';
molInfo[69] = '3a';
molFile[70] = 'h1i1';
molFormula[70] = 'HI';
molInfo[70] = '3a';
molFile[71] = 'h2';
molFormula[71] = 'H<SUB>2</SUB>';
//molInfo[71] = '0a';
molInfo[71] = '1a';
molFile[72] = 'h2o1';
molFormula[72] = 'H<SUB>2</SUB>O';
molInfo[72] = '3b';
molFile[73] = 'h2s1';
molFormula[73] = 'H<SUB>2</SUB>S';
molInfo[73] = '3b';
molFile[74] = 'h2se1';
molFormula[74] = 'H<SUB>2</SUB>Se';
molInfo[74] = '3b';
molFile[75] = 'h2te1';
molFormula[75] = 'H<SUB>2</SUB>Te';
molInfo[75] = '3b';

// iodine 76-83

molFile[76] = 'i1cl1';
molFormula[76] = 'ICl';
molInfo[76] = '3a';
molFile[77] = 'i1f1';
molFormula[77] = 'IF';
molInfo[77] = '3a';
molFile[78] = 'i1br1';
molFormula[78] = 'IBr';
molInfo[78] = '3a';
molFile[79] = 'i1f3';
molFormula[79] = 'IF<SUB>3</SUB>';
molInfo[79] = '4f';
molFile[80] = 'i1cl3';
molFormula[80] = 'ICl<SUB>3</SUB>';
molInfo[80] = '4f';
molFile[81] = 'i1f5';
molFormula[81] = 'IF<SUB>5</SUB>';
molInfo[81] = '5j';
molFile[82] = 'i1cl5';
molFormula[82] = 'ICl<SUB>5</SUB>';
molInfo[82] = '5j';
molFile[83] = 'i2';
molFormula[83] = 'I<SUB>2</SUB>';
molInfo[83] = '3a';

// krypton 84-85

molFile[84] = 'kr1f2';
molFormula[84] = 'KrF<SUB>2</SUB>';
molInfo[84] = '4a';
molFile[85] = 'kr1f4';
molFormula[85] = 'KrF<SUB>4</SUB>';
molInfo[85] = '5i';

// nitrogen 86-92

molFile[86] = 'n1h3';
molFormula[86] = 'NH<SUB>3</SUB>';
molInfo[86] = '3d';
molFile[87] = 'n1f3';
molFormula[87] = 'NF<SUB>3</SUB>';
molInfo[87] = '3d';
molFile[88] = 'n1cl3';
molFormula[88] = 'NCl<SUB>3</SUB>';
molInfo[88] = '3d';
molFile[89] = 'n1br3';
molFormula[89] = 'NBr<SUB>3</SUB>';
molInfo[89] = '3d';
molFile[90] = 'n1i3';
molFormula[90] = 'NI<SUB>3</SUB>';
molInfo[90] = '3d';
molFile[91] = 'n2';
molFormula[91] = 'N<SUB>2</SUB>';
molInfo[91] = '1a';
molFile[92] = 'n2o1';
molFormula[92] = 'N<SUB>2</SUB>O';
molInfo[92] = '1a';

// oxygen 93-95

molFile[93] = 'o1f2';
molFormula[93] = 'OF<SUB>2</SUB>';
molInfo[93] = '3b';
molFile[94] = 'o2';
molFormula[94] = 'O<SUB>2</SUB>';
molInfo[94] = '2a';
molFile[95] = 'o3';
molFormula[95] = 'O<SUB>3</SUB>';
molInfo[95] = '2b';

// phosphorus 96-104

molFile[96] = 'p1h3';
molFormula[96] = 'PH<SUB>3</SUB>';
molInfo[96] = '3d';
molFile[97] = 'p1f3';
molFormula[97] = 'PF<SUB>3</SUB>';
molInfo[97] = '3d';
molFile[98] = 'p1cl3';
molFormula[98] = 'PCl<SUB>3</SUB>';
molInfo[98] = '3d';
molFile[99] = 'p1br3';
molFormula[99] = 'PBr<SUB>3</SUB>';
molInfo[99] = '3d';
molFile[100] = 'p1i3';
molFormula[100] = 'PI<SUB>3</SUB>';
molInfo[100] = '3d';
molFile[101] = 'p1f5';
molFormula[101] = 'PF<SUB>5</SUB>';
molInfo[101] = '4h';
molFile[102] = 'p1cl5';
molFormula[102] = 'PCl<SUB>5</SUB>';
molInfo[102] = '4h';
molFile[103] = 'p1br5';
molFormula[103] = 'PBr<SUB>5</SUB>';
molInfo[103] = '4h';
molFile[104] = 'p1o1cl3';
molFormula[104] = 'POCl<SUB>3</SUB>';
molInfo[104] = '3e';
// molFile[] = 'p1o1f3';
// molFormula[] = 'POF<SUB>3</SUB>';
// molInfo[] = '';

// selenium 105-113

molFile[105] = 'se1cl2';
molFormula[105] = 'SeCl<SUB>2</SUB>';
molInfo[105] = '3b';
molFile[106] = 'se1f4';
molFormula[106] = 'SeF<SUB>4</SUB>';
molInfo[106] = '4g';
molFile[107] = 'se1cl4';
molFormula[107] = 'SeCl<SUB>4</SUB>';
molInfo[107] = '4g';
molFile[108] = 'se1br4';
molFormula[108] = 'SeBr<SUB>4</SUB>';
molInfo[108] = '4g';
molFile[109] = 'se1f6';
molFormula[109] = 'SeF<SUB>6</SUB>';
molInfo[109] = '5k';
molFile[110] = 'se1cl6';
molFormula[110] = 'SeCl<SUB>6</SUB>';
molInfo[110] = '5k';
molFile[111] = 'se1o1';
molFormula[111] = 'SeO';
molInfo[111] = '2a';
molFile[112] = 'se1o2';
molFormula[112] = 'SeO<SUB>2</SUB>';
molInfo[112] = '2b';
molFile[113] = 'se1o3';
molFormula[113] = 'SeO<SUB>3</SUB>';
molInfo[113] = '2c';

// silicon 114-126

molFile[114] = 'si1f1h3';
molFormula[114] = 'SiFH<SUB>3</SUB>';
molInfo[114] = '3e';
molFile[115] = 'si1br1h3';
molFormula[115] = 'SiBrH<SUB>3</SUB>';
molInfo[115] = '3e';
molFile[116] = 'si1br1f3';
molFormula[116] = 'SiBrF<SUB>3</SUB>';
molInfo[116] = '3e';
molFile[117] = 'si1f4';
molFormula[117] = 'SiF<SUB>4</SUB>';
molInfo[117] = '3e';
molFile[118] = 'si1cl4';
molFormula[118] = 'SiCl<SUB>4</SUB>';
molInfo[118] = '3e';
molFile[119] = 'si1br4';
molFormula[119] = 'SiBr<SUB>4</SUB>';
molInfo[119] = '3e';
molFile[120] = 'si1i4';
molFormula[120] = 'SiI<SUB>4</SUB>';
molInfo[120] = '3e';
molFile[121] = 'si1h4';
molFormula[121] = 'SiH<SUB>4</SUB>';
molInfo[121] = '3e';
molFile[122] = 'si1h1f3';
molFormula[122] = 'SiHF<SUB>3</SUB>';
molInfo[122] = '3e';
molFile[123] = 'si1o1';
molFormula[123] = 'SiO';
molInfo[123] = '1a';
molFile[124] = 'si1s1';
molFormula[124] = 'SiS';
molInfo[124] = '1a';
molFile[125] = 'si1se1';
molFormula[125] = 'SiSe';
molInfo[125] = '1a';
molFile[126] = 'si1o2';
molFormula[126] = 'SiO<SUB>2</SUB>';
molInfo[126] = '1a';
// molFile[] = 'si1cl1h3';
// molFormula[] = 'SiClH<SUB>3</SUB>';
// molInfo[] = '';
// molFile[] = 'si1i1h3';
// molFormula[] = 'SiIH<SUB>3</SUB>';
// molInfo[] = '';

// sulfur 127-136

molFile[127] = 's1o1';
molFormula[127] = 'SO';
molInfo[127] = '2a';
molFile[128] = 's1o2';
molFormula[128] = 'SO<SUB>2</SUB>';
molInfo[128] = '2b';
molFile[129] = 's1o3';
molFormula[129] = 'SO<SUB>3</SUB>';
molInfo[129] = '2c';
molFile[130] = 's1o2f2';
molFormula[130] = 'SO<SUB>2</SUB>F<SUB>2</SUB>';
molInfo[130] = '3e';
molFile[131] = 's1o2cl2';
molFormula[131] = 'SO<SUB>2</SUB>Cl<SUB>2</SUB>';
molInfo[131] = '3e';
molFile[132] = 's1f2';
molFormula[132] = 'SF<SUB>2</SUB>';
molInfo[132] = '3b';
molFile[133] = 's1cl2';
molFormula[133] = 'SCl<SUB>2</SUB>';
molInfo[133] = '3b';
molFile[134] = 's1f4';
molFormula[134] = 'SF<SUB>4</SUB>';
molInfo[134] = '4g';
molFile[135] = 's1cl4';
molFormula[135] = 'SCl<SUB>4</SUB>';
molInfo[135] = '4g';
molFile[136] = 's1f6';
molFormula[136] = 'SF<SUB>6</SUB>';
molInfo[136] = '5k';

// tellurium 137-147

molFile[137] = 'te1o1';
molFormula[137] = 'TeO';
molInfo[137] = '2a';
molFile[138] = 'te1o2';
molFormula[138] = 'TeO<SUB>2</SUB>';
molInfo[138] = '2b';
molFile[139] =  'te1s2';
molFormula[139] = 'TeS<SUB>2</SUB>';
molInfo[139] = '2b';
molFile[140] = 'te1o3';
molFormula[140] = 'TeO<SUB>3</SUB>';
molInfo[140] = '2c';
molFile[141] = 'te1cl2';
molFormula[141] = 'TeCl<SUB>2</SUB>';
molInfo[141] = '3b';
molFile[142] = 'te1br2';
molFormula[142] = 'TeBr<SUB>2</SUB>';
molInfo[142] = '3b';
molFile[143] = 'te1i2';
molFormula[143] = 'TeI<SUB>2</SUB>';
molInfo[143] = '3b';
molFile[144] = 'te1f4';
molFormula[144] = 'TeF<SUB>4</SUB>';
molInfo[144] = '4g';
molFile[145] = 'te1cl4';
molFormula[145] = 'TeCl<SUB>4</SUB>';
molInfo[145] = '4g';
molFile[146] = 'te1br4';
molFormula[146] = 'TeBr<SUB>4</SUB>';
molInfo[146] = '4g';
molFile[147] = 'te1i4';
molFormula[147] = 'TeI<SUB>4</SUB>';
molInfo[147] = '4g';
//  molFile[] = 'te1f6';
//  molFormula[] = 'TeF<SUB>6</SUB>';
//  molInfo[] = '';

// xenon 148-152

molFile[148] = 'xe1f2';
molFormula[148] = 'XeF<SUB>2</SUB>';
molInfo[148] = '4a';
molFile[149] = 'xe1f4';
molFormula[149] = 'XeF<SUB>4</SUB>';
molInfo[149] = '5i';
molFile[150] = 'xe1cl4';
molFormula[150] = 'XeCl<SUB>4</SUB>';
molInfo[150] = '5i';
molFile[151] = 'xe1o3';
molFormula[151] = 'XeO<SUB>3</SUB>';
molInfo[151] = '3d';
molFile[152] = 'xe1o4';
molFormula[152] = 'XeO<SUB>4</SUB>';
molInfo[152] = '3e';

// polyatomic ions 153-180

  molFile[153] = 'as1o4m3';
  molFormula[153] = 'AsO<SUB>4</SUB><SUP>-3</SUP>';
  molFile[154] = 'br1o2m1';
  molFormula[154] = 'BrO<SUB>2</SUB><SUP>-1</SUP>';
  molFile[155] = 'br3m1';
  molFormula[155] = 'Br<SUB>3</SUB><SUP>-1</SUP>';
  molFile[156] = 'c1n1m1';
  molFormula[156] = 'CN<SUP>-1</SUP>';
  molFile[157] = 'c1o3m2';
  molFormula[157] = 'CO<SUB>3</SUB><SUP>-2</SUP>';
  molFile[158] = 'cl1o1m1';
  molFormula[158] = 'ClO<SUP>-1</SUP>';
  molFile[159] = 'cl1o4m1';
  molFormula[159] = 'ClO<SUB>4</SUB><SUP>-1</SUP>';
  molFile[160] = 'ge1f3m1';
  molFormula[160] = 'GeF<SUB>3</SUB><SUP>-1</SUP>';
  molFile[161] = 'ge1cl3m1';
  molFormula[161] = 'GeCl<SUB>3</SUB><SUP>-1</SUP>';
  molFile[162] = 'h2f1p1';
  molFormula[162] = 'H<SUB>2</SUB>F<SUP>+1</SUP>';
  molFile[163] = 'h3o1p1';
  molFormula[163] = 'H<SUB>3</SUB>O<SUP>+1</SUP>';
  molFile[164] = 'i1cl2m1';
  molFormula[164] = 'ICl<SUB>2</SUB><SUP>-1</SUP>';
  molFile[165] = 'i1cl4m1';
  molFormula[165] = 'ICl<SUB>4</SUB><SUP>-1</SUP>';
  molFile[166] = 'i1f4m1';
  molFormula[166] = 'IF<SUB>4</SUB><SUP>-1</SUP>';
  molFile[167] = 'i3m1';
  molFormula[167] = 'I<SUB>3</SUB><SUP>-1</SUP>';
  molFile[168] = 'n1h4p1';
  molFormula[168] = 'NH<SUB>4</SUB><SUP>+1</SUP>';
  molFile[169] = 'n1o1p1';
  molFormula[169] = 'NO<SUP>+1</SUP>';
  molFile[170] = 'n1o2m1';
  molFormula[170] = 'NO<SUB>2</SUB><SUP>-1</SUP>';
  molFile[171] = 'n1o3m1';
  molFormula[171] = 'NO<SUB>3</SUB><SUP>-1</SUP>';
  molFile[172] = 'n3m1';
  molFormula[172] = 'N<SUB>3</SUB><SUP>-1</SUP>';
  molFile[173] = 'p1cl4p1';
  molFormula[173] = 'PCl<SUB>4</SUB><SUP>+1</SUP>';
  molFile[174] = 'p1f6m1';
  molFormula[174] = 'PF<SUB>6</SUB><SUP>-1</SUP>';
  molFile[175] = 'p1o4m3';
  molFormula[175] = 'PO<SUB>4</SUB><SUP>-3</SUP>';
  molFile[176] = 's1o3m2';
  molFormula[176] = 'SO<SUB>3</SUB><SUP>-2</SUP>';
  molFile[177] = 's1o4m2';
  molFormula[177] = 'SO<SUB>4</SUB><SUP>-2</SUP>';
  molFile[178] = 'sb1f6m1';
  molFormula[178] = 'SbF<SUB>6</SUB><SUP>-1</SUP>';
  molFile[179] = 'se1o4m2';
  molFormula[179] = 'SeO<SUB>4</SUB><SUP>-2</SUP>';
  molFile[180] = 'si1f6m2';
  molFormula[180] = 'SiF<SUB>6</SUB><SUP>-2</SUP>';

  // oxyacids 181-196

  molFile[181] = 'h1br1o1';
  molFormula[181] = 'HBrO';
  molFile[182] = 'h1br1o2';
  molFormula[182] = 'HBrO<SUB>2</SUB>';
  molFile[183] = 'h1br1o3';
  molFormula[183] = 'HBrO<SUB>3</SUB>';
  molFile[184] = 'h1br1o4';
  molFormula[184] = 'HBrO<SUB>4</SUB>';
  molFile[185] = 'h1cl1o1';
  molFormula[185] = 'HClO';
  molFile[186] = 'h1cl1o2';
  molFormula[186] = 'HClO<SUB>2</SUB>';
  molFile[187] = 'h1cl1o3';
  molFormula[187] = 'HClO<SUB>3</SUB>';
  molFile[188] = 'h1cl1o4';
  molFormula[188] = 'HClO<SUB>4</SUB>';
  molFile[189] = 'h1n1o2';
  molFormula[189] = 'HNO<SUB>2</SUB>';
  molFile[190] = 'h1n1o3';
  molFormula[190] = 'HNO<SUB>3</SUB>';
  molFile[191] = 'h2c1o3';
  molFormula[191] = 'H<SUB>2</SUB>CO<SUB>3</SUB>';
  molFile[192] = 'h2s1o3';
  molFormula[192] = 'H<SUB>2</SUB>SO<SUB>3</SUB>';
  molFile[193] = 'h2s1o4';
  molFormula[193] = 'H<SUB>2</SUB>SO<SUB>4</SUB>';
  molFile[194] = 'h2se1o4';
  molFormula[194] = 'H<SUB>2</SUB>SeO<SUB>4</SUB>';
  molFile[195] = 'h3as1o4';
  molFormula[195] = 'H<SUB>3</SUB>AsO<SUB>3</SUB>';
  molFile[196] = 'h3p1o4';
  molFormula[196] = 'H<SUB>3</SUB>PO<SUB>4</SUB>';

// Possible Electronic Structures
  
// eGroupArray[0] = 'Linear (Hydrogen)';
// eGroupArray[1] = 'Linear';
// eGroupArray[2] = 'Trigonal Planar';
// eGroupArray[3] = 'Tetrahedral';
// eGroupArray[4] = 'Trigonal Bipyramidal';
// eGroupArray[5] = 'Octahedral';
  
eGroupArray[0] = 'Linear';
eGroupArray[1] = 'Trigonal Planar';
eGroupArray[2] = 'Tetrahedral';
eGroupArray[3] = 'Trigonal Bipyramidal';
eGroupArray[4] = 'Octahedral';

// Possible Molecular Shapes
  
 shapeArray[0] = 'Linear';
 shapeArray[1] = 'Bent';
 shapeArray[2] = 'Trigonal Planar';
 shapeArray[3] = 'Trigonal Pyramidal';
 shapeArray[4] = 'Tetrahedral';
 shapeArray[5] = 'T-Shaped';
 shapeArray[6] = 'SeeSaw';
 shapeArray[7] = 'Trigonal Bipyramidal';
 shapeArray[8] = 'Square Planar';
 shapeArray[9] = 'Square Pyramidal';
shapeArray[10] = 'Octahedral';

// Possible Molecule File Paths
  
 pathArray[0] = 'Linear';
 pathArray[1] = 'Bent';
 pathArray[2] = 'TrigPlanar';
 pathArray[3] = 'TrigPyram';
 pathArray[4] = 'Tetra';
 pathArray[5] = 'TShape';
 pathArray[6] = 'Seesaw';
 pathArray[7] = 'TrigBipyram';
 pathArray[8] = 'SquarePlanar';
 pathArray[9] = 'SquarePyram';
pathArray[10] = 'Octa';

function chooseRandomMolecule(isAdmin) {
  var isAdmin;
  var offset;
    
  if (isAdmin != 1) {
    if (quizType == 0) {

    // molecules

      offset = 0;
      possMolecules = 153;
    }
    else if (quizType == 1) {

    // ions

      offset = 153;
      possMolecules = 28;
    }
    else if (quizType == 2) {

    // oxyacids

      offset = 181;
      possMolecules = 16;
    }
    else {

    // random selection from molecules, ions, and oxyacids

      offset = 0;
      possMolecules = 197;
    }
    molNum = Math.round((possMolecules - 1)*Math.random());
    molNum = molNum + offset;
  }

//  vrmlMod = '';
//  tempValue2 = molInfo[molNum].charAt(0);
//  if (tempValue2 == 'y') {
//    vrmlMod = '-mod';
//  }
  tempValue2 = molInfo[molNum].charAt(0);
  // Temp fix for linear modification
  if (tempValue2) {
    tempValue2--;
  }
  molEGroupNum = tempValue2;
  molEGroup = eGroupArray[molEGroupNum];
  tempValue2 = molInfo[molNum].charAt(1);
  letterToNum();
  molShapeNum = tempValue2;
  molShape = shapeArray[molShapeNum];
  molPath = pathArray[molShapeNum];
}
  
function letterToNum() {
  if (tempValue2 == 'a') {
    tempValue2 = 0;
  }
  else if (tempValue2 == 'b') {
    tempValue2 = 1;
  }
  else if (tempValue2 == 'c') {
    tempValue2 = 2;
  }
  else if (tempValue2 == 'd') {
    tempValue2 = 3;
  }
  else if (tempValue2 == 'e') {
    tempValue2 = 4;
  }
  else if (tempValue2 == 'f') {
    tempValue2 = 5;
  }
  else if (tempValue2 == 'g') {
    tempValue2 = 6;
  }
  else if (tempValue2 == 'h') {
    tempValue2 = 7;
  }
  else if (tempValue2 == 'i') {
    tempValue2 = 8;
  }
  else if (tempValue2 == 'j') {
    tempValue2 = 9;
  }
  else {
    tempValue2 = 10;
  }
}

function popUpRules() {
  rulesWindowOpened = 1;
  rulesWindow = window.open('../Lewis/lewis-rules8.html','rulesWindowName','resizable=1,scrollbars=1,width=300,height=400');
  rulesWindow.focus();
}

function popUpTable() {
  tableWindowOpened = 1;
  tableWindow = window.open('../Nomen/period-basic.html','tableWindowName','resizable=1,scrollbars=1,width=525,height=400');
  tableWindow.focus();
}

function closeChildWindows() {
  if (rulesWindowOpened) {
    if (!rulesWindow.closed) {
      rulesWindow.close();
    }
  }
  if (quizWindowOpened) {
    if (!quizWindow.closed) {
      quizWindow.close();
    }
  }
  if (tableWindowOpened) {
    if (!tableWindow.closed) {
      tableWindow.close();
    }
  }
  if (helpWindowOpened) {
    if (!helpWindow.closed) {
      helpWindow.close();
    }
  }
  if (animWindowOpened) {
    if (!animWindow.closed) {
      animWindow.close();
    }
  }
  if (jmolWindowOpened) {
    if (!jmolWindow.closed) {
      jmolWindow.close();
    }
  }
//  if (vrmlWindowOpened) {
//    if (!vrmlWindow.closed) {
//      vrmlWindow.close();
//    }
//  }
}

function initValues(isAdmin) {
  var isAdmin;

  checkBrowser();    
  if (isAdmin == 1) {
    window.document.adminshape.password.value = '';
  }
  quizWidth = 725;
  quizHeight = 635;
  rulesWindowOpened = 0;
  quizWindowOpened = 0;
  tableWindowOpened = 0;
  helpWindowOpened = 0;
  animWindowOpened = 0;
  jmolWindowOpened = 0;
//  vrmlWindowOpened = 0;
}

function popUpShapeQuiz(tempValue) {
  var tempValue;

//  quizType = tempValue;
  quizType = tempValue.substr(tempValue.length - 1,1) - 0;
  quizType = quizType - 1;
  shapeQuiz(0);
}

function popUpAnotherShapeQuiz(tempValue) {
  var tempValue;
  shapeQuiz(0);
}

function openHelpWindow() {
  helpWindowOpened = 1;
//  if (!is_macie) {
    helpWindow = window.open('shape-help.html','helpWindowName','resizable=1,scrollbars=1,status=1,width=500,height=400');
//  }
//  else {
//    helpWindow = window.open('shape-help-macie.html','helpWindowName','resizable=1,scrollbars=1,status=1,width=400,height=400');
//  }
  helpWindow.focus();
}

function addressPrint() {
  quizWindow.document.write('<HR>\n<DIV>\n' +
    '<A HREF=\"javascript: opener.openHelpWindow()\"><IMG ALT=\"help!\" ' +
    'BORDER=\"0\" ALIGN=\"right\" SRC=\"..\/..\/Images\/help-button.gif\" ' +
    'HEIGHT=\"37\" WIDTH=\"62\"><\/A>\nScript last modified: ' + dateMod + 
    '<BR><A HREF=\"mailto:' + emailAdd + '\">' + emailAdd +
    '<\/A>\n<\/DIV>\n');
}

function doAnimation() {
  animWindowOpened = 1;
  animWindow = window.open('','animWindowName','resizable=1,scrollbars=1,status=1,width=' + animWidth + ',height=' + animHeight);
  animWindow.document.write('<HTML>\n<HEAD><TITLE>Image Animation<\/TITLE>');
  animWindow.document.write('<SCR' + 'IPT LANGUAGE=\"javascript\">\n');
  animWindow.document.write('function mOver(whichForm,whichElement) {\n' +
    'var whichForm;\nvar whichElement;\n\n' +
    'document.forms[whichForm].elements[whichElement].style.backgroundColor = \'#000000\';\n' +
    'document.forms[whichForm].elements[whichElement].style.color = \'#FFFFFF\';\n' +
    '}\n\n' +
    'function mOut(whichForm,whichElement) {\n' +
    'var whichForm;\nvar whichElement;\n\n' +
    'document.forms[whichForm].elements[whichElement].style.backgroundColor = \'\';\n' +
    'document.forms[whichForm].elements[whichElement].style.color = \'\';\n}\n\n');
  animWindow.document.write('<\/SCR' + 'IPT>\n');
  animWindow.document.write('<\/HEAD>\n<BODY STYLE=\"background-color: #FFFFFF\">\n<H2 STYLE=\"text-align: center\">\n' +
    molFormula[molNum] +
    '<\/H2>\n<DIV ALIGN=\"center\">\n<IMG SRC="Molecules\/' +
    molPath + '\/' + molFile[molNum] + '-animb.gif' +
    '\" WIDTH=\"300\" HEIGHT=\"300\" ALT=\"Animated Gif\">\n' +
    '<FORM>\n<INPUT TYPE=\"button\" ' +
    'onMouseOver= \"mOver(0,0)\" ' +
    'onMouseOut= \"mOut(0,0)\" ' +
    'onClick=\"window.close()\" VALUE=\"Close Window\">\n' +
    '<\/FORM>\n<\/DIV>\n<\/BODY>\n<\/HTML>');
  animWindow.document.close();
  animWindow.focus();
}

function doJmol() {
  jmolWindowOpened = 1;
  jmolWindow = window.open('quiz-jmol.html?' + molFile[molNum] + ',' + molShapeNum,'jmolWindowName','resizable=1,scrollbars=1,status=1,width=' + jmolWidth + ',height=' + jmolHeight);
  jmolWindow.focus();
}

//function doChime() {
//  chimeWindowOpened = 1;
//  chimeWindow = window.open('','chimeWindowName','resizable=1,scrollbars=1,status=1,width=' + chimeWidth + ',height=' + chimeHeight);
//  chimeWindow.document.write('<HTML>\n<HEAD><TITLE>Chime Window<\/TITLE>');
//  chimeWindow.document.write('<SCR' + 'IPT LANGUAGE=\"javascript\">\n');
//  chimeWindow.document.write('function mOver(whichForm,whichElement) {\n' +
//    'var whichForm;\nvar whichElement;\n\n' +
//    'document.forms[whichForm].elements[whichElement].style.backgroundColor = \'#000000\';\n' +
//    'document.forms[whichForm].elements[whichElement].style.color = \'#FFFFFF\';\n' +
//    '}\n\n' +
//    'function mOut(whichForm,whichElement) {\n' +
//    'var whichForm;\nvar whichElement;\n\n' +
//    'document.forms[whichForm].elements[whichElement].style.backgroundColor = \'\';\n' +
//    'document.forms[whichForm].elements[whichElement].style.color = \'\';\n}\n\n');
//  chimeWindow.document.write('<\/SCR' + 'IPT>\n');
//  chimeWindow.document.write('<\/HEAD>\n<BODY STYLE=\"background-color: #FFFFFF\">\n<H1 STYLE=\"text-align: center\">\n' +
//    molFormula[molNum] +
//    '<\/H2>\n<DIV ALIGN=\"center\">\n' +
//    '<EMBED SRC=\"Molecules/' + molPath + '\/' + molFile[molNum] + '.pdb' + '\" WIDTH=\"250\" HEIGHT=\"250\" BONDSCALE3D=\"asdrawn_fitbox\" BGCOLOR=\"black\" DISPLAY3D=\"ball&stick\" FRANK=\"true\" SPINFPS=\"10\" SPINY=\"90\" STARTSPIN=\"true\" TYPE=\"chemical\/x-pdb\">\n' +
//    '<FORM>\n<INPUT TYPE=\"button\" ' +
//    'onMouseOver= \"mOver(0,0)\" ' +
//    'onMouseOut= \"mOut(0,0)\" ' +
//    'onClick=\"window.close()\" VALUE=\"Close Window\">\n' +
//    '<\/FORM>\n<\/DIV>\n<\/BODY>\n<\/HTML>');
//  chimeWindow.document.close();
//  chimeWindow.focus();
//}

function printShapeHeader() {
  quizWindow.document.write('<HEAD>\n<TITLE>Molecular Shape Quiz' +
    '<\/TITLE>\n<SCR' + 'IPT LANGUAGE=\"javascript\">\n');
  quizWindow.document.write('if (document.images) {\n' +
    'lewisspacer = new Image();\n' +
    'lewisspacer.src = \'Images\/lewis-spacer.gif\';\n\n' +
    'lewispic = new Image();\n' +
    'lewispic.src = \'..\/Lewis\/Images\/Random\/' +
    molFile[molNum] + '.gif\';\n\n' +
    'egroupspacer = new Image();\n' +
    'egroupspacer.src = \'Images\/egroup-spacer.gif\';\n\n' +
    'egrouppic = new Image();\n' +
    'egrouppic.src = \'Molecules\/' + molPath + '\/' +
    molFile[molNum] + '-group.gif\';\n\n' +
    'shapespacer = new Image();\n' +
    'shapespacer.src = \'Images\/shape-spacer.gif\';\n\n' +
    'shapepic = new Image();\n' +
    'shapepic.src = \'Molecules\/' +
    molPath + '\/' + molFile[molNum] + 'b.jpg\';\n}\n\n');
  quizWindow.document.write('function revealEGroup() {\n' +
    'changeImage(\'molEGroup\',\'egrouppic\');\n' +
    'window.document.eGroupForm.eGroupName.value = \'' +
    molEGroup + '\';\n}\n\n');
  quizWindow.document.write('function revealShape() {\n' +
    'changeImage(\'molShape\',\'shapepic\');\n' +
    'window.document.shapeForm.shapeName.value = \'' + molShape + '\';\n}\n\n' +
    'function changeImage(formName,newImage) {\n' +
    'document[formName].src = eval(newImage + \'.src\');\n}\n\n' +
    'function resetAll() {\n' +
    'window.document.eGroupForm.eGroupName.value = \'Don\\\'t peek!\';\n' +
    'window.document.shapeForm.shapeName.value = \'Don\\\'t peek!\';\n' +
    'changeImage(\'molLewis\',\'lewisspacer\');\n' +
    'changeImage(\'molEGroup\',\'egroupspacer\');\n' +
    'changeImage(\'molShape\',\'shapespacer\');\n}\n\n');
  printButtonChanges();
  quizWindow.document.write('<\/SCR' + 'IPT>\n');
  printStyleSheet();
  quizWindow.document.write('<\/HEAD>\n');
}

function printJmolButton() {
  quizWindow.document.write('<TD>\n<FORM NAME=\"jmolForm\" action=\"\"' +
    'onSubmit=\"javascript: opener.doJmol(); return false\" METHOD=\"POST\">\n' +
    '<INPUT TYPE=\"submit\" ' +
    'onMouseOver= \"mOver(document.forms.length-3,0)\" ' +
    'onMouseOut= \"mOut(document.forms.length-3,0)\" ' +
    'VALUE=\"Jmol Window\">\n<\/FORM>\n<\/TD>\n');
}

function shapeQuiz(isAdmin) {
  var isAdmin;
    
  chooseRandomMolecule(isAdmin);
  quizWindowOpened = 1;
  quizWindow = window.open('','quizWindowName','resizable=1,scrollbars=1,status=1,width=' + quizWidth + ',height=' + quizHeight);
  quizWindow.document.write('<HTML>\n');
  printShapeHeader();  
  quizWindow.document.write('<BODY STYLE=\"background: #FFFFFF\">\n' +
    '<H1 STYLE=\"text-align: center\">Molecular Shape<\/H1>\n');
  if (isAdmin == 0) {
    quizWindow.document.write('<H2 STYLE=\"text-align: center\">Quiz ' + 
      (quizType + 1) + '<\/H2>\n');
  }
  quizWindow.document.write('<H2 STYLE=\"text-align: center\">');
  quizWindow.document.write(molFormula[molNum] + '<\/H2>\n');
  quizWindow.document.write('<DIV ALIGN=\"center\">\n' +
    '<TABLE BORDER=\"1\">\n<TR>\n<TD STYLE=\"background-color: white; text-align: center\">\n' +
    '<IMG NAME=\"molLewis\" SRC=\"Images/lewis-spacer.gif\" ' +
    'WIDTH=\"150\" HEIGHT=\"150\" BORDER=\"0\" ALT=\"Lewis structure\">\n' +
    '<\/TD>\n<TD STYLE=\"background-color: white; text-align: center\">' +
    '<IMG NAME=\"molEGroup\" SRC=\"Images/egroup-spacer.gif\" ' +
    'WIDTH=\"200\" HEIGHT=\"200\" BORDER=\"0\" ' +
    'ALT=\"Electronic structure\">\n<\/TD>\n' +
    '<TD STYLE=\"background-color: white; text-align: center\">\n' +
    '<IMG NAME=\"molShape\" SRC=\"Images/shape-spacer.gif\" ' +
    'WIDTH=\"300\" HEIGHT=\"300\" BORDER=\"0\" ALT=\"Shape display\">\n' +
    '<\/TD>\n<\/TR>\n<TR>\n<TD STYLE=\"text-align: center\">\n' +
    'Lewis Structure\n<\/TD>\n<TD STYLE=\"text-align: center\">\n' +
    'Electronic Structure\n<\/TD>\n<TD STYLE=\"text-align: center\">\n' +
    'Molecular Structure<BR>(Shape)\n<\/TD>\n<\/TR><TR>\n');
  quizWindow.document.write('<TD VALIGN=\"bottom\" STYLE=\"text-align: center\">\n' +
    '<FORM NAME=\"lewisForm\" ACTION=\"javascript: ' +
    'changeImage(\'molLewis\',\'lewispic\');\" ' +
    'Method=\"post\">\n<INPUT TYPE=\"submit\" ' +
    'onMouseOver= \"mOver(0,0)\" ' +
    'onMouseOut= \"mOut(0,0)\" ' +
    'VALUE=\"Reveal!\">\n<\/FORM>\n<\/TD>\n');
  quizWindow.document.write('<TD STYLE=\"text-align: center\">\n' +
    '<FORM NAME=\"eGroupForm\" onSubmit=\"opener.chooseEGroup(button); return false\" ' +
    'Method=\"post\">\n');
  printEGroupChoices();
  quizWindow.document.write('<BR>\n' +
    '<span id=\"eGroupRight\" class=\"hideIt1\"><B>Correct!<\/B><\/span>' +
    '<span id=\"eGroupWrong\" class=\"hideIt2\"><B>Incorrect!<\/B><\/span><BR>\n' +
    '<INPUT TYPE=\"submit\" onMouseOver= \"mOver(1,1)\" onMouseOut= \"mOut(1,1)\" ' +
    'onClick=\"button=this.value\" VALUE=\"Grade It!\">\nor\n' +
    '<INPUT TYPE=\"submit\" onMouseOver= \"mOver(1,2)\" onMouseOut= \"mOut(1,2)\" ' +
    'onClick=\"button=this.value\" VALUE=\"Reveal!\">\n' +
    '<\/FORM>\n<\/TD>\n');
  quizWindow.document.write('<TD STYLE=\"text-align: center\">\n' +
    '<FORM NAME=\"shapeForm\" onSubmit=\"opener.chooseShape(button); return false\" ' +
    'Method=\"post\">\n');
  printShapeChoices();
  quizWindow.document.write('<BR>\n' +
    '<span id=\"shapeRight\" class=\"hideIt1\"><B>Correct!<\/B><\/span>' +
    '<span id=\"shapeWrong\" class=\"hideIt2\"><B>Incorrect!<\/B><\/span><BR>\n' +
    '<INPUT TYPE=\"submit\" onMouseOver= \"mOver(2,1)\" onMouseOut= \"mOut(2,1)\" ' +
    'onClick=\"button=this.value\" VALUE=\"Grade It!\">\nor\n' +
    '<INPUT TYPE=\"submit\" onMouseOver= \"mOver(2,2)\" onMouseOut= \"mOut(2,2)\" ' +
    'onClick=\"button=this.value\" VALUE=\"Reveal!\">\n' +
    '<\/FORM>\n<\/TD>\n');
  quizWindow.document.write('<\/TR>\n<\/TABLE>\n<\/DIV>\n<BR>\n' +
    '<DIV ALIGN=\"center\">\n<TABLE BORDER=\"0\">\n<TR>\n' +
//    '<TD>\n<FORM NAME=\"animateForm\" ACTION=\"javascript: opener.doAnimation();\" ' +
//    'METHOD=\"POST\">\n<INPUT TYPE=\"submit\" ' +
    '<TD>\n<FORM NAME=\"animateForm\" action=\"\" onSubmit=\"javascript: opener.doAnimation(); ' +
    'return false\" ' +
    'METHOD=\"POST\">\n<INPUT TYPE=\"submit\" ' +
    'onMouseOver= \"mOver(3,0)\" ' +
    'onMouseOut= \"mOut(3,0)\" ' +
    'VALUE=\"Animation Window\">\n' +
    '<\/FORM>\n<\/TD>\n');
//  if (!is_macie) {
    printJmolButton();
//  }
  quizWindow.document.write('<\/TR>\n<\/TABLE>\n<\/DIV>\n\n<BR>\n');
  quizWindow.document.write('<DIV ALIGN=\"center\">\n<TABLE>\n<TR>\n<TD>\n' +
    '<FORM>\n<INPUT TYPE=\"button\" ' +
    'onMouseOver=\"mOver(document.forms.length-2,0); self.status=\'Another quiz!\';return true\"\n' +
    'onMouseOut=\"mOut(document.forms.length-2,0); self.status=\'\';return true\"\n ' +
    'onClick=\"opener.popUpAnotherShapeQuiz(' + quizType + ')\"\n ' +
    'VALUE=\"Gimme\' Another One\">\n' +
    '<INPUT TYPE=\"button\" ' +
    'onClick=\"window.close()\"' +
    'onMouseOver=\"mOver(document.forms.length-2,1); self.status=\'Close this window\';return true\"\n' +
    'onMouseOut=\"mOut(document.forms.length-2,1); self.status=\'\';return true\"\n ' +
    'VALUE=\"Close Window\">\n<\/FORM>\n<\/TD>\n<TD>\n<FORM>\n' +
    '<INPUT TYPE=\"button\" ' +
    'onClick=\"opener.focus()\"\n' +
    'onMouseOver=\"mOver(document.forms.length-1,0); self.status=\'Switch back to the tutorial\';' +
    'return true\"\nonMouseOut=\"mOut(document.forms.length-1,0); self.status=\'\';return true\"\n ' +
    'VALUE=\"Switch Windows\">\n<\/FORM>\n<\/TD>\n<\/TR>\n<\/TABLE>\n' +
    '<\/DIV>\n\n');
  addressPrint();
  quizWindow.document.write('<\/BODY><\/HTML>');
  quizWindow.document.close();
  quizWindow.focus();
}

function chooseEGroup(whichOne) {
  var whichOne;
  var currCount;
  var userGuess;
  var alertMessage;

  alertMessage = '';
  if (whichOne == 'Reveal!') {
    quizWindow.document.eGroupForm.eGroupChoice[molEGroupNum+1].selected = true;
    quizWindow.changeImage('molEGroup','egrouppic');
    hide('eGroupWrong');
    hide('eGroupRight');
  }
  else {
//    alertMessage = 'Incorrect!';
    for (currCount=0;currCount<quizWindow.document.eGroupForm.eGroupChoice.length;currCount++) {
      if (quizWindow.document.eGroupForm.eGroupChoice[currCount].selected == true) {
        userGuess = currCount;
      }
    }
    if (userGuess) {
      userGuess--;
      if (userGuess == molEGroupNum) {
//        alertMessage = 'Correct!';
        quizWindow.document.eGroupForm.eGroupChoice[molEGroupNum+1].selected = true;
        quizWindow.changeImage('molEGroup','egrouppic');
        show('eGroupRight');
        hide('eGroupWrong');
      }
      else {
        show('eGroupWrong');
        hide('eGroupRight');
      }
    }
    else {
      alertMessage = 'You must select something in order to have it graded.';
    }
    if (alertMessage) {
      quizWindow.alert(alertMessage);
    }
  }
}

function chooseShape(whichOne) {
  var whichOne;
  var currCount;
  var userGuess;
  var alertMessage;

  alertMessage = '';
  if (whichOne == 'Reveal!') {
    quizWindow.document.shapeForm.shapeChoice[molShapeNum+1].selected = true;
    quizWindow.changeImage('molShape','shapepic');
    hide('shapeWrong');
    hide('shapeRight');
  }
  else {
//    alertMessage = 'Incorrect!';
    for (currCount=0;currCount<quizWindow.document.shapeForm.shapeChoice.length;currCount++) {
      if (quizWindow.document.shapeForm.shapeChoice[currCount].selected == true) {
        userGuess = currCount;
      }
    }
    if (userGuess) {
      userGuess--;
      if (userGuess == molShapeNum) {
//        alertMessage = 'Correct!';
        quizWindow.document.shapeForm.shapeChoice[molShapeNum+1].selected = true;
        quizWindow.changeImage('molShape','shapepic');
        show('shapeRight');
        hide('shapeWrong');
      }
      else {
        show('shapeWrong');
        hide('shapeRight');
      }
    }
    else {
      alertMessage = 'You must select something in order to have it graded.';
    }
    if (alertMessage) {
      quizWindow.alert(alertMessage);
    }
  }
}

function printEGroupChoices() {
  var currCount;

  quizWindow.document.write('<select name=\"eGroupChoice\" size=\"1\">\n');
  quizWindow.document.write('<option value=\"0\">Choose One');
  for (var i=0; i<eGroupArray.length; i++) {
    quizWindow.document.write('<option value=\"' + (i+1) + '\">' +
      eGroupArray[i] + '\n');
  }
  quizWindow.document.write('<\/select>\n');
}

function printShapeChoices() {
  var currCount;

  quizWindow.document.write('<select name=\"shapeChoice\" size=\"1\">\n');
  quizWindow.document.write('<option value=\"0\">Choose One');
  for (var i=0; i<shapeArray.length; i++) {
    quizWindow.document.write('<option value=\"' + (i+1) + '\">' +
      shapeArray[i] + '\n');
  }
  quizWindow.document.write('<\/select>\n');
}

function printButtonChanges() {
  quizWindow.document.write('function mOver(whichForm,whichElement) {\n' +
    'var whichForm;\nvar whichElement;\n\n' +
    'document.forms[whichForm].elements[whichElement].style.backgroundColor = \'#000000\';\n' +
    'document.forms[whichForm].elements[whichElement].style.color = \'#FFFFFF\';\n' +
    '}\n\n' +
    'function mOut(whichForm,whichElement) {\n' +
    'var whichForm;\nvar whichElement;\n\n' +
    'document.forms[whichForm].elements[whichElement].style.backgroundColor = \'\';\n' +
    'document.forms[whichForm].elements[whichElement].style.color = \'\';\n}\n\n');
}

function show(layer) {
  if (document.layers) {  // NN4 DOM
    quizWindow.document.layers[layer].visibility="visible";
  }
  else if ((document.all) && (!document.getElementById)) { // IE4 DOM
    quizWindow.document.all[layer].style.visibility="visible";
  }
  else if (document.getElementById) { // W3C standards-compliant DOM
    quizWindow.document.getElementById(layer).style.visibility="visible";
  }
}

function hide(layer) {
  if (document.layers) {  // NN4 DOM
    quizWindow.document.layers[layer].visibility="hide";
  }
  else if ((document.all) && (!document.getElementById)) { // IE4 DOM
    quizWindow.document.all[layer].style.visibility="hidden";
  }
  else if (document.getElementById) { // W3C standards-compliant DOM
    quizWindow.document.getElementById(layer).style.visibility="hidden";
  }
}

function printStyleSheet() {
  quizWindow.document.write('<STYLE TYPE=\"text\/css\">\n<!--\n' +
    '.hideIt1 { position: relative; visibility: hidden; color: green; }\n' +
    '.hideIt2 { position: relative; visibility: hidden; color: red; }\n' +
    '.showIt { position: relative; visibility: visible; }\n-->\n<\/STYLE>\n');
}
