1. <?xml version="1.0"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml"
  4. xml:lang="en"><head><meta name="author" content="Created with Hot Potatoes by Half-Baked Software, registered to ika."></meta><meta name="keywords" content="Hot Potatoes, Hot Potatoes, Half-Baked Software, Windows, University of Victoria"></meta>
  5. 
  6. <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
  7. <meta name="DC:Creator" content="ika" />
  8. <meta name="DC:Creator" content="yuli" />
  9. <meta name="DC:Title" content="Holiday-Fill in the blank" />
  10. 
  11. 
  12. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  13. 
  14. <title>
  15. Holiday-Fill in the blank
  16. </title>
  17. 
  18. <!-- Made with executable version 6.3 Release 0 Build 1 -->
  19. 
  20. <!-- The following insertion allows you to add your own code directly to this head tag from the configuration screen -->
  21. 
  22. 
  23. 
  24. <style type="text/css">
  25. 
  26. 
  27. /* This is the CSS stylesheet used in the exercise. */
  28. /* Elements in square brackets are replaced by data based on configuration settings when the exercise is built. */
  29. 
  30. /* BeginCorePageCSS */
  31. 
  32. /* Made with executable version 6.3 Release 0 Build 1 */
  33. 
  34. 
  35. /* Hack to hide a nested Quicktime player from IE, which can't handle it. */
  36. * html object.MediaPlayerNotForIE {
  37. display: none;
  38. }
  39. 
  40. body{
  41. font-family: Geneva,Arial,sans-serif;
  42. background-color: #008000;
  43. color: #000000;
  44. background-image: url(hghhkjlkmkgyedf.jpg);
  45. margin-right: 5%;
  46. margin-left: 5%;
  47. font-size: small;
  48. }
  49. 
  50. p{
  51. text-align: left;
  52. margin: 0px;
  53. font-size: 100%;
  54. }
  55. 
  56. table,div,span,td{
  57. font-size: 100%;
  58. color: #000000;
  59. }
  60. 
  61. div.Titles{
  62. padding: 0.5em;;
  63. text-align: center;
  64. color: #000000;
  65. }
  66. 
  67. button{
  68. font-family: Geneva,Arial,sans-serif;
  69. font-size: 100%;
  70. display: inline;
  71. }
  72. 
  73. .ExerciseTitle{
  74. font-size: 140%;
  75. color: #000000;
  76. }
  77. 
  78. .ExerciseSubtitle{
  79. font-size: 120%;
  80. color: #000000;
  81. }
  82. 
  83. div.StdDiv{
  84. background-color: #FFFFFF;
  85. text-align: center;
  86. font-size: 100%;
  87. color: #000000;
  88. padding: 0.5em;
  89. border-style: solid;
  90. border-width: 1px 1px 1px 1px;
  91. border-color: #000000;
  92. margin-bottom: 1px;
  93. }
  94. 
  95. /* EndCorePageCSS */
  96. 
  97. .RTLText{
  98. text-align: right;
  99. font-size: 150%;
  100. direction: rtl;
  101. font-family: "Simplified Arabic", "Traditional Arabic", "Times New Roman", Geneva,Arial,sans-serif;
  102. }
  103. 
  104. .CentredRTLText{
  105. text-align: center;
  106. font-size: 150%;
  107. direction: rtl;
  108. font-family: "Simplified Arabic", "Traditional Arabic", "Times New Roman", Geneva,Arial,sans-serif;
  109. }
  110. 
  111. button p.RTLText{
  112. text-align: center;
  113. }
  114. 
  115. .RTLGapBox{
  116. text-align: right;
  117. font-size: 150%;
  118. direction: rtl;
  119. font-family: "Times New Roman", Geneva,Arial,sans-serif;
  120. }
  121. 
  122. .Guess{
  123. font-weight: bold;
  124. }
  125. 
  126. .CorrectAnswer{
  127. font-weight: bold;
  128. }
  129. 
  130. div#Timer{
  131. padding: 0.25em;
  132. margin-left: auto;
  133. margin-right: auto;
  134. text-align: center;
  135. color: #000000;
  136. }
  137. 
  138. span#TimerText{
  139. padding: 0.25em;
  140. border-width: 1px;
  141. border-style: solid;
  142. font-weight: bold;
  143. display: none;
  144. color: #000000;
  145. }
  146. 
  147. span.Instructions{
  148. 
  149. }
  150. 
  151. div.ExerciseText{
  152. 
  153. }
  154. 
  155. .FeedbackText, .FeedbackText span.CorrectAnswer, .FeedbackText span.Guess, .FeedbackText span.Answer{
  156. color: #000000;
  157. }
  158. 
  159. .LeftItem{
  160. font-size: 100%;
  161. color: #000000;
  162. text-align: left;
  163. }
  164. 
  165. .RightItem{
  166. font-weight: bold;
  167. font-size: 100%;
  168. color: #000000;
  169. }
  170. 
  171. span.CorrectMark{
  172. 
  173. }
  174. 
  175. input, textarea{
  176. font-family: Geneva,Arial,sans-serif;
  177. font-size: 120%;
  178. }
  179. 
  180. select{
  181. font-size: 100%;
  182. }
  183. 
  184. div.Feedback {
  185. background-color: #008000;
  186. left: 33%;
  187. width: 34%;
  188. top: 33%;
  189. z-index: 1;
  190. border-style: solid;
  191. border-width: 1px;
  192. padding: 5px;
  193. text-align: center;
  194. color: #000000;
  195. position: absolute;
  196. display: none;
  197. font-size: 100%;
  198. }
  199. 
  200. 
  201. 
  202. 
  203. div.ExerciseDiv{
  204. color: #000000;
  205. }
  206. 
  207. /* JMatch flashcard styles */
  208. table.FlashcardTable{
  209. background-color: transparent;
  210. color: #000000;
  211. border-color: #000000;
  212. margin-left: 5%;
  213. margin-right: 5%;
  214. margin-top: 2em;
  215. margin-bottom: 2em;
  216. width: 90%;
  217. position: relative;
  218. text-align: center;
  219. padding: 0px;
  220. }
  221. 
  222. table.FlashcardTable tr{
  223. border-style: none;
  224. margin: 0px;
  225. padding: 0px;
  226. background-color: #FFFFFF;
  227. }
  228. 
  229. table.FlashcardTable td.Showing{
  230. font-size: 140%;
  231. text-align: center;
  232. width: 50%;
  233. display: table-cell;
  234. padding: 2em;
  235. margin: 0px;
  236. border-style: solid;
  237. border-width: 1px;
  238. color: #000000;
  239. background-color: #FFFFFF;
  240. }
  241. 
  242. table.FlashcardTable td.Hidden{
  243. display: none;
  244. }
  245. 
  246. /* JMix styles */
  247. div#SegmentDiv{
  248. margin-top: 2em;
  249. margin-bottom: 2em;
  250. text-align: center;
  251. }
  252. 
  253. a.ExSegment{
  254. font-size: 120%;
  255. font-weight: bold;
  256. text-decoration: none;
  257. color: #000000;
  258. }
  259. 
  260. span.RemainingWordList{
  261. font-style: italic;
  262. }
  263. 
  264. div.DropLine {
  265. position: absolute;
  266. text-align: center;
  267. border-bottom-style: solid;
  268. border-bottom-width: 1px;
  269. border-bottom-color: #000000;
  270. width: 80%;
  271. }
  272. 
  273. /* JCloze styles */
  274. 
  275. .ClozeWordList{
  276. text-align: center;
  277. font-weight: bold;
  278. }
  279. 
  280. div.ClozeBody{
  281. text-align: left;
  282. margin-top: 2em;
  283. margin-bottom: 2em;
  284. line-height: 2.0
  285. }
  286. 
  287. span.GapSpan{
  288. font-weight: bold;
  289. }
  290. 
  291. /* JCross styles */
  292. 
  293. table.CrosswordGrid{
  294. margin: auto auto 1em auto;
  295. border-collapse: collapse;
  296. padding: 0px;
  297. background-color: #000000;
  298. }
  299. 
  300. table.CrosswordGrid tbody tr td{
  301. width: 1.5em;
  302. height: 1.5em;
  303. text-align: center;
  304. vertical-align: middle;
  305. font-size: 140%;
  306. padding: 1px;
  307. margin: 0px;
  308. border-style: solid;
  309. border-width: 1px;
  310. border-color: #000000;
  311. color: #000000;
  312. }
  313. 
  314. table.CrosswordGrid span{
  315. color: #000000;
  316. }
  317. 
  318. table.CrosswordGrid td.BlankCell{
  319. background-color: #000000;
  320. color: #000000;
  321. }
  322. 
  323. table.CrosswordGrid td.LetterOnlyCell{
  324. text-align: center;
  325. vertical-align: middle;
  326. background-color: #ffffff;
  327. color: #000000;
  328. font-weight: bold;
  329. }
  330. 
  331. table.CrosswordGrid td.NumLetterCell{
  332. text-align: left;
  333. vertical-align: top;
  334. background-color: #ffffff;
  335. color: #000000;
  336. padding: 1px;
  337. font-weight: bold;
  338. }
  339. 
  340. .NumLetterCellText{
  341. cursor: pointer;
  342. color: #000000;
  343. }
  344. 
  345. .GridNum{
  346. vertical-align: super;
  347. font-size: 66%;
  348. font-weight: bold;
  349. text-decoration: none;
  350. color: #000000;
  351. }
  352. 
  353. .GridNum:hover, .GridNum:visited{
  354. color: #000000;
  355. }
  356. 
  357. table#Clues{
  358. margin: auto;
  359. vertical-align: top;
  360. }
  361. 
  362. table#Clues td{
  363. vertical-align: top;
  364. }
  365. 
  366. table.ClueList{
  367. margin: auto;
  368. }
  369. 
  370. td.ClueNum{
  371. text-align: right;
  372. font-weight: bold;
  373. vertical-align: top;
  374. }
  375. 
  376. td.Clue{
  377. text-align: left;
  378. }
  379. 
  380. div#ClueEntry{
  381. text-align: left;
  382. margin-bottom: 1em;
  383. }
  384. 
  385. /* Keypad styles */
  386. 
  387. div.Keypad{
  388. text-align: center;
  389. display: none; /* initially hidden, shown if needed */
  390. margin-bottom: 0.5em;
  391. }
  392. 
  393. div.Keypad button{
  394. font-family: Geneva,Arial,sans-serif;
  395. font-size: 120%;
  396. background-color: #ffffff;
  397. color: #000000;
  398. width: 2em;
  399. }
  400. 
  401. /* JQuiz styles */
  402. 
  403. div.QuestionNavigation{
  404. text-align: center;
  405. }
  406. 
  407. .QNum{
  408. margin: 0em 1em 0.5em 1em;
  409. font-weight: bold;
  410. vertical-align: middle;
  411. }
  412. 
  413. textarea{
  414. font-family: Geneva,Arial,sans-serif;
  415. }
  416. 
  417. .QuestionText{
  418. text-align: left;
  419. margin: 0px;
  420. font-size: 100%;
  421. }
  422. 
  423. .Answer{
  424. font-size: 120%;
  425. letter-spacing: 0.1em;
  426. }
  427. 
  428. .PartialAnswer{
  429. font-size: 120%;
  430. letter-spacing: 0.1em;
  431. color: #000000;
  432. }
  433. 
  434. .Highlight{
  435. color: #000000;
  436. background-color: #ffff00;
  437. font-weight: bold;
  438. font-size: 120%;
  439. }
  440. 
  441. ol.QuizQuestions{
  442. text-align: left;
  443. list-style-type: none;
  444. }
  445. 
  446. li.QuizQuestion{
  447. padding: 1em;
  448. border-style: solid;
  449. border-width: 0px 0px 1px 0px;
  450. }
  451. 
  452. ol.MCAnswers{
  453. text-align: left;
  454. list-style-type: upper-alpha;
  455. padding: 1em;
  456. }
  457. 
  458. ol.MCAnswers li{
  459. margin-bottom: 1em;
  460. }
  461. 
  462. ol.MSelAnswers{
  463. text-align: left;
  464. list-style-type: lower-alpha;
  465. padding: 1em;
  466. }
  467. 
  468. div.ShortAnswer{
  469. padding: 1em;
  470. }
  471. 
  472. .FuncButton {
  473. text-align: center;
  474. border-style: solid;
  475. 
  476. border-left-color: #ffffff;
  477. border-top-color: #ffffff;
  478. border-right-color: #7f7f7f;
  479. border-bottom-color: #7f7f7f;
  480. color: #000000;
  481. background-color: #FFFFFF;
  482. 
  483. border-width: 2px;
  484. padding: 3px 6px 3px 6px;
  485. cursor: pointer;
  486. }
  487. 
  488. .FuncButtonUp {
  489. color: #FFFFFF;
  490. text-align: center;
  491. border-style: solid;
  492. 
  493. border-left-color: #ffffff;
  494. border-top-color: #ffffff;
  495. border-right-color: #7f7f7f;
  496. border-bottom-color: #7f7f7f;
  497. 
  498. background-color: #000000;
  499. color: #FFFFFF;
  500. border-width: 2px;
  501. padding: 3px 6px 3px 6px;
  502. cursor: pointer;
  503. }
  504. 
  505. .FuncButtonDown {
  506. color: #FFFFFF;
  507. text-align: center;
  508. border-style: solid;
  509. 
  510. border-left-color: #7f7f7f;
  511. border-top-color: #7f7f7f;
  512. border-right-color: #ffffff;
  513. border-bottom-color: #ffffff;
  514. background-color: #000000;
  515. color: #FFFFFF;
  516. 
  517. border-width: 2px;
  518. padding: 3px 6px 3px 6px;
  519. cursor: pointer;
  520. }
  521. 
  522. /*BeginNavBarStyle*/
  523. 
  524. div.NavButtonBar{
  525. background-color: #80ff00;
  526. text-align: center;
  527. margin: 2px 0px 2px 0px;
  528. clear: both;
  529. font-size: 100%;
  530. }
  531. 
  532. .NavButton {
  533. border-style: solid;
  534. border-left-color: #bfff7f;
  535. border-top-color: #bfff7f;
  536. border-right-color: #407f00;
  537. border-bottom-color: #407f00;
  538. background-color: #80ff00;
  539. color: #000000;
  540. 
  541. border-width: 2px;
  542. cursor: pointer;
  543. }
  544. 
  545. .NavButtonUp {
  546. border-style: solid;
  547. 
  548. border-left-color: #bfff7f;
  549. border-top-color: #bfff7f;
  550. border-right-color: #407f00;
  551. border-bottom-color: #407f00;
  552. color: #80ff00;
  553. background-color: #000000;
  554. 
  555. border-width: 2px;
  556. cursor: pointer;
  557. }
  558. 
  559. .NavButtonDown {
  560. border-style: solid;
  561. 
  562. border-left-color: #407f00;
  563. border-top-color: #407f00;
  564. border-right-color: #bfff7f;
  565. border-bottom-color: #bfff7f;
  566. color: #80ff00;
  567. background-color: #000000;
  568. 
  569. border-width: 2px;
  570. cursor: pointer;
  571. }
  572. 
  573. /*EndNavBarStyle*/
  574. 
  575. a{
  576. color: #0000FF;
  577. }
  578. 
  579. a:visited{
  580. color: #0000CC;
  581. }
  582. 
  583. a:hover{
  584. color: #0000FF;
  585. }
  586. 
  587. div.CardStyle {
  588. position: absolute;
  589. font-family: Geneva,Arial,sans-serif;
  590. font-size: 100%;
  591. padding: 5px;
  592. border-style: solid;
  593. border-width: 1px;
  594. color: #000000;
  595. background-color: #FFFFFF;
  596. left: -50px;
  597. top: -50px;
  598. overflow: visible;
  599. }
  600. 
  601. .rtl{
  602. text-align: right;
  603. font-size: 140%;
  604. }
  605. 
  606. 
  607. </style>
  608. 
  609. <script type="text/javascript">
  610. 
  611. //<![CDATA[
  612. 
  613. <!--
  614. 
  615. 
  616. 
  617. 
  618. function Client(){
  619. //if not a DOM browser, hopeless
  620. this.min = false; if (document.getElementById){this.min = true;};
  621. 
  622. this.ua = navigator.userAgent;
  623. this.name = navigator.appName;
  624. this.ver = navigator.appVersion;
  625. 
  626. //Get data about the browser
  627. this.mac = (this.ver.indexOf('Mac') != -1);
  628. this.win = (this.ver.indexOf('Windows') != -1);
  629. 
  630. //Look for Gecko
  631. this.gecko = (this.ua.indexOf('Gecko') > 1);
  632. if (this.gecko){
  633. this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf('Gecko')+6, this.ua.length));
  634. if (this.geckoVer < 20020000){this.min = false;}
  635. }
  636. //Look for Firebird
  637. this.firebird = (this.ua.indexOf('Firebird') > 1);
  638. //Look for Safari
  639. this.safari = (this.ua.indexOf('Safari') > 1);
  640. if (this.safari){
  641. this.gecko = false;
  642. }
  643. //Look for IE
  644. this.ie = (this.ua.indexOf('MSIE') > 0);
  645. if (this.ie){
  646. this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf('MSIE')+5, this.ua.length));
  647. if (this.ieVer < 5.5){this.min = false;}
  648. }
  649. //Look for Opera
  650. this.opera = (this.ua.indexOf('Opera') > 0);
  651. if (this.opera){
  652. this.operaVer = parseFloat(this.ua.substring(this.ua.indexOf('Opera')+6, this.ua.length));
  653. if (this.operaVer < 7.04){this.min = false;}
  654. }
  655. if (this.min == false){
  656. alert('Your browser may not be able to handle this page.');
  657. }
  658. //Special case for the horrible ie5mac
  659. this.ie5mac = (this.ie&&this.mac&&(this.ieVer<6));
  660. }
  661. 
  662. var C = new Client();
  663. 
  664. //for (prop in C){
  665. // alert(prop + ': ' + C[prop]);
  666. //}
  667. 
  668. 
  669. 
  670. //CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS
  671. 
  672. //[strNavBarJS]
  673. function NavBtnOver(Btn){
  674. if (Btn.className != 'NavButtonDown'){Btn.className = 'NavButtonUp';}
  675. }
  676. 
  677. function NavBtnOut(Btn){
  678. Btn.className = 'NavButton';
  679. }
  680. 
  681. function NavBtnDown(Btn){
  682. Btn.className = 'NavButtonDown';
  683. }
  684. //[/strNavBarJS]
  685. 
  686. function FuncBtnOver(Btn){
  687. if (Btn.className != 'FuncButtonDown'){Btn.className = 'FuncButtonUp';}
  688. }
  689. 
  690. function FuncBtnOut(Btn){
  691. Btn.className = 'FuncButton';
  692. }
  693. 
  694. function FuncBtnDown(Btn){
  695. Btn.className = 'FuncButtonDown';
  696. }
  697. 
  698. function FocusAButton(){
  699. if (document.getElementById('CheckButton1') != null){
  700. document.getElementById('CheckButton1').focus();
  701. }
  702. else{
  703. if (document.getElementById('CheckButton2') != null){
  704. document.getElementById('CheckButton2').focus();
  705. }
  706. else{
  707. document.getElementsByTagName('button')[0].focus();
  708. }
  709. }
  710. }
  711. 
  712. 
  713. 
  714. 
  715. //CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX
  716. 
  717. var topZ = 1000;
  718. 
  719. function ShowMessage(Feedback){
  720. var Output = Feedback + '<br /><br />';
  721. document.getElementById('FeedbackContent').innerHTML = Output;
  722. var FDiv = document.getElementById('FeedbackDiv');
  723. topZ++;
  724. FDiv.style.zIndex = topZ;
  725. FDiv.style.top = TopSettingWithScrollOffset(30) + 'px';
  726. 
  727. FDiv.style.display = 'block';
  728. 
  729. ShowElements(false, 'input');
  730. ShowElements(false, 'select');
  731. ShowElements(false, 'object');
  732. ShowElements(true, 'object', 'FeedbackContent');
  733. 
  734. //Focus the OK button
  735. setTimeout("document.getElementById('FeedbackOKButton').focus()", 50);
  736. //
  737. }
  738. 
  739. function ShowElements(Show, TagName, ContainerToReverse){
  740. // added third argument to allow objects in the feedback box to appear
  741. //IE bug -- hide all the form elements that will show through the popup
  742. //FF on Mac bug : doesn't redisplay objects whose visibility is set to visible
  743. //unless the object's display property is changed
  744. 
  745. //get container object (by Id passed in, or use document otherwise)
  746. TopNode = document.getElementById(ContainerToReverse);
  747. var Els;
  748. if (TopNode != null) {
  749. Els = TopNode.getElementsByTagName(TagName);
  750. } else {
  751. Els = document.getElementsByTagName(TagName);
  752. }
  753. 
  754. for (var i=0; i<Els.length; i++){
  755. if (TagName == "object") {
  756. //manipulate object elements in all browsers
  757. if (Show == true){
  758. Els[i].style.visibility = 'visible';
  759. //get Mac FireFox to manipulate display, to force screen redraw
  760. if (C.mac && C.gecko) {Els[i].style.display = '';}
  761. }
  762. else{
  763. Els[i].style.visibility = 'hidden';
  764. if (C.mac && C.gecko) {Els[i].style.display = 'none';}
  765. }
  766. }
  767. else {
  768. // tagName is either input or select (that is, Form Elements)
  769. // ie6 has a problem with Form elements, so manipulate those
  770. if (C.ie) {
  771. if (C.ieVer < 7) {
  772. if (Show == true){
  773. Els[i].style.visibility = 'visible';
  774. }
  775. else{
  776. Els[i].style.visibility = 'hidden';
  777. }
  778. }
  779. }
  780. }
  781. }
  782. }
  783. 
  784. 
  785. 
  786. function HideFeedback(){
  787. document.getElementById('FeedbackDiv').style.display = 'none';
  788. ShowElements(true, 'input');
  789. ShowElements(true, 'select');
  790. ShowElements(true, 'object');
  791. if (Finished == true){
  792. Finish();
  793. }
  794. }
  795. 
  796. 
  797. //GENERAL UTILITY FUNCTIONS AND VARIABLES
  798. 
  799. //PAGE DIMENSION FUNCTIONS
  800. function PageDim(){
  801. //Get the page width and height
  802. this.W = 600;
  803. this.H = 400;
  804. this.W = document.getElementsByTagName('body')[0].clientWidth;
  805. this.H = document.getElementsByTagName('body')[0].clientHeight;
  806. }
  807. 
  808. var pg = null;
  809. 
  810. function GetPageXY(El) {
  811. var XY = {x: 0, y: 0};
  812. while(El){
  813. XY.x += El.offsetLeft;
  814. XY.y += El.offsetTop;
  815. El = El.offsetParent;
  816. }
  817. return XY;
  818. }
  819. 
  820. function GetScrollTop(){
  821. if (typeof(window.pageYOffset) == 'number'){
  822. return window.pageYOffset;
  823. }
  824. else{
  825. if ((document.body)&&(document.body.scrollTop)){
  826. return document.body.scrollTop;
  827. }
  828. else{
  829. if ((document.documentElement)&&(document.documentElement.scrollTop)){
  830. return document.documentElement.scrollTop;
  831. }
  832. else{
  833. return 0;
  834. }
  835. }
  836. }
  837. }
  838. 
  839. function GetViewportHeight(){
  840. if (typeof window.innerHeight != 'undefined'){
  841. return window.innerHeight;
  842. }
  843. else{
  844. if (((typeof document.documentElement != 'undefined')&&(typeof document.documentElement.clientHeight !=
  845. 'undefined'))&&(document.documentElement.clientHeight != 0)){
  846. return document.documentElement.clientHeight;
  847. }
  848. else{
  849. return document.getElementsByTagName('body')[0].clientHeight;
  850. }
  851. }
  852. }
  853. 
  854. function TopSettingWithScrollOffset(TopPercent){
  855. var T = Math.floor(GetViewportHeight() * (TopPercent/100));
  856. return GetScrollTop() + T;
  857. }
  858. 
  859. //CODE FOR AVOIDING LOSS OF DATA WHEN BACKSPACE KEY INVOKES history.back()
  860. var InTextBox = false;
  861. 
  862. function SuppressBackspace(e){
  863. if (InTextBox == true){return;}
  864. if (C.ie) {
  865. thisKey = window.event.keyCode;
  866. }
  867. else {
  868. thisKey = e.keyCode;
  869. }
  870. 
  871. var Suppress = false;
  872. 
  873. if (thisKey == 8) {
  874. Suppress = true;
  875. }
  876. 
  877. if (Suppress == true){
  878. if (C.ie){
  879. window.event.returnValue = false;
  880. window.event.cancelBubble = true;
  881. }
  882. else{
  883. e.preventDefault();
  884. }
  885. }
  886. }
  887. 
  888. if (C.ie){
  889. document.attachEvent('onkeydown',SuppressBackspace);
  890. window.attachEvent('onkeydown',SuppressBackspace);
  891. }
  892. else{
  893. if (window.addEventListener){
  894. window.addEventListener('keypress',SuppressBackspace,false);
  895. }
  896. }
  897. 
  898. function ReduceItems(InArray, ReduceToSize){
  899. var ItemToDump=0;
  900. var j=0;
  901. while (InArray.length > ReduceToSize){
  902. ItemToDump = Math.floor(InArray.length*Math.random());
  903. InArray.splice(ItemToDump, 1);
  904. }
  905. }
  906. 
  907. function Shuffle(InArray){
  908. var Num;
  909. var Temp = new Array();
  910. var Len = InArray.length;
  911. 
  912. var j = Len;
  913. 
  914. for (var i=0; i<Len; i++){
  915. Temp[i] = InArray[i];
  916. }
  917. 
  918. for (i=0; i<Len; i++){
  919. Num = Math.floor(j * Math.random());
  920. InArray[i] = Temp[Num];
  921. 
  922. for (var k=Num; k < (j-1); k++) {
  923. Temp[k] = Temp[k+1];
  924. }
  925. j--;
  926. }
  927. return InArray;
  928. }
  929. 
  930. function WriteToInstructions(Feedback) {
  931. document.getElementById('InstructionsDiv').innerHTML = Feedback;
  932. 
  933. }
  934. 
  935. 
  936. 
  937. 
  938. function EscapeDoubleQuotes(InString){
  939. return InString.replace(/"/g, '&quot;')
  940. }
  941. 
  942. function TrimString(InString){
  943. var x = 0;
  944. 
  945. if (InString.length != 0) {
  946. while ((InString.charAt(InString.length - 1) == '\u0020') || (InString.charAt(InString.length - 1) == '\u000A') || (InString.charAt(InString.length - 1) == '\u000D')){
  947. InString = InString.substring(0, InString.length - 1)
  948. }
  949. 
  950. while ((InString.charAt(0) == '\u0020') || (InString.charAt(0) == '\u000A') || (InString.charAt(0) == '\u000D')){
  951. InString = InString.substring(1, InString.length)
  952. }
  953. 
  954. while (InString.indexOf(' ') != -1) {
  955. x = InString.indexOf(' ')
  956. InString = InString.substring(0, x) + InString.substring(x+1, InString.length)
  957. }
  958. 
  959. return InString;
  960. }
  961. 
  962. else {
  963. return '';
  964. }
  965. }
  966. 
  967. function FindLongest(InArray){
  968. if (InArray.length < 1){return -1;}
  969. 
  970. var Longest = 0;
  971. for (var i=1; i<InArray.length; i++){
  972. if (InArray[i].length > InArray[Longest].length){
  973. Longest = i;
  974. }
  975. }
  976. return Longest;
  977. }
  978. 
  979. //UNICODE CHARACTER FUNCTIONS
  980. function IsCombiningDiacritic(CharNum){
  981. var Result = (((CharNum >= 0x0300)&&(CharNum <= 0x370))||((CharNum >= 0x20d0)&&(CharNum <= 0x20ff)));
  982. Result = Result || (((CharNum >= 0x3099)&&(CharNum <= 0x309a))||((CharNum >= 0xfe20)&&(CharNum <= 0xfe23)));
  983. return Result;
  984. }
  985. 
  986. function IsCJK(CharNum){
  987. return ((CharNum >= 0x3000)&&(CharNum < 0xd800));
  988. }
  989. 
  990. //SETUP FUNCTIONS
  991. //BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED
  992. function ClearTextBoxes(){
  993. var NList = document.getElementsByTagName('input');
  994. for (var i=0; i<NList.length; i++){
  995. if ((NList[i].id.indexOf('Guess') > -1)||(NList[i].id.indexOf('Gap') > -1)){
  996. NList[i].value = '';
  997. }
  998. if (NList[i].id.indexOf('Chk') > -1){
  999. NList[i].checked = '';
  1000. }
  1001. }
  1002. }
  1003. 
  1004. //EXTENSION TO ARRAY OBJECT
  1005. function Array_IndexOf(Input){
  1006. var Result = -1;
  1007. for (var i=0; i<this.length; i++){
  1008. if (this[i] == Input){
  1009. Result = i;
  1010. }
  1011. }
  1012. return Result;
  1013. }
  1014. Array.prototype.indexOf = Array_IndexOf;
  1015. 
  1016. //IE HAS RENDERING BUG WITH BOTTOM NAVBAR
  1017. function RemoveBottomNavBarForIE(){
  1018. if ((C.ie)&&(document.getElementById('Reading') != null)){
  1019. if (document.getElementById('BottomNavBar') != null){
  1020. document.getElementById('TheBody').removeChild(document.getElementById('BottomNavBar'));
  1021. }
  1022. }
  1023. }
  1024. 
  1025. 
  1026. 
  1027. 
  1028. //HOTPOTNET-RELATED CODE
  1029. 
  1030. var HPNStartTime = (new Date()).getTime();
  1031. var SubmissionTimeout = 30000;
  1032. var Detail = ''; //Global that is used to submit tracking data
  1033. 
  1034. function Finish(){
  1035. //If there's a form, fill it out and submit it
  1036. if (document.store != null){
  1037. Frm = document.store;
  1038. Frm.starttime.value = HPNStartTime;
  1039. Frm.endtime.value = (new Date()).getTime();
  1040. Frm.mark.value = Score;
  1041. Frm.detail.value = Detail;
  1042. Frm.submit();
  1043. }
  1044. }
  1045. 
  1046. 
  1047. 
  1048. 
  1049. 
  1050. //JCLOZE CORE JAVASCRIPT CODE
  1051. 
  1052. function ItemState(){
  1053. this.ClueGiven = false;
  1054. this.HintsAndChecks = 0;
  1055. this.MatchedAnswerLength = 0;
  1056. this.ItemScore = 0;
  1057. this.AnsweredCorrectly = false;
  1058. this.Guesses = new Array();
  1059. return this;
  1060. }
  1061. 
  1062. var Feedback = '';
  1063. var Correct = 'Correct! Well done.';
  1064. var Incorrect = 'Some of your answers are incorrect. Incorrect answers have been left in place for you to change.';
  1065. var GiveHint = 'The next correct letter has been added to the answer.';
  1066. var CaseSensitive = false;
  1067. var YourScoreIs = 'Your score is ';
  1068. var Finished = false;
  1069. var Locked = false;
  1070. var Score = 0;
  1071. var CurrentWord = 0;
  1072. var Guesses = '';
  1073. var TimeOver = false;
  1074. 
  1075. I = new Array();
  1076. 
  1077. I[0] = new Array();
  1078. I[0][1] = new Array();
  1079. I[0][1][0] = new Array();
  1080. I[0][1][0][0] = '\u0066\u006F\u0072\u0065\u0069\u0067\u006E\u0020\u0074\u006F\u0075\u0072\u0069\u0073\u0074\u0073';
  1081. I[0][1][1] = new Array();
  1082. I[0][1][1][0]='\u0066\u006F\u0072\u0065\u0069\u0067\u006E\u0020\u0074\u006F\u0075\u0072\u0069\u0073\u0074';
  1083. I[0][2]='\u0061\u006E\u0074\u006F\u006E\u0079\u006D\u0020\u006F\u0066\u0020\u0064\u006F\u006D\u0065\u0073\u0074\u0069\u0063\u0020\u0074\u006F\u0075\u0072\u0069\u0073\u0074\u0073';
  1084. 
  1085. I[1] = new Array();
  1086. I[1][1] = new Array();
  1087. I[1][1][0] = new Array();
  1088. I[1][1][0][0] = '\u0070\u006F\u0070\u0075\u006C\u0061\u0072';
  1089. I[1][1][1] = new Array();
  1090. I[1][1][1][0]='\u0077\u0065\u006C\u006C\u0020\u006B\u006E\u006F\u0077\u006E';
  1091. I[1][2]='\u0074\u0068\u0065\u0020\u0073\u0079\u006E\u006F\u006E\u0079\u006D\u0020\u006F\u0066\u0020\u0066\u0061\u006D\u006F\u0075\u0073';
  1092. 
  1093. I[2] = new Array();
  1094. I[2][1] = new Array();
  1095. I[2][1][0] = new Array();
  1096. I[2][1][0][0] = '\u004B\u0065\u0063\u0061\u006B\u0020\u0044\u0061\u006E\u0063\u0065';
  1097. I[2][1][1] = new Array();
  1098. I[2][1][1][0]='\u004A\u0061\u006E\u0067\u0067\u0065\u0072\u0020\u0064\u0061\u006E\u0063\u0065';
  1099. I[2][2]='\u0074\u0068\u0065\u0020\u0074\u0072\u0061\u0064\u0069\u0074\u0069\u006F\u006E\u0061\u006C\u0020\u0064\u0061\u006E\u0063\u0065\u0020\u0066\u0072\u006F\u006D\u0020\u0042\u0061\u006C\u0069';
  1100. 
  1101. I[3] = new Array();
  1102. I[3][1] = new Array();
  1103. I[3][1][0] = new Array();
  1104. I[3][1][0][0] = '\u0053\u0061\u006E\u0075\u0072\u0020\u0061\u006E\u0064\u0020\u004B\u0075\u0074\u0061';
  1105. I[3][1][1] = new Array();
  1106. I[3][1][1][0]='\u0053\u0061\u006E\u0075\u0072\u0020\u0062\u0065\u0061\u0063\u0068';
  1107. I[3][1][2] = new Array();
  1108. I[3][1][2][0]='\u004B\u0075\u0074\u0061\u0020\u0062\u0065\u0061\u0063\u0068';
  1109. I[3][1][3] = new Array();
  1110. I[3][1][3][0]='\u0053\u0061\u006E\u0075\u0072\u0020\u0062\u0065\u0061\u0063\u0068\u0020\u0061\u006E\u0064\u0020\u004B\u0075\u0074\u0061\u0020\u0062\u0065\u0061\u0063\u0068';
  1111. I[3][2]='\u0074\u0068\u0065\u0020\u006E\u0061\u006D\u0065\u0020\u006F\u0066\u0020\u0062\u0065\u0061\u0063\u0068\u0065\u0073\u0020\u0069\u006E\u0020\u0042\u0061\u006C\u0069';
  1112. 
  1113. I[4] = new Array();
  1114. I[4][1] = new Array();
  1115. I[4][1][0] = new Array();
  1116. I[4][1][0][0] = '\u0042\u006F\u0072\u006F\u0062\u0075\u0064\u0075\u0072';
  1117. I[4][1][1] = new Array();
  1118. I[4][1][1][0]='\u0050\u0072\u0061\u006D\u0062\u0061\u006E\u0061\u006E';
  1119. I[4][2]='\u0074\u0068\u0065\u0020\u006E\u0061\u006D\u0065\u0020\u006F\u0066\u0020\u0074\u0068\u0065\u0020\u0074\u0065\u006D\u0070\u006C\u0065\u0020\u0069\u006E\u0020\u0059\u006F\u0067\u0079\u0061\u006B\u0061\u0072\u0074\u0061';
  1120. 
  1121. I[5] = new Array();
  1122. I[5][1] = new Array();
  1123. I[5][1][0] = new Array();
  1124. I[5][1][0][0] = '\u0062\u0065\u0061\u0075\u0074\u0069\u0066\u0075\u006C';
  1125. I[5][1][1] = new Array();
  1126. I[5][1][1][0]='\u0070\u0072\u0065\u0074\u0074\u0079';
  1127. I[5][1][2] = new Array();
  1128. I[5][1][2][0]='\u0067\u006F\u006F\u0064';
  1129. I[5][2]='\u0074\u0068\u0065\u0020\u0073\u0079\u006E\u006F\u006E\u0079\u006D\u0020\u006F\u0066\u0020\u0069\u006E\u0074\u0065\u0072\u0065\u0073\u0074\u0069\u006E\u0067';
  1130. 
  1131. I[6] = new Array();
  1132. I[6][1] = new Array();
  1133. I[6][1][0] = new Array();
  1134. I[6][1][0][0] = '\u004B\u0061\u0073\u006F\u0064\u006F';
  1135. I[6][1][1] = new Array();
  1136. I[6][1][1][0]='\u004B\u0061\u0073\u006F\u006E\u0067\u006F';
  1137. I[6][2]='\u0074\u0068\u0065\u0020\u006E\u0061\u006D\u0065\u0020\u006F\u0066\u0020\u0063\u0065\u0072\u0065\u006D\u006F\u006E\u0079\u0020\u0069\u006E\u0020\u0042\u0072\u006F\u006D\u006F';
  1138. 
  1139. I[7] = new Array();
  1140. I[7][1] = new Array();
  1141. I[7][1][0] = new Array();
  1142. I[7][1][0][0] = '\u0066\u0072\u0069\u0065\u006E\u0064\u006C\u0079';
  1143. I[7][1][1] = new Array();
  1144. I[7][1][1][0]='\u0073\u0069\u006D\u0070\u006C\u0079';
  1145. I[7][2]='\u0074\u0068\u0065\u0020\u0073\u0079\u006E\u006F\u006E\u0079\u006D\u0020\u006F\u0066\u0020\u006B\u0069\u006E\u0064\u006C\u0079';
  1146. 
  1147. 
  1148. State = new Array();
  1149. 
  1150. function StartUp(){
  1151. RemoveBottomNavBarForIE();
  1152. //Show a keypad if there is one (added bugfix for 6.0.4.12)
  1153. if (document.getElementById('CharacterKeypad') != null){
  1154. document.getElementById('CharacterKeypad').style.display = 'block';
  1155. }
  1156. 
  1157. 
  1158. 
  1159. 
  1160. 
  1161. 
  1162. var i = 0;
  1163. 
  1164. State.length = 0;
  1165. for (i=0; i<I.length; i++){
  1166. State[i] = new ItemState();
  1167. }
  1168. ClearTextBoxes();
  1169. 
  1170. StartTimer();
  1171. 
  1172. 
  1173. }
  1174. 
  1175. function ShowClue(ItemNum){
  1176. if (Locked == true){return;}
  1177. State[ItemNum].ClueGiven = true;
  1178. ShowMessage(I[ItemNum][2]);
  1179. }
  1180. 
  1181. function SaveCurrentAnswers(){
  1182. var Ans = '';
  1183. for (var i=0; i<I.length; i++){
  1184. Ans = GetGapValue(i);
  1185. if ((Ans.length > 0)&&(Ans != State[i].Guesses[State[i].Guesses.length-1])){
  1186. State[i].Guesses[State[i].Guesses.length] = Ans;
  1187. }
  1188. }
  1189. }
  1190. 
  1191. function CompileGuesses(){
  1192. var F = document.getElementById('store');
  1193. if (F != null){
  1194. var Temp = '<?xml version="1.0"?><hpnetresult><fields>';
  1195. var GapLabel = '';
  1196. for (var i=0; i<State.length; i++){
  1197. GapLabel = 'Gap ' + (i+1).toString();
  1198. Temp += '<field><fieldname>' + GapLabel + '</fieldname>';
  1199. Temp += '<fieldtype>student-responses</fieldtype><fieldlabel>' + GapLabel + '</fieldlabel>';
  1200. Temp += '<fieldlabelid>JClozeStudentResponses</fieldlabelid><fielddata>';
  1201. for (var j=0; j<State[i].Guesses.length; j++){
  1202. if (j>0){Temp += '| ';}
  1203. Temp += State[i].Guesses[j] + ' ';
  1204. }
  1205. Temp += '</fielddata></field>';
  1206. }
  1207. Temp += '</fields></hpnetresult>';
  1208. Detail = Temp;
  1209. }
  1210. }
  1211. 
  1212. function CheckAnswers(){
  1213. if (Locked == true){return;}
  1214. SaveCurrentAnswers();
  1215. var AllCorrect = true;
  1216. 
  1217. //Check each answer
  1218. for (var i = 0; i<I.length; i++){
  1219. 
  1220. if (State[i].AnsweredCorrectly == false){
  1221. //If it's right, calculate its score
  1222. if (CheckAnswer(i, true) > -1){
  1223. var TotalChars = GetGapValue(i).length;
  1224. State[i].ItemScore = (TotalChars-State[i].HintsAndChecks)/TotalChars;
  1225. if (State[i].ClueGiven == true){State[i].ItemScore /= 2;}
  1226. if (State[i].ItemScore <0 ){State[i].ItemScore = 0;}
  1227. State[i].AnsweredCorrectly = true;
  1228. //Drop the correct answer into the page, replacing the text box
  1229. SetCorrectAnswer(i, GetGapValue(i));
  1230. }
  1231. else{
  1232. //Otherwise, increment the hints for this item, as a penalty
  1233. State[i].HintsAndChecks++;
  1234. 
  1235. //then set the flag
  1236. AllCorrect = false;
  1237. }
  1238. }
  1239. }
  1240. 
  1241. //Calculate the total score
  1242. var TotalScore = 0;
  1243. for (i=0; i<State.length; i++){
  1244. TotalScore += State[i].ItemScore;
  1245. }
  1246. TotalScore = Math.floor((TotalScore * 100)/I.length);
  1247. 
  1248. //Compile the output
  1249. Output = '';
  1250. 
  1251. if (AllCorrect == true){
  1252. Output = Correct + '<br />';
  1253. }
  1254. 
  1255. Output += YourScoreIs + ' ' + TotalScore + '%.<br />';
  1256. if (AllCorrect == false){
  1257. Output += Incorrect;
  1258. }
  1259. ShowMessage(Output);
  1260. setTimeout('WriteToInstructions(Output)', 50);
  1261. Score = TotalScore;
  1262. CompileGuesses();
  1263. if ((AllCorrect == true)||(Finished == true)){
  1264. 
  1265. 
  1266. window.clearInterval(Interval);
  1267. 
  1268. TimeOver = true;
  1269. Locked = true;
  1270. Finished = true;
  1271. setTimeout('Finish()', SubmissionTimeout);
  1272. }
  1273. 
  1274. }
  1275. 
  1276. function TrackFocus(BoxNumber){
  1277. CurrentWord = BoxNumber;
  1278. InTextBox = true;
  1279. }
  1280. 
  1281. function LeaveGap(){
  1282. InTextBox = false;
  1283. }
  1284. 
  1285. function CheckBeginning(Guess, Answer){
  1286. var OutString = '';
  1287. var i = 0;
  1288. var UpperGuess = '';
  1289. var UpperAnswer = '';
  1290. 
  1291. if (CaseSensitive == false) {
  1292. UpperGuess = Guess.toUpperCase();
  1293. UpperAnswer = Answer.toUpperCase();
  1294. }
  1295. else {
  1296. UpperGuess = Guess;
  1297. UpperAnswer = Answer;
  1298. }
  1299. 
  1300. while (UpperGuess.charAt(i) == UpperAnswer.charAt(i)) {
  1301. OutString += Guess.charAt(i);
  1302. i++;
  1303. }
  1304. OutString += Answer.charAt(i);
  1305. return OutString;
  1306. }
  1307. 
  1308. function GetGapValue(GNum){
  1309. var RetVal = '';
  1310. if ((GNum<0)||(GNum>=I.length)){return RetVal;}
  1311. if (document.getElementById('Gap' + GNum) != null){
  1312. RetVal = document.getElementById('Gap' + GNum).value;
  1313. RetVal = TrimString(RetVal);
  1314. }
  1315. else{
  1316. RetVal = State[GNum].Guesses[State[GNum].Guesses.length-1];
  1317. }
  1318. return RetVal;
  1319. }
  1320. 
  1321. function SetGapValue(GNum, Val){
  1322. if ((GNum<0)||(GNum>=I.length)){return;}
  1323. if (document.getElementById('Gap' + GNum) != null){
  1324. document.getElementById('Gap' + GNum).value = Val;
  1325. document.getElementById('Gap' + GNum).focus();
  1326. }
  1327. }
  1328. 
  1329. function SetCorrectAnswer(GNum, Val){
  1330. if ((GNum<0)||(GNum>=I.length)){return;}
  1331. if (document.getElementById('GapSpan' + GNum) != null){
  1332. document.getElementById('GapSpan' + GNum).innerHTML = Val;
  1333. }
  1334. }
  1335. 
  1336. function FindCurrent() {
  1337. var x = 0;
  1338. FoundCurrent = -1;
  1339. 
  1340. //Test the current word:
  1341. //If its state is not set to already correct, check the word.
  1342. if (State[CurrentWord].AnsweredCorrectly == false){
  1343. if (CheckAnswer(CurrentWord, false) < 0){
  1344. return CurrentWord;
  1345. }
  1346. }
  1347. x=CurrentWord + 1;
  1348. while (x<I.length){
  1349. if (State[x].AnsweredCorrectly == false){
  1350. if (CheckAnswer(x, false) < 0){
  1351. return x;
  1352. }
  1353. }
  1354. x++;
  1355. }
  1356. 
  1357. x = 0;
  1358. while (x<CurrentWord){
  1359. if (State[x].AnsweredCorrectly == false){
  1360. if (CheckAnswer(x, false) < 0){
  1361. return x;
  1362. }
  1363. }
  1364. x++;
  1365. }
  1366. return FoundCurrent;
  1367. }
  1368. 
  1369. function CheckAnswer(GapNum, MarkAnswer){
  1370. var Guess = GetGapValue(GapNum);
  1371. var UpperGuess = '';
  1372. var UpperAnswer = '';
  1373. if (CaseSensitive == false){
  1374. UpperGuess = Guess.toUpperCase();
  1375. }
  1376. else{
  1377. UpperGuess = Guess;
  1378. }
  1379. var Match = -1;
  1380. for (var i = 0; i<I[GapNum][1].length; i++){
  1381. if (CaseSensitive == false){
  1382. UpperAnswer = I[GapNum][1][i][0].toUpperCase();
  1383. }
  1384. else{
  1385. UpperAnswer = I[GapNum][1][i][0];
  1386. }
  1387. if (TrimString(UpperGuess) == UpperAnswer){
  1388. Match = i;
  1389. if (MarkAnswer == true){
  1390. State[GapNum].AnsweredCorrectly = true;
  1391. }
  1392. }
  1393. }
  1394. return Match;
  1395. }
  1396. 
  1397. function GetHint(GapNum){
  1398. Guess = GetGapValue(GapNum);
  1399. 
  1400. if (CheckAnswer(GapNum, false) > -1){return ''}
  1401. RightBits = new Array();
  1402. for (var i=0; i<I[GapNum][1].length; i++){
  1403. RightBits[i] = CheckBeginning(Guess, I[GapNum][1][i][0]);
  1404. }
  1405. var RightOne = FindLongest(RightBits);
  1406. var Result = I[GapNum][1][RightOne][0].substring(0,RightBits[RightOne].length);
  1407. //Add another char if the last one is a space
  1408. if (Result.charAt(Result.length-1) == ' '){
  1409. Result = I[GapNum][1][RightOne][0].substring(0,RightBits[RightOne].length+1);
  1410. }
  1411. return Result;
  1412. }
  1413. 
  1414. function ShowHint(){
  1415. if (document.getElementById('FeedbackDiv').style.display == 'block'){return;}
  1416. if (Locked == true){return;}
  1417. var CurrGap = FindCurrent();
  1418. if (CurrGap < 0){return;}
  1419. 
  1420. var HintString = GetHint(CurrGap);
  1421. 
  1422. if (HintString.length > 0){
  1423. SetGapValue(CurrGap, HintString);
  1424. State[CurrGap].HintsAndChecks += 1;
  1425. }
  1426. ShowMessage(GiveHint);
  1427. }
  1428. 
  1429. function TypeChars(Chars){
  1430. var CurrGap = FindCurrent();
  1431. if (CurrGap < 0){return;}
  1432. if (document.getElementById('Gap' + CurrGap) != null){
  1433. SetGapValue(CurrGap, document.getElementById('Gap' + CurrGap).value + Chars);
  1434. }
  1435. }
  1436. 
  1437. 
  1438. function TimesUp() {
  1439. document.getElementById('Timer').innerHTML = 'Your time is over!';
  1440. 
  1441. TimeOver = true;
  1442. Finished = true;
  1443. CheckAnswers();
  1444. Locked = true;
  1445. 
  1446. }
  1447. 
  1448. 
  1449. 
  1450. 
  1451. 
  1452. 
  1453. //CODE FOR HANDLING TIMER
  1454. //Timer code
  1455. var Seconds = 930;
  1456. var Interval = null;
  1457. 
  1458. function StartTimer(){
  1459. Interval = window.setInterval('DownTime()',1000);
  1460. document.getElementById('TimerText').style.display = 'inline';
  1461. }
  1462. 
  1463. function DownTime(){
  1464. var ss = Seconds % 60;
  1465. if (ss<10){
  1466. ss='0' + ss + '';
  1467. }
  1468. 
  1469. var mm = Math.floor(Seconds / 60);
  1470. 
  1471. if (document.getElementById('Timer') == null){
  1472. return;
  1473. }
  1474. 
  1475. document.getElementById('TimerText').innerHTML = mm + ':' + ss;
  1476. if (Seconds < 1){
  1477. window.clearInterval(Interval);
  1478. TimeOver = true;
  1479. TimesUp();
  1480. }
  1481. Seconds--;
  1482. }
  1483. 
  1484. 
  1485. 
  1486. 
  1487. 
  1488. 
  1489. //-->
  1490. 
  1491. //]]>
  1492. 
  1493. </script>
  1494. 
  1495. 
  1496. </head>
  1497. 
  1498. <body onload="StartUp()" id="TheBody" >
  1499. 
  1500. <!-- BeginTopNavButtons -->
  1501. 
  1502. 
  1503. <div class="NavButtonBar" id="TopNavBar">
  1504. 
  1505. 
  1506. <button class="NavButton" onfocus="NavBtnOver(this)" onblur="NavBtnOut(this)" onmouseover="NavBtnOver(this)" onmouseout="NavBtnOut(this)" onmousedown="NavBtnDown(this)" onmouseup="NavBtnOut(this)" onclick="history.back(); return false;">&lt;=</button>
  1507. 
  1508. 
  1509. 
  1510. <button class="NavButton" onfocus="NavBtnOver(this)" onblur="NavBtnOut(this)" onmouseover="NavBtnOver(this)" onmouseout="NavBtnOut(this)" onmousedown="NavBtnDown(this)" onmouseup="NavBtnOut(this)" onclick="location='index.htm'; return false;"> Index </button>
  1511. 
  1512. 
  1513. 
  1514. <button class="NavButton" onfocus="NavBtnOver(this)" onblur="NavBtnOut(this)" onmouseover="NavBtnOver(this)" onmouseout="NavBtnOut(this)" onmousedown="NavBtnDown(this)" onmouseup="NavBtnOut(this)" onclick="location='index.htm'; return false;">=&gt;</button>
  1515. 
  1516. 
  1517. </div>
  1518. 
  1519. 
  1520. 
  1521. <!-- EndTopNavButtons -->
  1522. 
  1523. <div class="Titles">
  1524. <h2 class="ExerciseTitle">Holiday-Fill in the blank</h2>
  1525. 
  1526. <h3 class="ExerciseSubtitle">Gap-fill exercise</h3>
  1527. 
  1528. 
  1529. <div id="Timer"><span id="TimerText">&nbsp;&nbsp;</span></div>
  1530. 
  1531. 
  1532. </div>
  1533. 
  1534. <div id="InstructionsDiv" class="StdDiv">
  1535. <div id="Instructions">Fill in all the gaps, then press "Check" to check your answers. Use the "Hint" button to get a free letter if an answer is giving you trouble. You can also click on the "[?]" button to get a clue. Note that you will lose points if you ask for hints or clues!</div>
  1536. </div>
  1537. 
  1538. 
  1539. 
  1540. 
  1541. 
  1542. <div id="MainDiv" class="StdDiv">
  1543. 
  1544. <!-- These top buttons hidden; reveal if required -->
  1545. <!--
  1546. <button id="CheckButton1" class="FuncButton" onmouseover="FuncBtnOver(this)" onfocus="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" onblur="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="CheckAnswers()">&nbsp;Check&nbsp;</button>
  1547. 
  1548. 
  1549. <button class="FuncButton" onmouseover="FuncBtnOver(this)" onfocus="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" onblur="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowHint()">&nbsp;Hint&nbsp;</button>
  1550. 
  1551. 
  1552. -->
  1553. <div id="ClozeDiv">
  1554. <form id="Cloze" method="post" action="" onsubmit="return false;">
  1555. <div class="ClozeBody">
  1556. Indonesia has many beautiful tourism places. So, there are many <span class="GapSpan" id="GapSpan0"><input type="text" id="Gap0" onfocus="TrackFocus(0)" onblur="LeaveGap()" class="GapBox" size="16"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(0)">[?]</button></span> every year to visit tourism places in Indonesia. there are three <span class="GapSpan" id="GapSpan1"><input type="text" id="Gap1" onfocus="TrackFocus(1)" onblur="LeaveGap()" class="GapBox" size="7"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(1)">[?]</button></span> tourism places in Indonesia.<br />First is Bali. Bali is one of the tourism places that has <span class="GapSpan" id="GapSpan2"><input type="text" id="Gap2" onfocus="TrackFocus(2)" onblur="LeaveGap()" class="GapBox" size="11"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(2)">[?]</button></span>. There are jangger dance too in Bali. In Bali, there are many beaches. For example, <span class="GapSpan" id="GapSpan3"><input type="text" id="Gap3" onfocus="TrackFocus(3)" onblur="LeaveGap()" class="GapBox" size="14"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(3)">[?]</button></span>. Second is Yogyakarta. <span class="GapSpan" id="GapSpan4"><input type="text" id="Gap4" onfocus="TrackFocus(4)" onblur="LeaveGap()" class="GapBox" size="9"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(4)">[?]</button></span> is the name of the temple in Yogyakarta. There is <span class="GapSpan" id="GapSpan5"><input type="text" id="Gap5" onfocus="TrackFocus(5)" onblur="LeaveGap()" class="GapBox" size="9"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(5)">[?]</button></span> beach in Yogyarta. It is Parangtritis beach.<br />Third is Bromo. Bromo is popular with big ceremony that called <span class="GapSpan" id="GapSpan6"><input type="text" id="Gap6" onfocus="TrackFocus(6)" onblur="LeaveGap()" class="GapBox" size="6"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(6)">[?]</button></span>. There is Tengger race in Bromo. They are very <span class="GapSpan" id="GapSpan7"><input type="text" id="Gap7" onfocus="TrackFocus(7)" onblur="LeaveGap()" class="GapBox" size="8"></input><button style="line-height: 1.0" class="FuncButton" onfocus="FuncBtnOver(this)" onmouseover="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowClue(7)">[?]</button></span>.
  1557. </div>
  1558. </form>
  1559. </div>
  1560. 
  1561. 
  1562. 
  1563. <button id="CheckButton2" class="FuncButton" onmouseover="FuncBtnOver(this)" onfocus="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" onblur="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="CheckAnswers()">&nbsp;Check&nbsp;</button>
  1564. 
  1565. 
  1566. <button class="FuncButton" onmouseover="FuncBtnOver(this)" onfocus="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" onblur="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="ShowHint()">&nbsp;Hint&nbsp;</button>
  1567. 
  1568. 
  1569. </div>
  1570. 
  1571. 
  1572. 
  1573. <div class="Feedback" id="FeedbackDiv">
  1574. <div class="FeedbackText" id="FeedbackContent"></div>
  1575. <button id="FeedbackOKButton" class="FuncButton" onfocus="FuncBtnOver(this)" onblur="FuncBtnOut(this)" onmouseover="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="HideFeedback(); return false;">&nbsp;OK&nbsp;</button>
  1576. </div>
  1577. 
  1578. <!-- BeginBottomNavButtons -->
  1579. 
  1580. 
  1581. <div class="NavButtonBar" id="BottomNavBar">
  1582. 
  1583. 
  1584. <button class="NavButton" onfocus="NavBtnOver(this)" onblur="NavBtnOut(this)" onmouseover="NavBtnOver(this)" onmouseout="NavBtnOut(this)" onmousedown="NavBtnDown(this)" onmouseup="NavBtnOut(this)" onclick="history.back(); return false;">&lt;=</button>
  1585. 
  1586. 
  1587. 
  1588. <button class="NavButton" onfocus="NavBtnOver(this)" onblur="NavBtnOut(this)" onmouseover="NavBtnOver(this)" onmouseout="NavBtnOut(this)" onmousedown="NavBtnDown(this)" onmouseup="NavBtnOut(this)" onclick="location='index.htm'; return false;"> Index </button>
  1589. 
  1590. 
  1591. 
  1592. <button class="NavButton" onfocus="NavBtnOver(this)" onblur="NavBtnOut(this)" onmouseover="NavBtnOver(this)" onmouseout="NavBtnOut(this)" onmousedown="NavBtnDown(this)" onmouseup="NavBtnOut(this)" onclick="location='index.htm'; return false;">=&gt;</button>
  1593. 
  1594. 
  1595. </div>
  1596. 
  1597. 
  1598. 
  1599. <!-- EndBottomNavButtons -->
  1600. 
  1601. <!-- BeginSubmissionForm -->
  1602. 
  1603. <!-- EndSubmissionForm -->
  1604. 
  1605. </body>
  1606. 
  1607. </html>