home *** CD-ROM | disk | FTP | other *** search
/ Imagine the Universe (9th Edition) / Imagine the Universe 9 - Disc 1.iso / pc / imagine / docs / science / try_l1 / javascript / diffuse_background.js < prev    next >
Encoding:
Text File  |  2001-08-20  |  27.5 KB  |  818 lines

  1. var onedown;
  2. var twodown;
  3. var threedown;
  4. var fivedown;
  5. var sixdown;
  6. var sevendown;
  7. var eightdown;
  8. var ninedown;
  9. var fifteendown;
  10. var oneacross;
  11. var fouracross;
  12. var sixacross;
  13. var tenacross;
  14. var elevenacross;
  15. var twelveacross;
  16. var thirteenacross;
  17. var fourteenacross;
  18. var sixteenacross;
  19. var seven2;
  20. var eight2;
  21. var nine2;
  22. var ten2;
  23. var eleven2;
  24. var twelve2;
  25. var fourteen2;
  26. var three3;
  27. var seven3;
  28. var fourteen3;
  29. var three4;
  30. var seven4;
  31. var ten4;
  32. var eleven4;
  33. var twelve4;
  34. var thirteen4;
  35. var fourteen4;
  36. var fifteen4;
  37. var seventeen4;
  38. var eighteen4;
  39. var three5;
  40. var seven5;
  41. var fourteen5;
  42. var eighteen5;
  43. var three6;
  44. var seven6;
  45. var fourteen6;
  46. var eighteen6;
  47. var one7;
  48. var two7;
  49. var three7;
  50. var four7;
  51. var five7;
  52. var six7;
  53. var seven7;
  54. var eight7;
  55. var nine7;
  56. var ten7;
  57. var eleven7;
  58. var fourteen7;
  59. var eighteen7;
  60. var one8;
  61. var seven8;
  62. var fourteen8;
  63. var eighteen8;
  64. var one9;
  65. var seven9;
  66. var ten9;
  67. var fourteen9;
  68. var eighteen9;
  69. var twenty9;
  70. var twentytwo9;
  71. var one10;
  72. var four10;
  73. var five10;
  74. var six10;
  75. var seven10;
  76. var eight10;
  77. var nine10;
  78. var ten10;
  79. var fourteen10;
  80. var seventeen10;
  81. var eighteen10;
  82. var nineteen10;
  83. var twenty10;
  84. var twentyone10;
  85. var twentytwo10;
  86. var twentythree10;
  87. var twentyfour10;
  88. var twentyfive10;
  89. var one11;
  90. var ten11;
  91. var fourteen11;
  92. var eighteen11;
  93. var twenty11;
  94. var twentytwo11;
  95. var ten12;
  96. var eleven12;
  97. var twelve12;
  98. var thirteen12;
  99. var fourteen12;
  100. var eighteen12;
  101. var twenty12;
  102. var twentytwo12;
  103. var ten13;
  104. var fourteen13;
  105. var twenty13;
  106. var two14;
  107. var three14;
  108. var four14;
  109. var five14;
  110. var six14;
  111. var seven14;
  112. var eight14;
  113. var nine14;
  114. var ten14;
  115. var fourteen14;
  116. var ten15;
  117. var three16;
  118. var four16;
  119. var five16;
  120. var six16;
  121. var seven16;
  122. var eight16;
  123. var nine16;
  124. var ten16;
  125. var six17;
  126. var ten17;
  127. var six18;
  128. var six29;
  129. var seven19;
  130. var eight19;
  131. var nine19;
  132. var ten19;
  133. var eleven19;
  134. var six20;
  135. var six21;
  136. var six22;
  137. var six23;
  138. var six24;
  139. var six25;
  140.  
  141.  
  142. function reset() {
  143.     location = "diffuse_background.html";
  144. }
  145.  
  146. function checkme() {
  147.  
  148.     onedown = document.puzzle.onedown.value;
  149.     twodown = document.puzzle.twodown.value;
  150.     threedown = document.puzzle.threedown.value;
  151.     fivedown = document.puzzle.fivedown.value;
  152.     sixdown = document.puzzle.sixdown.value;
  153.     sevendown = document.puzzle.sevendown.value;
  154.     eightdown = document.puzzle.eightdown.value;
  155.     ninedown = document.puzzle.ninedown.value;
  156.     fifteendown = document.puzzle.fifteendown.value;
  157.     oneacross = document.puzzle.oneacross.value;
  158.     fouracross = document.puzzle.fouracross.value;
  159.     sixacross = document.puzzle.sixacross.value;
  160.     tenacross = document.puzzle.tenacross.value;
  161.     elevenacross = document.puzzle.elevenacross.value;
  162.     twelveacross = document.puzzle.twelveacross.value;
  163.     thirteenacross = document.puzzle.thirteenacross.value;
  164.     fourteenacross = document.puzzle.fourteenacross.value;
  165.     sixteenacross = document.puzzle.sixteenacross.value;
  166.     seven2 = document.puzzle.seven2.value;
  167.     eight2 = document.puzzle.eight2.value;
  168.     nine2 = document.puzzle.nine2.value;
  169.     ten2 = document.puzzle.ten2.value;
  170.     eleven2 = document.puzzle.eleven2.value;
  171.     twelve2 = document.puzzle.twelve2.value;
  172.     fourteen2 = document.puzzle.fourteen2.value;
  173.     three3 = document.puzzle.three3.value;
  174.     seven3 = document.puzzle.seven3.value;
  175.     fourteen3 = document.puzzle.fourteen3.value;
  176.     three4 = document.puzzle.three4.value;
  177.     seven4 = document.puzzle.seven4.value;
  178.     ten4 = document.puzzle.ten4.value;
  179.     eleven4 = document.puzzle.eleven4.value;
  180.     twelve4 = document.puzzle.twelve4.value;
  181.     thirteen4 = document.puzzle.thirteen4.value;
  182.     fourteen4 = document.puzzle.fourteen4.value;
  183.     fifteen4 = document.puzzle.fifteen4.value;
  184.     sixteen4 = document.puzzle.sixteen4.value;
  185.     seventeen4 = document.puzzle.seventeen4.value;
  186.     eighteen4 = document.puzzle.eighteen4.value;
  187.     three5 = document.puzzle.three5.value;
  188.     seven5 = document.puzzle.seven5.value;
  189.     fourteen5 = document.puzzle.fourteen5.value;
  190.     eighteen5 = document.puzzle.eighteen5.value;
  191.     three6 = document.puzzle.three6.value;
  192.     seven6 = document.puzzle.seven6.value;
  193.     fourteen6 = document.puzzle.fourteen6.value;
  194.     eighteen6 = document.puzzle.eighteen6.value;
  195.     one7 = document.puzzle.one7.value;
  196.     two7 = document.puzzle.two7.value;
  197.     three7 = document.puzzle.three7.value;
  198.     four7 = document.puzzle.four7.value;
  199.     five7 = document.puzzle.five7.value;
  200.     six7 = document.puzzle.six7.value;
  201.     seven7 = document.puzzle.seven7.value;
  202.     eight7 = document.puzzle.eight7.value;
  203.     nine7 = document.puzzle.nine7.value;
  204.     ten7 = document.puzzle.ten7.value;
  205.     eleven7 = document.puzzle.eleven7.value;
  206.     fourteen7 = document.puzzle.fourteen7.value;
  207.     eighteen7 = document.puzzle.eighteen7.value;
  208.     one8 = document.puzzle.one8.value;
  209.     seven8 = document.puzzle.seven8.value;
  210.     fourteen8 = document.puzzle.fourteen8.value;
  211.     eighteen8 = document.puzzle.eighteen8.value;
  212.     one9 = document.puzzle.one9.value;
  213.     seven9 = document.puzzle.seven9.value;
  214.     ten9 = document.puzzle.ten9.value;
  215.     fourteen9 = document.puzzle.fourteen9.value;
  216.     eighteen9 = document.puzzle.eighteen9.value;
  217.     twenty9 = document.puzzle.twenty9.value;
  218.     twentytwo9 = document.puzzle.twentytwo9.value;
  219.     one10 = document.puzzle.one10.value;
  220.     four10 = document.puzzle.four10.value;
  221.     five10 = document.puzzle.five10.value;
  222.     six10 = document.puzzle.six10.value;
  223.     seven10 = document.puzzle.seven10.value;
  224.     eight10 = document.puzzle.eight10.value;
  225.     nine10 = document.puzzle.nine10.value;
  226.     ten10 = document.puzzle.ten10.value;
  227.     fourteen10 = document.puzzle.fourteen10.value;
  228.     seventeen10 = document.puzzle.seventeen10.value;
  229.     eighteen10 = document.puzzle.eighteen10.value;
  230.     nineteen10 = document.puzzle.nineteen10.value;
  231.     twenty10 = document.puzzle.twenty10.value;
  232.     twentyone10 = document.puzzle.twentyone10.value;
  233.     twentytwo10 = document.puzzle.twentytwo10.value;
  234.     twentythree10 = document.puzzle.twentythree10.value;
  235.     twentyfour10 = document.puzzle.twentyfour10.value;
  236.     twentyfive10 = document.puzzle.twentyfive10.value;
  237.     one11 = document.puzzle.one11.value;
  238.     ten11 = document.puzzle.ten11.value;
  239.     fourteen11 = document.puzzle.fourteen11.value;
  240.     eighteen11 = document.puzzle.eighteen11.value;
  241.     twenty11 = document.puzzle.twenty11.value;
  242.     twentytwo11 = document.puzzle.twentytwo11.value;
  243.     ten12 = document.puzzle.ten12.value;
  244.     eleven12 = document.puzzle.eleven12.value;
  245.     twelve12 = document.puzzle.twelve12.value;
  246.     thirteen12 = document.puzzle.thirteen12.value;
  247.     fourteen12 = document.puzzle.fourteen12.value;
  248.     eighteen12 = document.puzzle.eighteen12.value;
  249.     twenty12 = document.puzzle.twenty12.value;
  250.     twentytwo12 = document.puzzle.twentytwo12.value;
  251.     ten13 = document.puzzle.ten13.value;
  252.     fourteen13 = document.puzzle.fourteen13.value;
  253.     twenty13 = document.puzzle.twenty13.value;
  254.     two14 = document.puzzle.two14.value;
  255.     three14 = document.puzzle.three14.value;
  256.     four14 = document.puzzle.four14.value;
  257.     five14 = document.puzzle.five14.value;
  258.     six14 = document.puzzle.six14.value;
  259.     seven14 = document.puzzle.seven14.value;
  260.     eight14 = document.puzzle.eight14.value;
  261.     nine14 = document.puzzle.nine14.value;
  262.     ten14 = document.puzzle.ten14.value;
  263.     fourteen14 = document.puzzle.fourteen14.value;
  264.     ten15 = document.puzzle.ten15.value;
  265.     three16 = document.puzzle.three16.value;
  266.     four16 = document.puzzle.four16.value;
  267.     five16 = document.puzzle.five16.value;
  268.     six16 = document.puzzle.six16.value;
  269.     seven16 = document.puzzle.seven16.value;
  270.     eight16 = document.puzzle.eight16.value;
  271.     nine16 = document.puzzle.nine16.value;
  272.     ten16 = document.puzzle.ten16.value;
  273.     six17 = document.puzzle.six17.value;
  274.     ten17 = document.puzzle.ten17.value;
  275.     six18 = document.puzzle.six18.value;
  276.     six19 = document.puzzle.six19.value;
  277.     seven19 = document.puzzle.seven19.value;
  278.     eight19 = document.puzzle.eight19.value;
  279.     nine19 = document.puzzle.nine19.value;
  280.     ten19 = document.puzzle.ten19.value;
  281.     eleven19 = document.puzzle.eleven19.value;
  282.     six20 = document.puzzle.six20.value;
  283.     six21 = document.puzzle.six21.value;
  284.     six22 = document.puzzle.six22.value;
  285.     six23 = document.puzzle.six23.value;
  286.     six24 = document.puzzle.six24.value;
  287.     six25 = document.puzzle.six25.value;
  288.  
  289.     if ((seven2) && (eight2) && (nine2) && (ten2) && (eleven2) && (twelve2) &&
  290.         ((!oneacross) || (oneacross.length < 6))) {
  291.         oneacross = seven2 + eight2 + nine2 + ten2 + eleven2 + twelve2;
  292.         document.puzzle.oneacross.value = oneacross;
  293.     }
  294.     else if (oneacross) {
  295.         if ((seven2) && (seven2 != "?")) {
  296.             if (oneacross.charAt(0) != seven2) {
  297.                 document.puzzle.seven2.value = seven2 = "?";
  298.             }
  299.         }
  300.         else {
  301.             document.puzzle.seven2.value = seven2 = oneacross.charAt(0);
  302.         }
  303.         document.puzzle.eight2.value = eight2 = oneacross.charAt(1);
  304.         document.puzzle.nine2.value = nine2 = oneacross.charAt(2);
  305.         document.puzzle.ten2.value = ten2 = oneacross.charAt(3);
  306.         document.puzzle.eleven2.value = eleven2 = oneacross.charAt(4);
  307.         document.puzzle.twelve2.value = twelve2 = oneacross.charAt(5);
  308.     }
  309.  
  310.     if ((ten4) && (eleven4) && (twelve4) && (thirteen4) && (fourteen4) && (fifteen4) && 
  311.         (sixteen4) && (seventeen4) && (eighteen4) &&
  312.         ((!fouracross) || (fouracross.length < 9))) {
  313.         fouracross = ten4 + eleven4 + twelve4 + thirteen4 + fourteen4 + fifteen4 + sixteen4 + seventeen4 + eighteen4;
  314.         document.puzzle.fouracross.value = fouracross;
  315.     }
  316.     else if (fouracross) {
  317.         document.puzzle.ten4.value = ten4 = fouracross.charAt(0);
  318.         document.puzzle.eleven4.value = eleven4 = fouracross.charAt(1);
  319.         document.puzzle.twelve4.value = twelve4 = fouracross.charAt(2);
  320.         document.puzzle.thirteen4.value = thirteen4 = fouracross.charAt(3);
  321.         if ((fourteen4) && (fourteen4 != "?")) {
  322.             if (fouracross.charAt(4) != fourteen4) {
  323.                 document.puzzle.fourteen4.value = fourteen4 = "?";
  324.             }
  325.         }
  326.         else {
  327.             document.puzzle.fourteen4.value = fourteen4 = fouracross.charAt(4);
  328.         }
  329.         document.puzzle.fifteen4.value = fifteen4 = fouracross.charAt(5);
  330.         document.puzzle.sixteen4.value = sixteen4 = fouracross.charAt(6);
  331.         document.puzzle.seventeen4.value = seventeen4 = fouracross.charAt(7);
  332.         if ((eighteen4) && (eighteen4 != "?")) {
  333.             if (fouracross.charAt(8) != eighteen4) {
  334.                 document.puzzle.eighteen4.value = eighteen4 = "?";
  335.             }
  336.         }
  337.         else {
  338.             document.puzzle.eighteen4.value = eighteen4 = fouracross.charAt(8);
  339.         }
  340.     }
  341.  
  342.     if ((one7) && (two7) && (three7) && (four7) && (five7) &&
  343.         (six7) && (seven7) && (eight7) && (nine7) && (ten7) && (eleven7) && 
  344.         ((!sixacross) || (sixacross.length < 11))) {
  345.         sixacross = one7 + two7 + three7 + four7 + five7 + six7 + seven7 + eight7 + nine7 + ten7 + eleven7;
  346.         document.puzzle.sixacross.value = sixacross;
  347.     }
  348.     else if (sixacross) {
  349.         if ((one7) && (one7 != "?")) {
  350.             if (sixacross.charAt(0) != one7) {
  351.                 document.puzzle.one7.value = one7 = "?";
  352.             }
  353.         }
  354.         else {
  355.             document.puzzle.one7.value = one7 = sixacross.charAt(0);
  356.         }
  357.         document.puzzle.two7.value = two7 = sixacross.charAt(1);
  358.         if ((three7) && (three7 != "?")) {
  359.             if (sixacross.charAt(2) != three7) {
  360.                 document.puzzle.three7.value = three7 = "?";
  361.             }
  362.         }
  363.         else {
  364.             document.puzzle.three7.value = three7 = sixacross.charAt(2);
  365.         }
  366.         document.puzzle.four7.value = four7 = sixacross.charAt(3);
  367.         document.puzzle.five7.value = five7 = sixacross.charAt(4);
  368.         document.puzzle.six7.value = six7 = sixacross.charAt(5);
  369.         if ((seven7) && (seven7 != "?")) {
  370.             if (sixacross.charAt(6) != seven7) {
  371.                 document.puzzle.seven7.value = seven7 = "?";
  372.             }
  373.         }
  374.         else {
  375.             document.puzzle.seven7.value = seven7 = sixacross.charAt(6);
  376.         }
  377.         document.puzzle.eight7.value = eight7 = sixacross.charAt(7);
  378.         document.puzzle.nine7.value = nine7 = sixacross.charAt(8);
  379.         document.puzzle.ten7.value = ten7 = sixacross.charAt(9);
  380.         document.puzzle.eleven7.value = eleven7 = sixacross.charAt(10);
  381.     }
  382.  
  383.  
  384.     if ((four10) && (five10) && (six10) && (seven10) && (eight10) &&
  385.         (nine10) && (ten10) && ((!tenacross) || (tenacross.length < 7))) {
  386.         tenacross = four10 + five10 + six10 + seven10 + eight10 + nine10 + ten10;
  387.         document.puzzle.tenacross.value = tenacross;
  388.     }
  389.     else if (tenacross) {
  390.         document.puzzle.four10.value = four10 = tenacross.charAt(0);
  391.         document.puzzle.five10.value = five10 = tenacross.charAt(1);
  392.         document.puzzle.six10.value = six10 = tenacross.charAt(2);
  393.         if ((seven10) && (seven10 != "?")) {
  394.             if (tenacross.charAt(3) != seven10) {
  395.                 document.puzzle.seven10.value = seven10 = "?";
  396.             }
  397.         }
  398.         else {
  399.             document.puzzle.seven10.value = seven10 = tenacross.charAt(3);
  400.         }
  401.         document.puzzle.eight10.value = eight10 = tenacross.charAt(4);
  402.         document.puzzle.nine10.value = nine10 = tenacross.charAt(5);
  403.         if ((ten10) && (ten10 != "?")) {
  404.             if (tenacross.charAt(6) != ten10) {
  405.                 document.puzzle.ten10.value = ten10 = "?";
  406.             }
  407.         }
  408.         else {
  409.             document.puzzle.ten10.value = ten10 = tenacross.charAt(6);
  410.         }
  411.     }
  412.  
  413.     if ((seventeen10) && (eighteen10) && (nineteen10) && (twenty10) && (twentyone10) &&
  414.         (twentytwo10) && (twentythree10) && (twentyfour10) && (twentyfive10) &&
  415.         ((!elevenacross) || (elevenacross.length < 8))) {
  416.         elevenacross = seventeen10 + eighteen10 + nineteen10 + twenty10 + twentyone10 + twentytwo10 + twentythree10 + twentyfour10 + twentyfive10;
  417.         document.puzzle.elevenacross.value = elevenacross;
  418.     }
  419.     else if (elevenacross) {
  420.         document.puzzle.seventeen10.value = seventeen10 = elevenacross.charAt(0);
  421.         if ((eighteen10) && (eighteen10 != "?")) {
  422.             if (elevenacross.charAt(1) != eighteen10) {
  423.                 document.puzzle.eighteen10.value = eighteen10 = "?";
  424.             }
  425.         }
  426.         else {
  427.             document.puzzle.eighteen10.value = eighteen10 = elevenacross.charAt(1);
  428.         }
  429.         document.puzzle.nineteen10.value = nineteen10 = elevenacross.charAt(2);
  430.         if ((twenty10) && (twenty10 != "?")) {
  431.             if (elevenacross.charAt(3) != twenty10) {
  432.                 document.puzzle.twenty10.value = twenty10 = "?";
  433.             }
  434.         }
  435.         else {
  436.             document.puzzle.twenty10.value = twenty10 = elevenacross.charAt(3);
  437.         }
  438.         document.puzzle.twentyone10.value = twentyone10 = elevenacross.charAt(4);
  439.         if ((twentytwo10) && (twentytwo10 != "?"))  {
  440.             if (elevenacross.charAt(5) != twentytwo10) {
  441.                 document.puzzle.twentytwo10.value = twentytwo10 = "?";
  442.             }
  443.         }
  444.         else {
  445.             document.puzzle.twentytwo10.value = twentytwo10 = elevenacross.charAt(5);
  446.         }
  447.         document.puzzle.twentythree10.value = twentythree10 = elevenacross.charAt(6);
  448.         document.puzzle.twentyfour10.value = twentyfour10 = elevenacross.charAt(7);
  449.         document.puzzle.twentyfive10.value = twentyfive10 = elevenacross.charAt(8);
  450.     }
  451.  
  452.     if ((ten12) && (eleven12) && (twelve12) && (thirteen12) && (fourteen12) && 
  453.         ((!twelveacross) || (twelveacross.length < 5))) {
  454.         twelveacross = ten12 + eleven12 + twelve12 + thirteen12 + fourteen12;
  455.         document.puzzle.twelveacross.value = twelveacross;
  456.     }
  457.     else if (twelveacross) {
  458.         if ((ten12) && (ten12 != "?")) {
  459.             if (twelveacross.charAt(0) != ten12) {
  460.                 document.puzzle.ten12.value = ten12 = "?";
  461.             }
  462.         }
  463.         else {
  464.             document.puzzle.ten12.value = ten12 = twelveacross.charAt(0);
  465.         }
  466.         document.puzzle.eleven12.value = eleven12 = twelveacross.charAt(1);
  467.         document.puzzle.twelve12.value = twelve12 = twelveacross.charAt(2);
  468.         document.puzzle.thirteen12.value = thirteen12 = twelveacross.charAt(3);
  469.         if ((fourteen12) && (fourteen12 != "?")) {
  470.             if (twelveacross.charAt(4) != fourteen12) {
  471.                 document.puzzle.fourteen12.value = fourteen12 = "?";
  472.             }
  473.         }
  474.         else {
  475.             document.puzzle.fourteen12.value = fourteen12 = twelveacross.charAt(4);
  476.         }
  477.     }
  478.  
  479.     if ((two14) && (three14) && (four14) && (five14) && (six14) && (seven14) && (eight14) && 
  480.         (nine14) && (ten14) && ((!thirteenacross) || (thirteenacross.length < 9))) {
  481.         thirteenacross = two14 + three14 + four14 + five14 + six14 + seven14 + eight14 + nine14 + ten14;
  482.         document.puzzle.thirteenacross.value = thirteenacross;
  483.     }
  484.     else if (thirteenacross) {
  485.         document.puzzle.two14.value = two14 = thirteenacross.charAt(0);
  486.         document.puzzle.three14.value = three14 = thirteenacross.charAt(1);
  487.         document.puzzle.four14.value = four14 = thirteenacross.charAt(2);
  488.         document.puzzle.five14.value = five14 = thirteenacross.charAt(3);
  489.         document.puzzle.six14.value = six14 = thirteenacross.charAt(4);
  490.         document.puzzle.seven14.value = seven14 = thirteenacross.charAt(5);
  491.         document.puzzle.eight14.value = eight14 = thirteenacross.charAt(6);
  492.         document.puzzle.nine14.value = nine14 = thirteenacross.charAt(7);
  493.         if ((ten14) && (ten14 != "?")) {
  494.             if (thirteenacross.charAt(8) != ten14) {
  495.                 document.puzzle.ten14.value = ten14 = "?";
  496.             }
  497.         }
  498.         else {
  499.             document.puzzle.ten14.value = ten14 = thirteenacross.charAt(8);
  500.         }
  501.     }
  502.  
  503.     if ((three16) && (four16) && (five16) && (six16) && (seven16) && (eight16) && (nine16) &&
  504.         (ten16) && ((!fourteenacross) || (fourteenacross.length < 8))) {
  505.         fourteenacross = three16 + four16 + five16 + six16 + seven16 + eight16 + nine16 + ten16;
  506.         document.puzzle.fourteenacross.value = fourteenacross;
  507.     }
  508.     else if  (fourteenacross) {
  509.         document.puzzle.three16.value = three16 = fourteenacross.charAt(0);
  510.         document.puzzle.four16.value = four16 = fourteenacross.charAt(1);
  511.         document.puzzle.five16.value = five16 = fourteenacross.charAt(2);
  512.         if ((six16) && (six16 != "?")) {
  513.             if (fourteenacross.charAt(3) != six16) {
  514.                 document.puzzle.six16.value = six16 = "?";
  515.             }
  516.         }
  517.         else {
  518.             document.puzzle.six16.value = six16 = fourteenacross.charAt(3);
  519.         }
  520.         document.puzzle.seven16.value = seven16 = fourteenacross.charAt(4);
  521.         document.puzzle.eight16.value = eight16 = fourteenacross.charAt(5);
  522.         document.puzzle.nine16.value = nine16 = fourteenacross.charAt(6);
  523.         if ((ten16) && (ten16 != "?")) {
  524.             if (fourteenacross.charAt(7) != ten16) {
  525.                 document.puzzle.ten16.value = ten16 = "?";
  526.             }
  527.         }
  528.         else {
  529.             document.puzzle.ten16.value = ten16 = fourteenacross.charAt(7);
  530.         }
  531.     }
  532.  
  533.     if ((six19) && (seven19) && (eight19) && (nine19) && (ten19) && (eleven19) && 
  534.         ((!sixteenacross) || (sixteenacross.length < 6))) {
  535.         sixteenacross = six19 + seven19 + eight19 + nine19 + ten19 + eleven19;
  536.         document.puzzle.sixteenacross.value = sixteenacross;
  537.     }
  538.     else if (sixteenacross) {
  539.         if ((six19) && (six19 != "?")) {
  540.             if (sixteenacross.charAt(0) != six19) {
  541.                 document.puzzle.six19.value = six19 = "?";
  542.             }
  543.         }
  544.         else {
  545.             document.puzzle.six19.value = six19 = sixteenacross.charAt(0);
  546.         }
  547.         document.puzzle.seven19.value = seven19 = sixteenacross.charAt(1);
  548.         document.puzzle.eight19.value = eight19 = sixteenacross.charAt(2);
  549.         document.puzzle.nine19.value = nine19 = sixteenacross.charAt(3);
  550.         document.puzzle.ten19.value = ten19 = sixteenacross.charAt(4);
  551.         document.puzzle.eleven19.value = eleven19 = sixteenacross.charAt(5);
  552.     }
  553.  
  554.     if ((seven2) && (seven3) && (seven4) && (seven5) && (seven6) && (seven7) &&
  555.         (seven8) && (seven9) && (seven10) && ((!onedown) || (onedown.length < 9))) {
  556.         onedown = seven2 + seven3 + seven4 + seven5 + seven6 + seven7 + seven8 + seven9 + seven10;
  557.         document.puzzle.onedown.value = onedown;
  558.     }
  559.     else if(onedown) {
  560.         if ((seven2) && (seven2 != "?")) {
  561.             if (onedown.charAt(0) != seven2) {
  562.                 document.puzzle.seven2.value = seven2 = "?";
  563.             }
  564.         }
  565.         else {
  566.             document.puzzle.seven2.value = seven2 = onedown.charAt(0);
  567.             }
  568.         document.puzzle.seven3.value = seven3 = onedown.charAt(1);
  569.         document.puzzle.seven4.value = seven4 = onedown.charAt(2);
  570.         document.puzzle.seven5.value = seven5 = onedown.charAt(3);
  571.         document.puzzle.seven6.value = seven6 = onedown.charAt(4);
  572.         if ((seven7) && (seven7 != "?")) {
  573.             if (onedown.charAt(5) != seven7) {
  574.                 document.puzzle.seven7.value = seven7 = "?";
  575.             }
  576.         }
  577.         else {
  578.             document.puzzle.seven7.value = seven7 = onedown.charAt(5);
  579.             }
  580.         document.puzzle.seven8.value = seven8 = onedown.charAt(6);
  581.         document.puzzle.seven9.value = seven9 = onedown.charAt(7);
  582.         if ((seven10) && (seven10 != "?")) {
  583.             if (onedown.charAt(8) != seven10) {
  584.                 document.puzzle.seven10.value = seven10 = "?";
  585.             }
  586.         }
  587.         else {
  588.             document.puzzle.seven10.value = seven10 = onedown.charAt(8);
  589.             }
  590.     }
  591.  
  592.     if ((fourteen2) && (fourteen3) && (fourteen4) && (fourteen5) && (fourteen6) && (fourteen7) && 
  593.         (fourteen8) && (fourteen9) && (fourteen10) && (fourteen11) && (fourteen12) && 
  594.         (fourteen13) && (fourteen14) && ((!twodown) || (twodown.length < 13))) {
  595.         twodown = fourteen2 + fourteen3 + fourteen4 + fourteen5 + fourteen6 + fourteen7 + fourteen8 + fourteen9 + fourteen10 + fourteen11 + fourteen12 + fourteen13 + fourteen14;
  596.         document.puzzle.twodown.value = twodown;
  597.     }
  598.     else if (twodown) {
  599.         document.puzzle.fourteen2.value = fourteen2 = twodown.charAt(0);
  600.         document.puzzle.fourteen3.value = fourteen3 = twodown.charAt(1);
  601.         if ((fourteen4) && (fourteen4 != "?")) {
  602.             if (twodown.charAt(2) != fourteen4) {
  603.                 document.puzzle.fourteen4.value = fourteen4 = "?";
  604.             }
  605.         }
  606.         else {
  607.             document.puzzle.fourteen4.value = fourteen4 = twodown.charAt(2);
  608.             }
  609.         document.puzzle.fourteen5.value = fourteen5 = twodown.charAt(3);
  610.         document.puzzle.fourteen6.value = fourteen6 = twodown.charAt(4);
  611.         document.puzzle.fourteen7.value = fourteen7 = twodown.charAt(5);
  612.         document.puzzle.fourteen8.value = fourteen8 = twodown.charAt(6);
  613.         document.puzzle.fourteen9.value = fourteen9 = twodown.charAt(7);
  614.         document.puzzle.fourteen10.value = fourteen10 = twodown.charAt(8);
  615.         document.puzzle.fourteen11.value = fourteen11 = twodown.charAt(9);
  616.         if ((fourteen12) && (fourteen12 != "?")) {
  617.             if (twodown.charAt(10) != fourteen12) {
  618.                 document.puzzle.fourteen12.value = fourteen12 = "?";
  619.             }
  620.         }
  621.         else {
  622.             document.puzzle.fourteen12.value = fourteen12 = twodown.charAt(10);
  623.             }
  624.         document.puzzle.fourteen13.value = fourteen13 = twodown.charAt(11);
  625.         document.puzzle.fourteen14.value = fourteen14 = twodown.charAt(12);
  626.     }
  627.  
  628.     if ((three3) && (three4) && (three5) && (three6) && (three7) && 
  629.         ((!threedown) || (threedown.length < 5))) {
  630.         threedown = three3 + three4 + three5 + three6 + three7;
  631.         document.puzzle.threedown.value = threedown;
  632.     }
  633.     else if (threedown) {
  634.         document.puzzle.three3.value = three3 = threedown.charAt(0);
  635.         document.puzzle.three4.value = three4 = threedown.charAt(1);
  636.         document.puzzle.three5.value = three5 = threedown.charAt(2);
  637.         document.puzzle.three6.value = three6 = threedown.charAt(3);
  638.         if ((three7) && (three7 != "?")) {
  639.             if (threedown.charAt(4) != three7) {
  640.                 document.puzzle.three7.value = three7 = "?";
  641.             }
  642.         }
  643.         else {
  644.             document.puzzle.three7.value = three7 = threedown.charAt(4);
  645.             }
  646.     }
  647.  
  648.     if ((eighteen4) && (eighteen5) && (eighteen6) && (eighteen7) && (eighteen8) && 
  649.         (eighteen9) && (eighteen10) && (eighteen11) && (eighteen12) && 
  650.         ((!fivedown) || (fivedown.length < 9))) {
  651.         fivedown = eighteen4 + eighteen5 + eighteen6 + eighteen7 + eighteen8 + eighteen9 + eighteen10 + eighteen11 + eighteen12;
  652.         document.puzzle.fivedown.value = fivedown;
  653.     }
  654.     else if (fivedown) {
  655.         if ((eighteen4) && (eighteen4 != "?")) {
  656.             if (fivedown.charAt(0) != eighteen4) {
  657.                 document.puzzle.eighteen4.value = eighteen4 = "?";
  658.             }
  659.         }
  660.         else {
  661.             document.puzzle.eighteen4.value = eighteen4 = fivedown.charAt(0);
  662.             }
  663.         document.puzzle.eighteen5.value = eighteen5 = fivedown.charAt(1);
  664.         document.puzzle.eighteen6.value = eighteen6 = fivedown.charAt(2);
  665.         document.puzzle.eighteen7.value = eighteen7 = fivedown.charAt(3);
  666.         document.puzzle.eighteen8.value = eighteen8 = fivedown.charAt(4);
  667.         document.puzzle.eighteen9.value = eighteen9 = fivedown.charAt(5);
  668.         if ((eighteen10) && (eighteen10 != "?")) {
  669.             if (fivedown.charAt(6) != eighteen10) {
  670.                 document.puzzle.eighteen10.value = eighteen10 = "?";
  671.             }
  672.         }
  673.         else {
  674.             document.puzzle.eighteen10.value = eighteen10 = fivedown.charAt(6);
  675.             }
  676.         document.puzzle.eighteen11.value = eighteen11 = fivedown.charAt(7);
  677.         document.puzzle.eighteen12.value = eighteen12 = fivedown.charAt(8);
  678.     }
  679.  
  680.     if ((one7) && (one8) && (one9) && (one10) && (one11) && 
  681.         ((!sixdown) || (sixdown.length < 5))) {
  682.         sixdown = one7 + one8 + one9 + one10 + one11;
  683.         document.puzzle.sixdown.value = sixdown;
  684.     }
  685.     else if (sixdown) {
  686.         if ((one7) && (one7 != "?")) {
  687.             if (sixdown.charAt(0) != one7) {
  688.                 document.puzzle.one7.value = one7 = "?";
  689.             }
  690.         }
  691.         else {
  692.             document.puzzle.one7.value = one7 = sixdown.charAt(0);
  693.             }
  694.         document.puzzle.one8.value = one8 = sixdown.charAt(1);
  695.         document.puzzle.one9.value = one9 = sixdown.charAt(2);
  696.         document.puzzle.one10.value = one10 = sixdown.charAt(3);
  697.         document.puzzle.one11.value = one11 = sixdown.charAt(4);
  698.     }
  699.  
  700.     if ((ten9) && (ten10) && (ten11) && (ten12) && (ten13) && (ten14) && 
  701.         (ten15) && (ten16) && (ten17) && 
  702.         ((!sevendown) || (sevendown.length < 9))) {
  703.         sevendown = ten9 + ten10 + ten11 + ten12 + ten13 + ten14 + ten15 + ten16 + ten17;
  704.         document.puzzle.sevendown.value = sevendown;
  705.     }
  706.     else if (sevendown) {
  707.         document.puzzle.ten9.value = ten9 = sevendown.charAt(0);
  708.         if ((ten10) && (ten10 != "?")) {
  709.             if (sevendown.charAt(1) != ten10) {
  710.                 document.puzzle.ten10.value = ten10 = "?";
  711.             }
  712.         }
  713.         else {
  714.             document.puzzle.ten10.value = ten10 = sevendown.charAt(1);
  715.             }
  716.         document.puzzle.ten11.value = ten11 = sevendown.charAt(2);
  717.         if ((ten12) && (ten12 != "?")) {
  718.             if (sevendown.charAt(3) != ten12) {
  719.                 document.puzzle.ten12.value = ten12 = "?";
  720.             }
  721.         }
  722.         else {
  723.             document.puzzle.ten12.value = ten12 = sevendown.charAt(3);
  724.             }
  725.         document.puzzle.ten13.value = ten13 = sevendown.charAt(4);
  726.         if ((ten14) && (ten14 != "?")) {
  727.             if (sevendown.charAt(5) != ten14) {
  728.                 document.puzzle.ten14.value = ten14 = "?";
  729.             }
  730.         }
  731.         else {
  732.             document.puzzle.ten14.value = ten14 = sevendown.charAt(5);
  733.             }
  734.         document.puzzle.ten15.value = ten15 = sevendown.charAt(6);
  735.         if ((ten16) && (ten16 != "?")) {
  736.             if (sevendown.charAt(7) != ten16) {
  737.                 document.puzzle.ten16.value = ten16 = "?";
  738.             }
  739.         }
  740.         else {
  741.             document.puzzle.ten16.value = ten16 = sevendown.charAt(7);
  742.             }
  743.         document.puzzle.ten17.value = ten17 = sevendown.charAt(8);
  744.     }
  745.  
  746.     if ((twenty9) && (twenty10) && (twenty11) && (twenty12) && (twenty13) && 
  747.         ((!eightdown) || (eightdown.length < 5))) {
  748.         eightdown = twenty9 + twenty10 + twenty11 + twenty12 + twenty13;
  749.         document.puzzle.eightdown.value = eightdown;
  750.     }
  751.     else if (eightdown) {
  752.         document.puzzle.twenty9.value = twenty9 = eightdown.charAt(0);
  753.         if ((twenty10) && (twenty10 != "?")) {
  754.             if (eightdown.charAt(1) != twenty10) {
  755.                 document.puzzle.twenty10.value = twenty10 = "?";
  756.             }
  757.         }
  758.         else {
  759.             document.puzzle.twenty10.value = twenty10 = eightdown.charAt(1);
  760.             }
  761.         document.puzzle.twenty11.value = twenty11 = eightdown.charAt(2);
  762.         document.puzzle.twenty12.value = twenty12 = eightdown.charAt(3);
  763.         document.puzzle.twenty13.value = twenty13 = eightdown.charAt(4);
  764.     }
  765.  
  766.     if ((twentytwo9) && (twentytwo10) && (twentytwo11) && (twentytwo12) &&  
  767.         ((!ninedown) || (ninedown.length < 4))) {
  768.         ninedown = twentytwo9 + twentytwo10 + twentytwo11 + twentytwo12;
  769.         document.puzzle.ninedown.value = ninedown;
  770.     }
  771.     else if (ninedown) {
  772.         document.puzzle.twentytwo9.value = twentytwo9 = ninedown.charAt(0);
  773.         if ((twentytwo10) && (twentytwo10 != "?")) {
  774.             if (ninedown.charAt(1) != twentytwo10) {
  775.                 document.puzzle.twentytwo10.value = twentytwo10 = "?";
  776.             }
  777.         }
  778.         else {
  779.             document.puzzle.twentytwo10.value = twentytwo10 = ninedown.charAt(1);
  780.             }
  781.         document.puzzle.twentytwo11.value = twentytwo11 = ninedown.charAt(2);
  782.         document.puzzle.twentytwo12.value = twentytwo12 = ninedown.charAt(3);
  783.     }
  784.     if ((six16) && (six17) && (six18) && (six19) && (six20) && 
  785.         (six21) && (six22) && (six23) && (six24) && (six25) &&
  786.         ((!fifteendown) || (fifteendown.length < 10))) {
  787.         fifteendown = six16 + six17 + six18 + six19 + six20 + six21 + six22 + six23 + six24 + six25;
  788.         document.puzzle.fifteendown.value = fifteendown;
  789.     }
  790.     else if (fifteendown) {
  791.         if ((six16) && (six16 != "?")) {
  792.             if (fifteendown.charAt(0) != six16) {
  793.                 document.puzzle.six16.value = six16 = "?";
  794.             }
  795.         }
  796.         else {
  797.             document.puzzle.six16.value = six16 = threedown.charAt(0);
  798.             }
  799.         document.puzzle.six17.value = six17 = fifteendown.charAt(1);
  800.         document.puzzle.six18.value = six18 = fifteendown.charAt(2);
  801.         if ((six19) && (six19 != "?")) {
  802.             if (fifteendown.charAt(3) != six19) {
  803.                 document.puzzle.six19.value = six19 = "?";
  804.             }
  805.         }
  806.         else {
  807.             document.puzzle.six19.value = six19 = threedown.charAt(3);
  808.             }
  809.         document.puzzle.six20.value = six20 = fifteendown.charAt(4);
  810.         document.puzzle.six21.value = six21 = fifteendown.charAt(5);
  811.         document.puzzle.six22.value = six22 = fifteendown.charAt(6);
  812.         document.puzzle.six23.value = six23 = fifteendown.charAt(7);
  813.         document.puzzle.six24.value = six24 = fifteendown.charAt(8);
  814.         document.puzzle.six25.value = six25 = fifteendown.charAt(9);
  815.     }
  816.  
  817. }
  818.