//
// $Id: AIC.js,v 1.3 2008/10/11 12:45:32 pwh Exp $%
//
// Interactive example for AIC page.
//

var exActive = false
var commentsA = new Array ()

commentsA [0] = 'Press the &ldquo;Next step&rdquo; button to begin the AIC example.'
commentsA [1] = 'We shall prove that when <b>R5C3</b> is not <span class="cantBe">2</span> <b>R5C9</b> must be <span class="mustBe">2</span>, eliminating the possibility that <b>R5C2</b> could be <span class="never">2</span>.'
commentsA [2] = 'Begin by assuming <b>R5C3</b> is not <span class="cantBe">2</span>.'
commentsA [3] = 'If <b>R5C3</b> is not <span class="cantBe">2</span> then it must be <span class="mustBe">1</span>.'
commentsA [4] = 'If <b>R5C3</b> is <span class="mustBe">1</span> then <b>R5C9</b> and <b>R8C3</b> cannot be <span class="cantBe">1</span>.'
commentsA [5] = 'If <b>R8C3</b> is not <span class="cantBe">1</span> then <b>R8C3</b>, <b>R8C4</b>, <b>R8C5</b> and <b>R8C6</b> form a naked quad which must contain the digits <span class="mustBe">4</span>, <span class="mustBe">6</span>, <span class="mustBe">7</span> and <span class="mustBe">9</span>.'
commentsA [6] = 'If the naked quad at <b>R8C3</b>, <b>R8C4</b>, <b>R8C5</b> and <b>R8C6</b> must contain a <span class="mustBe">4</span>, then <b>R8C1</b> cannot be <span class="cantBe">4</span>.'
commentsA [7] = 'If <b>R8C1</b> cannot be <span class="cantBe">4</span> then it must be <span class="mustBe">8</span>'
commentsA [8] = 'If <b>R8C1</b> is <span class="mustBe">8</span> then <b>R5C1</b> cannot be <span class="cantBe">8</span>.'
commentsA [9] = 'If <b>R5C1</b> cannot be <span class="cantBe">8</span> then it must be <span class="mustBe">6</span>.'
commentsA [10] = 'If <b>R5C1</b> must be <span class="mustBe">6</span> then <b>R5C7</b> and <b>R5C8</b> cannot be <span class="cantBe">6</span>.'
commentsA [11] = 'If <b>R5C7</b> and <b>R5C8</b> cannot be <span class="cantBe">6</span> then <b>R5C7</b> and <b>R5C8</b> form a naked pair containing the digits <span class="mustBe">7</span> and <span class="mustBe">9</span>.'
commentsA [12] = 'If the naked pair at <b>R5C7</b> and <b>R5C8</b> must contain a <span class="mustBe">7</span> then <b>R5C9</b> cannot be <span class="cantBe">7</span>.'
commentsA [13] = 'If <b>R5C9</b> cannot be <span class="cantBe">7</span> and we have already shown that it cannot be <span class="cantBe">1</span> then it must be <span class="mustBe">2</span>.'
commentsA [14] = 'We have now shown that when <b>R5C3</b> is not <span class="cantBe">2</span> <b>R5C9</b> must be <span class="mustBe">2</span> so in no case can <b>R5C2</b> ever be <span class="never">2</span>.'

var actionsA = new Array ()

actionsA [1] = new Array ()
actionsA [1][0] = "R5C3 cantBe 2"
actionsA [1][1] = "R5C9 mustBe 2"
actionsA [1][2] = "R5C2 never 2"

actionsA [2] = new Array ()
actionsA [2][0] = "R5C9 blank 2"
actionsA [2][1] = "R5C2 blank 2"

actionsA [3] = new Array ()
actionsA [3][0] = "R5C3 mustBe 1"

actionsA [4] = new Array ()
actionsA [4][0] = "R5C9 cantBe 1"
actionsA [4][1] = "R8C3 cantBe 1"

actionsA [5] = new Array ()
actionsA [5][0] = "R8C3 mustBe 4"
actionsA [5][1] = "R8C3 mustBe 9"
actionsA [5][2] = "R8C4 mustBe 4"
actionsA [5][3] = "R8C4 mustBe 6"
actionsA [5][4] = "R8C4 mustBe 7"
actionsA [5][5] = "R8C5 mustBe 6"
actionsA [5][6] = "R8C5 mustBe 7"
actionsA [5][7] = "R8C5 mustBe 9"
actionsA [5][8] = "R8C6 mustBe 6"
actionsA [5][9] = "R8C6 mustBe 7"
actionsA [5][10] = "R8C6 mustBe 9"

actionsA [6] = new Array ()
actionsA [6][0] = "R8C1 cantBe 4"

actionsA [7] = new Array ()
actionsA [7][0] = "R8C1 mustBe 8"

actionsA [8] = new Array ()
actionsA [8][0] = "R5C1 cantBe 8"

actionsA [9] = new Array ()
actionsA [9][0] = "R5C1 mustBe 6"

actionsA [10] = new Array ()
actionsA [10][0] = "R5C7 cantBe 6"
actionsA [10][1] = "R5C8 cantBe 6"

actionsA [11] = new Array ()
actionsA [11][0] = "R5C7 mustBe 7"
actionsA [11][1] = "R5C7 mustBe 9"
actionsA [11][2] = "R5C8 mustBe 7"
actionsA [11][3] = "R5C8 mustBe 9"

actionsA [12] = new Array ()
actionsA [12][0] = "R5C9 cantBe 7"

actionsA [13] = new Array ()
actionsA [13][0] = "R5C9 mustBe 2"

actionsA [14] = new Array ()
actionsA [14][0] = "R5C2 never 2"

var A = new Example ( "A", commentsA, actionsA )

var commentsB = new Array ()

commentsB [0] = 'Press the &ldquo;Next step&rdquo; button to begin the AIC example.'
commentsB [1] = 'We shall prove that when <b>R6C1</b> is not <span class="cantBe">1</span> <b>R7C1</b> must be <span class="mustBe">1</span>, eliminating the possibility that <b>R5C1</b> or <b>R8C1</b> could be <span class="never">1</span>.'
commentsB [2] = 'Begin by assuming <b>R6C1</b> is not <span class="cantBe">1</span>.'
commentsB [3] = 'If <b>R6C1</b> is not <span class="cantBe">1</span> then <b>R6C8</b> must be <span class="mustBe">1</span>.'
commentsB [4] = 'If <b>R6C8</b> is <span class="mustBe">1</span> then <b>R7C8</b> cannot be <span class="cantBe">1</span>.'
commentsB [5] = 'If <b>R7C8</b> is not <span class="cantBe">1</span> then <b>R7C1</b> must be <span class="mustBe">1</span>.'
commentsB [6] = 'We have now shown that when <b>R6C1</b> is not <span class="cantBe">1</span> <b>R7C1</b> must be <span class="mustBe">1</span> so in no case can <b>R5C1</b> or <b>R8C1</b> ever be <span class="never">1</span>.'

var actionsB = new Array ()

actionsB [1] = new Array ()
actionsB [1][0] = "R6C1 cantBe 1"
actionsB [1][1] = "R7C1 mustBe 1"
actionsB [1][2] = "R5C1 never 1"
actionsB [1][3] = "R8C1 never 1"

actionsB [2] = new Array ()
actionsB [2][0] = "R7C1 blank 1"
actionsB [2][1] = "R5C1 blank 1"
actionsB [2][2] = "R8C1 blank 1"

actionsB [3] = new Array ()
actionsB [3][0] = "R6C8 mustBe 1"

actionsB [4] = new Array ()
actionsB [4][0] = "R7C8 cantBe 1"

actionsB [5] = new Array ()
actionsB [5][0] = "R7C1 mustBe 1"

actionsB [6] = new Array ()
actionsB [6][0] = "R5C1 never 1"
actionsB [6][1] = "R8C1 never 1"

var B = new Example ( "B", commentsB, actionsB )

