あなたに安全・安心を─。白髪染め・ヘアケアのことならヘアケア専門店レフィーネ公式オンラインストアにおまかせください。
■システム変更に伴うパスワード再設定のお願い 詳しくはこちら
|
"); else document.write(" | "); } document.writeln(""); } document.writeln(""); // Finally, show the crossword and hide the wait message. Initialized = true; document.getElementById("waitmessage").style.display = "none"; document.getElementById("crossword").style.display = "block"; } // * * * * * * * * * * // Event handlers // Raised when a key is pressed in the word entry box. function WordEntryKeyPress(event) { if (CrosswordFinished) return; // Treat an Enter keypress as an OK click. if (CurrentWord >= 0 && event.keyCode == 13) OKClick(); } // * * * * * * * * * * // Helper functions // Called when we're ready to start the crossword. function BeginCrossword() { if (Initialized) { document.getElementById("welcomemessage").style.display = ""; document.getElementById("checkbutton").style.display = ""; } } // Returns true if the string passed in contains any characters prone to evil. function ContainsBadChars(theirWord) { for (var i = 0; i = 0) return true; return false; } // Pads a number out to three characters. function PadNumber(number) { if (number = 0) OKClick(); DeselectCurrentWord(); // Determine the coordinates of the cell they clicked, and then the word that // they clicked. var target = (event.srcElement ? event.srcElement: event.target); x = parseInt(target.id.substring(1, 4), 10); y = parseInt(target.id.substring(4, 7), 10); // If they clicked an intersection, choose the type of word that was NOT selected last time. if (TableAcrossWord[x][y] >= 0 && TableDownWord[x][y] >= 0) CurrentWord = PrevWordHorizontal ? TableDownWord[x][y] : TableAcrossWord[x][y]; else if (TableAcrossWord[x][y] >= 0) CurrentWord = TableAcrossWord[x][y]; else if (TableDownWord[x][y] >= 0) CurrentWord = TableDownWord[x][y]; PrevWordHorizontal = (CurrentWord 0 && TableCell.innerHTML != " " && TableCell.innerHTML.toLowerCase() != " ") { TheirWord += TableCell.innerHTML.toUpperCase(); TheirWordLength++; } else { TheirWord += "•"; } } document.getElementById("wordlabel").innerHTML = TheirWord; document.getElementById("wordinfo").innerHTML = ((CurrentWord WordLength[CurrentWord]) { document.getElementById("worderror").innerHTML = "文字数が多いです。 文字数は " + WordLength[CurrentWord] + " 文字です"; document.getElementById("worderror").style.display = "block"; return; } // If we made it this far, they typed an acceptable word, so add these letters to the puzzle and hide the entry box. x = WordX[CurrentWord]; y = WordY[CurrentWord]; for (i = 0; i LastHorizontalWord ? i : 0)); TableCell.innerHTML = TheirWord.substring(i, i + 1); } DeselectCurrentWord(); } // Called when the "check puzzle" link is clicked. function CheckClick() { var i, j, x, y, UserEntry, ErrorsFound = 0, EmptyFound = 0, TableCell; if (CrosswordFinished) return; DeselectCurrentWord(); for (y = 0; y = 0 || TableDownWord[x][y] >= 0) { TableCell = CellAt(x, y); if (TableCell.className == "ecw-box ecw-boxerror_unsel") TableCell.className = "ecw-box ecw-boxnormal_unsel"; } for (i = 0; i 0 && TableCell.innerHTML.toLowerCase() != " ") { UserEntry += TableCell.innerHTML.toUpperCase(); } else { UserEntry = ""; EmptyFound++; break; } } UserEntry = UserEntry.replace(/&/g, '&'); // If this word doesn't match, it's an error. if (HashWord(UserEntry) != AnswerHash[i] && UserEntry.length > 0) { ErrorsFound++; ChangeWordStyle(i, "ecw-box ecw-boxerror_unsel"); } } // If they can only check once, disable things prematurely. if ( OnlyCheckOnce ) { CrosswordFinished = true; document.getElementById("checkbutton").style.display = "none"; } // If errors were found, just exit now. if (ErrorsFound > 0 && EmptyFound > 0) document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound > 1 ? " 個の間違い" : " 個の間違い") + " 問がまだ " + EmptyFound + (EmptyFound > 1 ? " 個の問題がまだ" : " 個の問題がまだ") + " 残っています"; else if (ErrorsFound > 0) document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound > 1 ? " 個の間違いが" : " 個の間違いが") + " あります"; else if (EmptyFound > 0) document.getElementById("welcomemessage").innerHTML = "残念ながら正解数が足らないようです, まだ " + EmptyFound + (EmptyFound > 1 ? " 問、残っています。" : " incomplete word was") + " あとちょっと!"; if (ErrorsFound + EmptyFound > 0) { document.getElementById("welcomemessage").style.display = ""; return; } // They finished the puzzle! CrosswordFinished = true; document.getElementById("checkbutton").style.display = "none"; document.getElementById("congratulations").style.display = "block"; document.getElementById("welcomemessage").style.display = "none"; } // Called when the "cheat" link is clicked. function CheatClick() { if (CrosswordFinished) return; var OldWord = CurrentWord; document.getElementById("wordentry").value = Word[CurrentWord]; OKClick(); ChangeWordStyle(OldWord, "ecw-box ecw-boxcheated_unsel"); } // Returns a one-way hash for a word. function HashWord(Word) { var x = (Word.charCodeAt(0) * 719) % 1138; var Hash = 837; var i; for (i = 1; i |
※『答えをチェック』をクリックすると、再入力する場合はもう一度はじめからになります。
全ての答えを確認してから『答えをチェック』をクリックしてください。