Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| playground:denovo [28/10/2009 14:17] – aniltonc | playground:denovo [02/12/2015 09:58] (Version actuelle) – jpc | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | Hi folks!!! | + | < |
| - | Are you lost, like me??? | + | <!DOCTYPE html PUBLIC " |
| - | Yes, of course! I don´t understand | + | < |
| + | | ||
| + | |||
| + | <link rel=" | ||
| + | <meta name=" | ||
| + | <meta name=" | ||
| + | |||
| + | |||
| + | <meta http-equiv=" | ||
| + | |||
| + | < | ||
| + | Crucigrama " | ||
| + | </ | ||
| + | |||
| + | <!-- Made with executable version 6.3 Release 0 Build 3 --> | ||
| + | |||
| + | <!-- The following insertion allows | ||
| + | |||
| + | |||
| + | |||
| + | <style type=" | ||
| + | |||
| + | |||
| + | /* This is the CSS stylesheet used in the exercise. */ | ||
| + | /* Elements in square brackets are replaced by data based on configuration settings when the exercise is built. */ | ||
| + | |||
| + | /* BeginCorePageCSS */ | ||
| + | |||
| + | /* Made with executable version 6.3 Release 0 Build 3 */ | ||
| + | |||
| + | |||
| + | /* Hack to hide a nested Quicktime player from IE, which can't handle it. */ | ||
| + | * html object.MediaPlayerNotForIE { | ||
| + | display: none; | ||
| + | } | ||
| + | |||
| + | body{ | ||
| + | font-family: | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | |||
| + | margin-right: | ||
| + | margin-left: | ||
| + | font-size: small; | ||
| + | } | ||
| + | |||
| + | p{ | ||
| + | text-align: | ||
| + | margin: 0px; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | table, | ||
| + | font-size: 100%; | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | div.Titles{ | ||
| + | padding: 0.5em;; | ||
| + | text-align: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | button{ | ||
| + | font-family: | ||
| + | font-size: 100%; | ||
| + | display: inline; | ||
| + | } | ||
| + | |||
| + | .ExerciseTitle{ | ||
| + | font-size: 140%; | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | .ExerciseSubtitle{ | ||
| + | font-size: 120%; | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | div.StdDiv{ | ||
| + | background-color: | ||
| + | text-align: | ||
| + | font-size: 100%; | ||
| + | color: #000000; | ||
| + | padding: 0.5em; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | border-color: | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | /* EndCorePageCSS */ | ||
| + | |||
| + | .RTLText{ | ||
| + | text-align: | ||
| + | font-size: 150%; | ||
| + | direction: rtl; | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | .CentredRTLText{ | ||
| + | text-align: | ||
| + | font-size: 150%; | ||
| + | direction: rtl; | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | button p.RTLText{ | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | .RTLGapBox{ | ||
| + | text-align: | ||
| + | font-size: 150%; | ||
| + | direction: rtl; | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | .Guess{ | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | .CorrectAnswer{ | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | div# | ||
| + | padding: 0.25em; | ||
| + | margin-left: | ||
| + | margin-right: | ||
| + | text-align: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | span# | ||
| + | padding: 0.25em; | ||
| + | border-width: | ||
| + | border-style: | ||
| + | font-weight: | ||
| + | display: none; | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | span.Instructions{ | ||
| + | |||
| + | } | ||
| + | |||
| + | div.ExerciseText{ | ||
| + | |||
| + | } | ||
| + | |||
| + | .FeedbackText, | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | .LeftItem{ | ||
| + | font-size: 100%; | ||
| + | color: #000000; | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | .RightItem{ | ||
| + | font-weight: | ||
| + | font-size: 100%; | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | span.CorrectMark{ | ||
| + | |||
| + | } | ||
| + | |||
| + | input, textarea{ | ||
| + | font-family: | ||
| + | font-size: 120%; | ||
| + | } | ||
| + | |||
| + | select{ | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | div.Feedback { | ||
| + | background-color: | ||
| + | left: 33%; | ||
| + | width: 34%; | ||
| + | top: 33%; | ||
| + | z-index: 1; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | padding: 5px; | ||
| + | text-align: | ||
| + | color: #000000; | ||
| + | position: absolute; | ||
| + | display: none; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | div.ExerciseDiv{ | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | /* JMatch flashcard styles */ | ||
| + | table.FlashcardTable{ | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | border-color: | ||
| + | margin-left: | ||
| + | margin-right: | ||
| + | margin-top: | ||
| + | margin-bottom: | ||
| + | width: 90%; | ||
| + | position: relative; | ||
| + | text-align: | ||
| + | padding: 0px; | ||
| + | } | ||
| + | |||
| + | table.FlashcardTable tr{ | ||
| + | border-style: | ||
| + | margin: 0px; | ||
| + | padding: 0px; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | table.FlashcardTable td.Showing{ | ||
| + | font-size: 140%; | ||
| + | text-align: | ||
| + | width: 50%; | ||
| + | display: table-cell; | ||
| + | padding: 2em; | ||
| + | margin: 0px; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | color: #000000; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | table.FlashcardTable td.Hidden{ | ||
| + | display: none; | ||
| + | } | ||
| + | |||
| + | /* JMix styles */ | ||
| + | div# | ||
| + | margin-top: | ||
| + | margin-bottom: | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | a.ExSegment{ | ||
| + | font-size: 120%; | ||
| + | font-weight: | ||
| + | text-decoration: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | span.RemainingWordList{ | ||
| + | font-style: | ||
| + | } | ||
| + | |||
| + | div.DropLine { | ||
| + | position: absolute; | ||
| + | text-align: | ||
| + | border-bottom-style: | ||
| + | border-bottom-width: | ||
| + | border-bottom-color: | ||
| + | width: 80%; | ||
| + | } | ||
| + | |||
| + | /* JCloze styles */ | ||
| + | |||
| + | .ClozeWordList{ | ||
| + | text-align: | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | div.ClozeBody{ | ||
| + | text-align: | ||
| + | margin-top: | ||
| + | margin-bottom: | ||
| + | line-height: | ||
| + | } | ||
| + | |||
| + | span.GapSpan{ | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | /* JCross styles */ | ||
| + | |||
| + | table.CrosswordGrid{ | ||
| + | margin: auto auto 1em auto; | ||
| + | border-collapse: | ||
| + | padding: 0px; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid tbody tr td{ | ||
| + | width: 1.5em; | ||
| + | height: 1.5em; | ||
| + | text-align: | ||
| + | vertical-align: | ||
| + | font-size: 140%; | ||
| + | padding: 1px; | ||
| + | margin: 0px; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | border-color: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid span{ | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid td.BlankCell{ | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid td.LetterOnlyCell{ | ||
| + | text-align: | ||
| + | vertical-align: | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid td.NumLetterCell{ | ||
| + | text-align: | ||
| + | vertical-align: | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | padding: 1px; | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | .NumLetterCellText{ | ||
| + | cursor: pointer; | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | .GridNum{ | ||
| + | vertical-align: | ||
| + | font-size: 66%; | ||
| + | font-weight: | ||
| + | text-decoration: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | .GridNum: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table# | ||
| + | margin: auto; | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | table#Clues td{ | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | table.ClueList{ | ||
| + | margin: auto; | ||
| + | } | ||
| + | |||
| + | td.ClueNum{ | ||
| + | text-align: | ||
| + | font-weight: | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | td.Clue{ | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | div# | ||
| + | text-align: | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | /* Keypad styles */ | ||
| + | |||
| + | div.Keypad{ | ||
| + | text-align: | ||
| + | display: none; /* initially hidden, shown if needed */ | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | div.Keypad button{ | ||
| + | font-family: | ||
| + | font-size: 120%; | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | width: 2em; | ||
| + | } | ||
| + | |||
| + | /* JQuiz styles */ | ||
| + | |||
| + | div.QuestionNavigation{ | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | .QNum{ | ||
| + | margin: 0em 1em 0.5em 1em; | ||
| + | font-weight: | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | textarea{ | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | .QuestionText{ | ||
| + | text-align: | ||
| + | margin: 0px; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | .Answer{ | ||
| + | font-size: 120%; | ||
| + | letter-spacing: | ||
| + | } | ||
| + | |||
| + | .PartialAnswer{ | ||
| + | font-size: 120%; | ||
| + | letter-spacing: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | .Highlight{ | ||
| + | color: #000000; | ||
| + | background-color: | ||
| + | font-weight: | ||
| + | font-size: 120%; | ||
| + | } | ||
| + | |||
| + | ol.QuizQuestions{ | ||
| + | text-align: | ||
| + | list-style-type: | ||
| + | } | ||
| + | |||
| + | li.QuizQuestion{ | ||
| + | padding: 1em; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | } | ||
| + | |||
| + | ol.MCAnswers{ | ||
| + | text-align: | ||
| + | list-style-type: | ||
| + | padding: 1em; | ||
| + | } | ||
| + | |||
| + | ol.MCAnswers li{ | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | ol.MSelAnswers{ | ||
| + | text-align: | ||
| + | list-style-type: | ||
| + | padding: 1em; | ||
| + | } | ||
| + | |||
| + | div.ShortAnswer{ | ||
| + | padding: 1em; | ||
| + | } | ||
| + | |||
| + | .FuncButton { | ||
| + | text-align: | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | color: #000000; | ||
| + | background-color: | ||
| + | |||
| + | border-width: | ||
| + | padding: 3px 6px 3px 6px; | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .FuncButtonUp { | ||
| + | color: #FFFFFF; | ||
| + | text-align: | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | |||
| + | background-color: | ||
| + | color: #FFFFFF; | ||
| + | border-width: | ||
| + | padding: 3px 6px 3px 6px; | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .FuncButtonDown { | ||
| + | color: #FFFFFF; | ||
| + | text-align: | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | background-color: | ||
| + | color: #FFFFFF; | ||
| + | |||
| + | border-width: | ||
| + | padding: 3px 6px 3px 6px; | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | / | ||
| + | |||
| + | div.NavButtonBar{ | ||
| + | background-color: | ||
| + | text-align: | ||
| + | margin: 2px 0px 2px 0px; | ||
| + | clear: both; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | .NavButton { | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | background-color: | ||
| + | color: #ffffff; | ||
| + | |||
| + | border-width: | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .NavButtonUp { | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | color: #000000; | ||
| + | background-color: | ||
| + | |||
| + | border-width: | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .NavButtonDown { | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | color: #000000; | ||
| + | background-color: | ||
| + | |||
| + | border-width: | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | / | ||
| + | |||
| + | a{ | ||
| + | color: #0000FF; | ||
| + | } | ||
| + | |||
| + | a: | ||
| + | color: #0000CC; | ||
| + | } | ||
| + | |||
| + | a:hover{ | ||
| + | color: #0000FF; | ||
| + | } | ||
| + | |||
| + | div.CardStyle { | ||
| + | position: absolute; | ||
| + | font-family: | ||
| + | font-size: 100%; | ||
| + | padding: 5px; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | color: #000000; | ||
| + | background-color: | ||
| + | left: -50px; | ||
| + | top: -50px; | ||
| + | overflow: visible; | ||
| + | } | ||
| + | |||
| + | .rtl{ | ||
| + | text-align: | ||
| + | font-size: 140%; | ||
| + | } | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | <script type=" | ||
| + | |||
| + | //<![CDATA[ | ||
| + | |||
| + | <!-- | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | function Client(){ | ||
| + | //if not a DOM browser, hopeless | ||
| + | this.min = false; if (document.getElementById){this.min = true;}; | ||
| + | |||
| + | this.ua = navigator.userAgent; | ||
| + | this.name = navigator.appName; | ||
| + | this.ver = navigator.appVersion; | ||
| + | |||
| + | //Get data about the browser | ||
| + | this.mac = (this.ver.indexOf(' | ||
| + | this.win = (this.ver.indexOf(' | ||
| + | |||
| + | //Look for Gecko | ||
| + | this.gecko = (this.ua.indexOf(' | ||
| + | if (this.gecko){ | ||
| + | this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf(' | ||
| + | if (this.geckoVer < 20020000){this.min = false;} | ||
| + | } | ||
| + | |||
| + | //Look for Firebird | ||
| + | this.firebird = (this.ua.indexOf(' | ||
| + | |||
| + | //Look for Safari | ||
| + | this.safari = (this.ua.indexOf(' | ||
| + | if (this.safari){ | ||
| + | this.gecko = false; | ||
| + | } | ||
| + | |||
| + | //Look for IE | ||
| + | this.ie = (this.ua.indexOf(' | ||
| + | if (this.ie){ | ||
| + | this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf(' | ||
| + | if (this.ieVer < 5.5){this.min = false;} | ||
| + | } | ||
| + | |||
| + | //Look for Opera | ||
| + | this.opera = (this.ua.indexOf(' | ||
| + | if (this.opera){ | ||
| + | this.operaVer = parseFloat(this.ua.substring(this.ua.indexOf(' | ||
| + | if (this.operaVer < 7.04){this.min = false;} | ||
| + | } | ||
| + | if (this.min == false){ | ||
| + | alert(' | ||
| + | } | ||
| + | |||
| + | //Special case for the horrible ie5mac | ||
| + | this.ie5mac = (this.ie&& | ||
| + | } | ||
| + | |||
| + | var C = new Client(); | ||
| + | |||
| + | //for (prop in C){ | ||
| + | // | ||
| + | //} | ||
| + | |||
| + | |||
| + | |||
| + | //CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS | ||
| + | |||
| + | // | ||
| + | function NavBtnOver(Btn){ | ||
| + | if (Btn.className != ' | ||
| + | } | ||
| + | |||
| + | function NavBtnOut(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | |||
| + | function NavBtnDown(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | // | ||
| + | |||
| + | function FuncBtnOver(Btn){ | ||
| + | if (Btn.className != ' | ||
| + | } | ||
| + | |||
| + | function FuncBtnOut(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | |||
| + | function FuncBtnDown(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | |||
| + | function FocusAButton(){ | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | else{ | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | else{ | ||
| + | document.getElementsByTagName(' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX | ||
| + | |||
| + | var topZ = 1000; | ||
| + | |||
| + | function ShowMessage(Feedback){ | ||
| + | var Output = Feedback + '< | ||
| + | document.getElementById(' | ||
| + | var FDiv = document.getElementById(' | ||
| + | topZ++; | ||
| + | FDiv.style.zIndex = topZ; | ||
| + | FDiv.style.top = TopSettingWithScrollOffset(30) + ' | ||
| + | |||
| + | FDiv.style.display = ' | ||
| + | |||
| + | ShowElements(false, | ||
| + | ShowElements(false, | ||
| + | ShowElements(false, | ||
| + | ShowElements(true, | ||
| + | |||
| + | //Focus the OK button | ||
| + | setTimeout(" | ||
| + | |||
| + | // | ||
| + | } | ||
| + | |||
| + | function ShowElements(Show, | ||
| + | // added third argument to allow objects in the feedback box to appear | ||
| + | //IE bug -- hide all the form elements that will show through the popup | ||
| + | //FF on Mac bug : doesn' | ||
| + | //unless the object' | ||
| + | |||
| + | //get container object (by Id passed in, or use document otherwise) | ||
| + | TopNode = document.getElementById(ContainerToReverse); | ||
| + | var Els; | ||
| + | if (TopNode != null) { | ||
| + | Els = TopNode.getElementsByTagName(TagName); | ||
| + | } else { | ||
| + | Els = document.getElementsByTagName(TagName); | ||
| + | } | ||
| + | |||
| + | for (var i=0; i< | ||
| + | if (TagName == " | ||
| + | // | ||
| + | if (Show == true){ | ||
| + | Els[i].style.visibility = ' | ||
| + | //get Mac FireFox to manipulate display, to force screen redraw | ||
| + | if (C.mac && C.gecko) {Els[i].style.display = ''; | ||
| + | } | ||
| + | else{ | ||
| + | Els[i].style.visibility = ' | ||
| + | if (C.mac && C.gecko) {Els[i].style.display = ' | ||
| + | } | ||
| + | } | ||
| + | else { | ||
| + | // tagName is either input or select (that is, Form Elements) | ||
| + | // ie6 has a problem with Form elements, so manipulate those | ||
| + | if (C.ie) { | ||
| + | if (C.ieVer < 7) { | ||
| + | if (Show == true){ | ||
| + | Els[i].style.visibility = ' | ||
| + | } | ||
| + | else{ | ||
| + | Els[i].style.visibility = ' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | function HideFeedback(){ | ||
| + | document.getElementById(' | ||
| + | ShowElements(true, | ||
| + | ShowElements(true, | ||
| + | ShowElements(true, | ||
| + | if (Finished == true){ | ||
| + | Finish(); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | //GENERAL UTILITY FUNCTIONS AND VARIABLES | ||
| + | |||
| + | //PAGE DIMENSION FUNCTIONS | ||
| + | function PageDim(){ | ||
| + | //Get the page width and height | ||
| + | this.W = 600; | ||
| + | this.H = 400; | ||
| + | this.W = document.getElementsByTagName(' | ||
| + | this.H = document.getElementsByTagName(' | ||
| + | } | ||
| + | |||
| + | var pg = null; | ||
| + | |||
| + | function GetPageXY(El) { | ||
| + | var XY = {x: 0, y: 0}; | ||
| + | while(El){ | ||
| + | XY.x += El.offsetLeft; | ||
| + | XY.y += El.offsetTop; | ||
| + | El = El.offsetParent; | ||
| + | } | ||
| + | return XY; | ||
| + | } | ||
| + | |||
| + | function GetScrollTop(){ | ||
| + | if (typeof(window.pageYOffset) == ' | ||
| + | return window.pageYOffset; | ||
| + | } | ||
| + | else{ | ||
| + | if ((document.body)&& | ||
| + | return document.body.scrollTop; | ||
| + | } | ||
| + | else{ | ||
| + | if ((document.documentElement)&& | ||
| + | return document.documentElement.scrollTop; | ||
| + | } | ||
| + | else{ | ||
| + | return 0; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function GetViewportHeight(){ | ||
| + | if (typeof window.innerHeight != ' | ||
| + | return window.innerHeight; | ||
| + | } | ||
| + | else{ | ||
| + | if (((typeof document.documentElement != ' | ||
| + | ' | ||
| + | return document.documentElement.clientHeight; | ||
| + | } | ||
| + | else{ | ||
| + | return document.getElementsByTagName(' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function TopSettingWithScrollOffset(TopPercent){ | ||
| + | var T = Math.floor(GetViewportHeight() * (TopPercent/ | ||
| + | return GetScrollTop() + T; | ||
| + | } | ||
| + | |||
| + | //CODE FOR AVOIDING LOSS OF DATA WHEN BACKSPACE KEY INVOKES history.back() | ||
| + | var InTextBox = false; | ||
| + | |||
| + | function SuppressBackspace(e){ | ||
| + | if (InTextBox == true){return; | ||
| + | if (C.ie) { | ||
| + | thisKey = window.event.keyCode; | ||
| + | } | ||
| + | else { | ||
| + | thisKey = e.keyCode; | ||
| + | } | ||
| + | |||
| + | var Suppress = false; | ||
| + | |||
| + | if (thisKey == 8) { | ||
| + | Suppress = true; | ||
| + | } | ||
| + | |||
| + | if (Suppress == true){ | ||
| + | if (C.ie){ | ||
| + | window.event.returnValue = false; | ||
| + | window.event.cancelBubble = true; | ||
| + | } | ||
| + | else{ | ||
| + | e.preventDefault(); | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | if (C.ie){ | ||
| + | document.attachEvent(' | ||
| + | window.attachEvent(' | ||
| + | } | ||
| + | else{ | ||
| + | if (window.addEventListener){ | ||
| + | window.addEventListener(' | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function ReduceItems(InArray, | ||
| + | var ItemToDump=0; | ||
| + | var j=0; | ||
| + | while (InArray.length > ReduceToSize){ | ||
| + | ItemToDump = Math.floor(InArray.length*Math.random()); | ||
| + | InArray.splice(ItemToDump, | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function Shuffle(InArray){ | ||
| + | var Num; | ||
| + | var Temp = new Array(); | ||
| + | var Len = InArray.length; | ||
| + | |||
| + | var j = Len; | ||
| + | |||
| + | for (var i=0; i<Len; i++){ | ||
| + | Temp[i] = InArray[i]; | ||
| + | } | ||
| + | |||
| + | for (i=0; i<Len; i++){ | ||
| + | Num = Math.floor(j | ||
| + | InArray[i] = Temp[Num]; | ||
| + | |||
| + | for (var k=Num; k < (j-1); k++) { | ||
| + | Temp[k] = Temp[k+1]; | ||
| + | } | ||
| + | j--; | ||
| + | } | ||
| + | return InArray; | ||
| + | } | ||
| + | |||
| + | function WriteToInstructions(Feedback) { | ||
| + | document.getElementById(' | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | function EscapeDoubleQuotes(InString){ | ||
| + | return InString.replace(/"/ | ||
| + | } | ||
| + | |||
| + | function TrimString(InString){ | ||
| + | var x = 0; | ||
| + | |||
| + | if (InString.length != 0) { | ||
| + | while ((InString.charAt(InString.length - 1) == ' | ||
| + | InString = InString.substring(0, | ||
| + | } | ||
| + | |||
| + | while ((InString.charAt(0) == ' | ||
| + | InString = InString.substring(1, | ||
| + | } | ||
| + | |||
| + | while (InString.indexOf(' | ||
| + | x = InString.indexOf(' | ||
| + | InString = InString.substring(0, | ||
| + | } | ||
| + | |||
| + | return InString; | ||
| + | } | ||
| + | |||
| + | else { | ||
| + | return ''; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function FindLongest(InArray){ | ||
| + | if (InArray.length < 1){return -1;} | ||
| + | |||
| + | var Longest = 0; | ||
| + | for (var i=1; i< | ||
| + | if (InArray[i].length > InArray[Longest].length){ | ||
| + | Longest = i; | ||
| + | } | ||
| + | } | ||
| + | return Longest; | ||
| + | } | ||
| + | |||
| + | //UNICODE CHARACTER FUNCTIONS | ||
| + | function IsCombiningDiacritic(CharNum){ | ||
| + | var Result = (((CharNum >= 0x0300)&& | ||
| + | Result = Result || (((CharNum >= 0x3099)&& | ||
| + | return Result; | ||
| + | } | ||
| + | |||
| + | function IsCJK(CharNum){ | ||
| + | return ((CharNum >= 0x3000)&& | ||
| + | } | ||
| + | |||
| + | //SETUP FUNCTIONS | ||
| + | //BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED | ||
| + | function ClearTextBoxes(){ | ||
| + | var NList = document.getElementsByTagName(' | ||
| + | for (var i=0; i< | ||
| + | if ((NList[i].id.indexOf(' | ||
| + | NList[i].value = ''; | ||
| + | } | ||
| + | if (NList[i].id.indexOf(' | ||
| + | NList[i].checked = ''; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | //EXTENSION TO ARRAY OBJECT | ||
| + | function Array_IndexOf(Input){ | ||
| + | var Result = -1; | ||
| + | for (var i=0; i< | ||
| + | if (this[i] == Input){ | ||
| + | Result = i; | ||
| + | } | ||
| + | } | ||
| + | return Result; | ||
| + | } | ||
| + | Array.prototype.indexOf = Array_IndexOf; | ||
| + | |||
| + | //IE HAS RENDERING BUG WITH BOTTOM NAVBAR | ||
| + | function RemoveBottomNavBarForIE(){ | ||
| + | if ((C.ie)&& | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | |||
| + | var HPNStartTime = (new Date()).getTime(); | ||
| + | var SubmissionTimeout = 30000; | ||
| + | var Detail = ''; | ||
| + | |||
| + | function Finish(){ | ||
| + | //If there' | ||
| + | if (document.store != null){ | ||
| + | Frm = document.store; | ||
| + | Frm.starttime.value = HPNStartTime; | ||
| + | Frm.endtime.value = (new Date()).getTime(); | ||
| + | Frm.mark.value = Score; | ||
| + | Frm.detail.value = Detail; | ||
| + | Frm.submit(); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //JCROSS CORE JAVASCRIPT CODE | ||
| + | |||
| + | var InGap = false; | ||
| + | var CurrentBox = null; | ||
| + | var Feedback = ''; | ||
| + | var AcrossCaption = ''; | ||
| + | var DownCaption = ''; | ||
| + | var Correct = ' | ||
| + | var Incorrect = ' | ||
| + | var GiveHint = ' | ||
| + | var YourScoreIs = 'Tu puntaje es:'; | ||
| + | var BuiltGrid = ''; | ||
| + | var BuiltExercise = ''; | ||
| + | var Penalties = 0; | ||
| + | var Score = 0; | ||
| + | var InTextBox = false; | ||
| + | var Locked = false; | ||
| + | var TimeOver = false; | ||
| + | var CaseSensitive = false; | ||
| + | |||
| + | var InputStuff = '< | ||
| + | InputStuff += ' | ||
| + | InputStuff += '< | ||
| + | InputStuff += ''; | ||
| + | InputStuff += '</ | ||
| + | |||
| + | var CurrBoxElement = null; | ||
| + | var Finished = false; | ||
| + | |||
| + | function StartUp(){ | ||
| + | RemoveBottomNavBarForIE(); | ||
| + | //Show a keypad if there is one (added bugfix for 6.0.4.12) | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | |||
| + | |||
| + | AcrossCaption = document.getElementById(' | ||
| + | DownCaption = document.getElementById(' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | StartTimer(); | ||
| + | |||
| + | |||
| + | } | ||
| + | |||
| + | function GetAnswerLength(Across, | ||
| + | Result = 0; | ||
| + | if (Across == false){ | ||
| + | while ((x< | ||
| + | Result += L[x][y].length; | ||
| + | x++; | ||
| + | } | ||
| + | return Result; | ||
| + | } | ||
| + | else{ | ||
| + | while ((y< | ||
| + | Result += L[x][y].length; | ||
| + | y++; | ||
| + | } | ||
| + | return Result; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function GetEditSize(Across, | ||
| + | var Len = GetAnswerLength(Across, | ||
| + | if (IsCJK(L[x][y].charCodeAt(0))){ | ||
| + | Len *= 2; | ||
| + | } | ||
| + | return Len; | ||
| + | } | ||
| + | |||
| + | function ShowClue(ClueNum, | ||
| + | var Result = ''; | ||
| + | var Temp; | ||
| + | var strParams; | ||
| + | var Clue = document.getElementById(' | ||
| + | if (Clue != null){ | ||
| + | Temp = InputStuff.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | strParams = ' | ||
| + | Temp = Temp.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | Result += Temp; | ||
| + | } | ||
| + | Clue = document.getElementById(' | ||
| + | if (Clue != null){ | ||
| + | Temp = InputStuff.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | strParams = ' | ||
| + | Temp = Temp.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | Temp = Temp.replace(/ | ||
| + | Result += Temp; | ||
| + | } | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | |||
| + | function EnterGuess(Across, | ||
| + | if (document.getElementById(BoxId) != null){ | ||
| + | var Guess = document.getElementById(BoxId).value; | ||
| + | var AnsLength = GetAnswerLength(Across, | ||
| + | EnterAnswer(Guess, | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function SplitStringToPerceivedChars(InString, | ||
| + | var Temp = InString.charAt(0); | ||
| + | if (InString.length > 1){ | ||
| + | for (var i=1; i< | ||
| + | if (IsCombiningDiacritic(InString.charCodeAt(i)) == true){ | ||
| + | Temp += InString.charAt(i); | ||
| + | } | ||
| + | else{ | ||
| + | PC.push(Temp); | ||
| + | Temp = InString.charAt(i); | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | PC.push(Temp); | ||
| + | } | ||
| + | |||
| + | function EnterAnswer(Guess, | ||
| + | var PC = new Array(); | ||
| + | SplitStringToPerceivedChars(Guess, | ||
| + | |||
| + | var i=x; | ||
| + | var j=y; | ||
| + | var Letter = 0; | ||
| + | while (Letter < AnsLength){ | ||
| + | if (Letter < PC.length){ | ||
| + | G[i][j] = PC[Letter]; | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | } | ||
| + | if (Across == true){ | ||
| + | j++; | ||
| + | } | ||
| + | else{ | ||
| + | i++; | ||
| + | } | ||
| + | Letter++; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function SetGridSquareValue(x, | ||
| + | var GridId = ' | ||
| + | if (document.getElementById(GridId) != null){ | ||
| + | document.getElementById(GridId).innerHTML = Val; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function ShowHint(Across, | ||
| + | var i=x; | ||
| + | var j=y; | ||
| + | var LetterFromGuess = ''; | ||
| + | var LetterFromKey = ''; | ||
| + | var OutString = ''; | ||
| + | if (Across==true){ | ||
| + | while (j< | ||
| + | if (L[i][j] != '' | ||
| + | OutString += L[i][j]; | ||
| + | if (CaseSensitive == true){ | ||
| + | LetterFromKey = L[i][j]; | ||
| + | LetterFromGuess = G[i][j]; | ||
| + | } | ||
| + | else { | ||
| + | LetterFromKey = L[i][j].toUpperCase(); | ||
| + | LetterFromGuess = G[i][j].toUpperCase(); | ||
| + | } | ||
| + | if (LetterFromGuess != LetterFromKey){ | ||
| + | // if (G[i][j] != L[i][j]){ | ||
| + | G[i][j] = L[i][j]; | ||
| + | Penalties++; | ||
| + | break; | ||
| + | } | ||
| + | } | ||
| + | else{ | ||
| + | break; | ||
| + | } | ||
| + | j++; | ||
| + | } | ||
| + | } | ||
| + | else{ | ||
| + | while (i< | ||
| + | if (L[i][j] != '' | ||
| + | OutString += L[i][j]; | ||
| + | if (CaseSensitive == true){ | ||
| + | LetterFromKey = L[i][j]; | ||
| + | LetterFromGuess = G[i][j]; | ||
| + | } | ||
| + | else { | ||
| + | LetterFromKey = L[i][j].toUpperCase(); | ||
| + | LetterFromGuess = G[i][j].toUpperCase(); | ||
| + | } | ||
| + | if (LetterFromGuess != LetterFromKey){ | ||
| + | // if (G[i][j] != L[i][j]){ | ||
| + | G[i][j] = L[i][j]; | ||
| + | Penalties++; | ||
| + | break; | ||
| + | } | ||
| + | } | ||
| + | else{ | ||
| + | break; | ||
| + | } | ||
| + | i++; | ||
| + | } | ||
| + | } | ||
| + | if (document.getElementById(BoxId) != null){ | ||
| + | document.getElementById(BoxId).value = OutString; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | L = new Array(); | ||
| + | L[0] = new Array('','','','','','','',' | ||
| + | L[1] = new Array('','','',' | ||
| + | L[2] = new Array('','','','','','','',' | ||
| + | L[3] = new Array('','','','','','','',' | ||
| + | L[4] = new Array('','','','','','','',' | ||
| + | L[5] = new Array('','','','','','','',' | ||
| + | L[6] = new Array(' | ||
| + | L[7] = new Array('',' | ||
| + | L[8] = new Array('',' | ||
| + | L[9] = new Array('',' | ||
| + | L[10] = new Array('',' | ||
| + | L[11] = new Array('',' | ||
| + | L[12] = new Array('',' | ||
| + | L[13] = new Array('',' | ||
| + | |||
| + | |||
| + | CL = new Array(); | ||
| + | CL[0] = new Array(0, | ||
| + | CL[1] = new Array(0, | ||
| + | CL[2] = new Array(0, | ||
| + | CL[3] = new Array(0, | ||
| + | CL[4] = new Array(0, | ||
| + | CL[5] = new Array(0, | ||
| + | CL[6] = new Array(3, | ||
| + | CL[7] = new Array(0, | ||
| + | CL[8] = new Array(0, | ||
| + | CL[9] = new Array(0, | ||
| + | CL[10] = new Array(0, | ||
| + | CL[11] = new Array(0, | ||
| + | CL[12] = new Array(0, | ||
| + | CL[13] = new Array(0, | ||
| + | |||
| + | |||
| + | G = new Array(); | ||
| + | G[0] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[1] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[2] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[3] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[4] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[5] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[6] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[7] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[8] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[9] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[10] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[11] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[12] = new Array('','','','','','','','','','','','','','','' | ||
| + | G[13] = new Array('','','','','','','','','','','','','','','' | ||
| + | |||
| + | |||
| + | function CheckAnswers(){ | ||
| + | if (Locked == true){return; | ||
| + | |||
| + | var AllCorrect = true; | ||
| + | var TotLetters = 0; | ||
| + | var CorrectLetters = 0; | ||
| + | var LetterFromKey = ''; | ||
| + | var LetterFromGuess = ''; | ||
| + | |||
| + | //Check each letter | ||
| + | for (var i=0; i< | ||
| + | for (var j=0; j< | ||
| + | if (L[i][j] != '' | ||
| + | TotLetters++; | ||
| + | if (CaseSensitive == true) { | ||
| + | LetterFromKey = L[i][j]; | ||
| + | LetterFromGuess = G[i][j]; | ||
| + | } | ||
| + | else { | ||
| + | LetterFromKey = L[i][j].toUpperCase(); | ||
| + | LetterFromGuess = G[i][j].toUpperCase(); | ||
| + | } | ||
| + | if (LetterFromGuess != LetterFromKey){ | ||
| + | G[i][j] = ''; | ||
| + | //Blank that square in the grid | ||
| + | SetGridSquareValue(i, | ||
| + | AllCorrect = false; | ||
| + | } | ||
| + | else{ | ||
| + | CorrectLetters++; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | Score = Math.floor(((CorrectLetters-Penalties) * 100)/ | ||
| + | if (Score < 0){Score = 0;} | ||
| + | |||
| + | //Compile the output | ||
| + | var Output = ''; | ||
| + | |||
| + | if (AllCorrect == true){ | ||
| + | Output = Correct + '< | ||
| + | } | ||
| + | |||
| + | Output += YourScoreIs + ' ' + Score + ' | ||
| + | if (AllCorrect == false){ | ||
| + | Output += Incorrect; | ||
| + | Penalties++; | ||
| + | } | ||
| + | |||
| + | ShowMessage(Output); | ||
| + | WriteToInstructions(Output); | ||
| + | |||
| + | if ((AllCorrect == true)||(TimeOver == true)){ | ||
| + | |||
| + | |||
| + | window.clearInterval(Interval); | ||
| + | |||
| + | TimeOver = true; | ||
| + | Locked = true; | ||
| + | Finished = true; | ||
| + | setTimeout(' | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | function Finish(){ | ||
| + | //If there' | ||
| + | if (document.store != null){ | ||
| + | Frm = document.store; | ||
| + | Frm.starttime.value = HPNStartTime; | ||
| + | Frm.endtime.value = (new Date()).getTime(); | ||
| + | Frm.mark.value = Score; | ||
| + | Frm.submit(); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function TypeChars(Chars){ | ||
| + | if (CurrentBox != null){ | ||
| + | CurrentBox.value += Chars; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | function TimesUp() { | ||
| + | document.getElementById(' | ||
| + | |||
| + | TimeOver = true; | ||
| + | Finished = true; | ||
| + | CheckAnswers(); | ||
| + | Locked = true; | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //CODE FOR HANDLING TIMER | ||
| + | //Timer code | ||
| + | var Seconds = 420; | ||
| + | var Interval = null; | ||
| + | |||
| + | function StartTimer(){ | ||
| + | Interval = window.setInterval(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | |||
| + | function DownTime(){ | ||
| + | var ss = Seconds % 60; | ||
| + | if (ss< | ||
| + | ss=' | ||
| + | } | ||
| + | |||
| + | var mm = Math.floor(Seconds / 60); | ||
| + | |||
| + | if (document.getElementById(' | ||
| + | return; | ||
| + | } | ||
| + | |||
| + | document.getElementById(' | ||
| + | if (Seconds < 1){ | ||
| + | window.clearInterval(Interval); | ||
| + | TimeOver = true; | ||
| + | TimesUp(); | ||
| + | } | ||
| + | Seconds--; | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //--> | ||
| + | |||
| + | //]]> | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | <body onload=" | ||
| + | |||
| + | <!-- BeginTopNavButtons --> | ||
| + | |||
| + | |||
| + | <div class=" | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | <button class=" | ||
| + | |||
| + | |||
| + | |||
| + | <button class=" | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | <!-- EndTopNavButtons --> | ||
| + | |||
| + | <div class=" | ||
| + | <h2 class=" | ||
| + | |||
| + | <h3 class=" | ||
| + | |||
| + | |||
| + | <div id=" | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | <div id=" | ||
| + | <div id=" | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | <div id=" | ||
| + | |||
| + | |||
| + | <div class=" | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | <div id=" | ||
| + | |||
| + | </ | ||
| + | |||
| + | <!-- This top button is hidden; uncomment it to reveal it. --> | ||
| + | <!-- | ||
| + | <button id=" | ||
| + | |||
| + | | ||
| + | |||
| + | <table class=" | ||
| + | < | ||
| + | |||
| + | <tr id=" | ||