Horizontal, ' : 'Vertical, ') + WordLength[CurrentWord ...



Horizontal, " : "Vertical, ") + WordLength[CurrentWord] + " lettres.";

document.getElementById("wordclue").innerHTML = Clue[CurrentWord];

document.getElementById("worderror").style.display = "none";

document.getElementById("cheatbutton").style.display = (Word.length == 0) ? "none" : "";

if (TheirWordLength == WordLength[CurrentWord])

document.getElementById("wordentry").value = TheirWord;

else

document.getElementById("wordentry").value = "";

// Finally, show the answer box.

document.getElementById("answerbox").style.display = "block";

try

{

document.getElementById("wordentry").focus();

document.getElementById("wordentry").select();

}

catch (e)

{

}

}

// Called when the user clicks the OK link.

function OKClick()

{

var TheirWord, x, y, i, TableCell;

if (CrosswordFinished) return;

if (document.getElementById("okbutton").disabled) return;

// First, validate the entry.

TheirWord = document.getElementById("wordentry").value.toUpperCase();

if (TheirWord.length == 0)

{

DeselectCurrentWord();

return;

}

if (ContainsBadChars(TheirWord))

{

document.getElementById("worderror").innerHTML = "Le mot que vous avez tapé contient des caractères non autorisés. Ne tapez que des lettres svp.";

document.getElementById("worderror").style.display = "block";

return;

}

if (TheirWord.length < WordLength[CurrentWord])

{

document.getElementById("worderror").innerHTML = "Vous n'avez pas tapé assez de lettres. Ce mot a " + WordLength[CurrentWord] + " lettres.";

document.getElementById("worderror").style.display = "block";

return;

}

if (TheirWord.length > WordLength[CurrentWord])

{

document.getElementById("worderror").innerHTML = "Vous avez tapé trop de lettres. Ce mot a " + WordLength[CurrentWord] + " lettres.";

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 < TheirWord.length; i++)

{

TableCell = CellAt(x + (CurrentWord 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 < CrosswordHeight; y++)

for (x = 0; x < CrosswordWidth; x++)

if (TableAcrossWord[x][y] >= 0 || TableDownWord[x][y] >= 0)

{

TableCell = CellAt(x, y);

if (TableCell.className == "box boxerror_unsel") TableCell.className = "box boxnormal_unsel";

}

for (i = 0; i < Words; i++)

{

// Get the user's entry for this word.

UserEntry = "";

for (j = 0; j < WordLength[i]; j++)

{

if (i 0 && TableCell.innerHTML.toLowerCase() != " ")

{

UserEntry += TableCell.innerHTML.toUpperCase();

}

else

{

UserEntry = "";

EmptyFound++;

break;

}

}

// If this word doesn't match, it's an error.

if (HashWord(UserEntry) != AnswerHash[i] && UserEntry.length > 0)

{

ErrorsFound++;

ChangeWordStyle(i, "box 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 ? " erreurs" : " erreur") + " et " + EmptyFound + (EmptyFound > 1 ? " mots incomplets trouvés" : " mot incomplet trouvé") + " .";

else if (ErrorsFound > 0)

document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound > 1 ? " erreurs trouvées" : " erreur trouvée") + ".";

else if (EmptyFound > 0)

document.getElementById("welcomemessage").innerHTML = "Pas d'erreur, mais " + EmptyFound + (EmptyFound > 1 ? " mots incomplets trouvés" : " mot incomplet trouvé") + ".";

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, "box 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

Créé par MOI avec EclipseCrossword © 2000-2005

Bienvenue!

Cliquez un case dans le mot croisé pour commencer.

Résoudre

OK  

Annuler

Félécitation!

Vous avez terminé ce mot croisé.

Si vous souhaitez créer vous-même d'autres

mots croisés

comme celui-ci, allez à EclipseCrossword

de Green Eclipse— c'est gratuit!

Corriger

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download