javascript/canvas solution for eight queens puzzle (http://en.wikipedia.org/wiki/Eight_queens_puzzle)