var g_cellSelection="tiles",g_previousClassName="",g_keyCode,g_foundWords=[],g_missingWords=[],g_wordNum=wf_wordNum,g_xLast=g_boardLength/2-0.5;String.prototype.multipleReplace=function(a,b){for(var c=this;c.indexOf(a)!==-1;)c=c.replace(a,b);return c};function queryString(a){var b,c,d;b=decodeURIComponent(window.location.search.substring(1)).split("&");for(d=0;d<b.length;++d)if(c=b[d].split("="),c[0]===a)return c[1];return!1}
function scrollBarWidth(){document.body.style.overflow="hidden";var a=document.body.clientWidth;document.body.style.overflow="scroll";a-=document.body.clientWidth;a||(a=document.body.offsetWidth-document.body.clientWidth);document.body.style.overflow="";return a}
function print_r(a,b,c,d){d=d||0;b=b||10;c=c||" ";if(d>b)return"[WARNING: Too much recursion]\n";var e,f="",g=typeof x,h="";if(a===null)f+="(null)\n";else if(g==="object"){d++;for(e=0;e<d;e++)h+=c;a&&a.length&&(g="array");f+="("+g+") :\n";for(e in a)try{f+=h+"["+e+"] : "+print_r(a[e],b,c,d+1)}catch(j){return"[ERROR: "+j+"]\n"}}else g==="string"&&a===""&&(a="(empty)"),f+="("+g+") "+a+"\n";return f}var var_dump=print_r;
function setCookie(a,b,c){var d;d=new Date;d.setDate(d.getDate()+c);b=escape(b)+(c===null?"":"; expires="+d.toUTCString());document.cookie=a+"="+b}function deleteAllGameCookies(){var a,b,c;c=getCookieArray();for(a=0;a<c.length;++a)b=c[a],getCookieName(b)==="gameId"&&eraseCookie(cookieName);location.reload()}function getCookieName(a){a=a.substr(0,a.indexOf("="));return a=a.replace(/^\s+|\s+$/g,"")}function getCookieValue(a){a=a.substr(a.indexOf("=")+1);a=a.replace(/\+/g," ");return unescape(a)}
function getCookieArray(){return document.cookie.split(";")}function getCookie(a){var b,c,d;d=getCookieArray();for(b=0;b<d.length;++b)if(c=d[b],getCookieName(c)===a)return getCookieValue(c);return null}function eraseCookie(a){setCookie(a,"",-1)}function GameIdInformation(a,b,c,d,e,f,g,h,j,k){this.gameId=a;this.game=b;this.layout=c;this.tiles=d;this.board=e;this.lexicon=f;this.wordNum=parseInt(g);this.foundWord=h;this.foundWordScore=j;this.dateTime=new Date(k)}
Function.prototype.defaults=function(){var a,b;a=this;b=Array(a.length-arguments.length).concat(Array.prototype.slice.apply(arguments));return function(){return a.apply(a,Array.prototype.slice.apply(arguments).concat(b.slice(arguments.length,b.length)))}};function Enum(){}Enum.Color={white:"0",yellow:"1",red:"2"};Enum.Direction={right:"0",down:"1"};Enum.Premium={ctr:"0",dls:"1",dws:"2",tls:"3",tws:"4",qls:"5",qws:"6",spc:" ",gen:"8"};
var PremiumColors=[ctr_color,dls_color,dws_color,tls_color,tws_color,qls_color,qws_color,nul_color,gen_color];function Word(a,b,c,d,e){this.value=a;this.word=b;this.x=c;this.y=d;this.direction=e}
if(wf_foundWords!==""){var i,g_foundWords_array=wf_foundWords.split(" ");for(i=0;i<g_foundWords_array.length;){var value=g_foundWords_array[i++],word=g_foundWords_array[i++],x=parseInt(g_foundWords_array[i++],10),y=parseInt(g_foundWords_array[i++],10),direction=g_foundWords_array[i++]==="0"?Enum.Direction.right:Enum.Direction.down;g_foundWords[i/5-1]=new Word(value,word,x,y,direction)}}
if(wf_missingWords!==""){var g_missingWords_array=wf_missingWords.split(" ");for(i=0;i<g_missingWords_array.length;)value=null,word=g_missingWords_array[i++],x=parseInt(g_missingWords_array[i++],10),y=parseInt(g_missingWords_array[i++],10),direction=g_missingWords_array[i++]==="0"?Enum.Direction.right:Enum.Direction.down,g_missingWords[i/4-1]=new Word(value,word,x,y,direction)}function Square(a){var b;this.letter="";this.premium=Enum.Premium.gen;if(typeof a!=="undefined")for(b in a)this[b]=a[b]}
function Board(){var a,b,c;this.squares=[];for(a=0;a<g_boardLength;++a){this.squares[a]=[];for(b=0;b<g_boardLength;++b)c=wf_board[b*g_boardLength+a],"a"<=c&&c<="z"||"A"<=c&&c<="Z"||(c=""),this.squares[a][b]=new Square({letter:c,premium:premiums.charAt(b*g_boardLength+a)})}}var g_board=new Board;
function addHighlight(a,b){var c,d,e;c=a.x;d=a.y;for(e=0;e<a.word.length;++e)document.getElementById("div"+c+"."+d).className="highlighted",document.getElementById("div"+c+"."+d).style.backgroundColor=b,a.direction===Enum.Direction.right?++c:++d}
function addWordAndBorderAndHighlight(a,b){if(a){var c,d,e;addHighlight(a,b);c=a.x;d=a.y;for(e=0;e<a.word.length;++e)document.getElementById("cell"+c+"."+d).value=a.word.charAt(e),a.direction===Enum.Direction.right?e===0?document.getElementById("cell"+c+"."+d).className="highlightedSquareL":e===a.word.length-1?document.getElementById("cell"+c+"."+d).className="highlightedSquareR":document.getElementById("cell"+c+"."+d).className="highlightedSquareMR":e===0?document.getElementById("cell"+c+"."+d).className=
"highlightedSquareT":e===a.word.length-1?document.getElementById("cell"+c+"."+d).className="highlightedSquareB":document.getElementById("cell"+c+"."+d).className="highlightedSquareMD",a.direction===Enum.Direction.right?++c:++d}else console.warn("addWordAndBorderAndHighlight(wordObject, color): wordObject is null, returning.")}
function removeBorder(a){var b,c,d,e,f;b=g_foundWords[g_wordNum];a!==void 0&&(c=g_foundWords[a]);d=b.x;e=b.y;for(f=0;f<b.word.length;++f){if(a===void 0||!(c.direction===Enum.Direction.right&&e===c.y&&d>=c.x&&d<c.x+c.word.length)||!(c.direction===Enum.Direction.down&&d===c.x&&e>=c.y&&e<c.y+c.word.length))document.getElementById("cell"+d+"."+e).className="square";b.direction===Enum.Direction.right?++d:++e}}
function removeHighlight(a,b){var c,d;c=document.getElementById("div"+a+"."+b);(d=PremiumColors[g_board.squares[a][b].premium])||(d="#FFFFFF");c.className="notHighlighted";c.style.backgroundColor=d}
function removeBorderAndHighlight(a){var b,c,d,e,f;b=g_foundWords[g_wordNum];a!==void 0&&(c=g_foundWords[a]);removeBorder(a);d=b.x;e=b.y;for(f=0;f<b.word.length;++f)(a===void 0||!(c.direction===Enum.Direction.right&&e===c.y&&d>=c.x&&d<c.x+c.word.length)||!(c.direction===Enum.Direction.down&&d===c.x&&e>=c.y&&e<c.y+c.word.length))&&removeHighlight(d,e),b.direction===Enum.Direction.right?++d:++e}
function moveLeft(){var a,b;a=parseInt(g_cellSelection.substr(4).split(".")[0],10);b=parseInt(g_cellSelection.substr(4).split(".")[1],10);document.getElementById(g_cellSelection="cell"+(a+g_boardLength-1)%g_boardLength+"."+b).focus()}function moveRight(){var a,b;a=parseInt(g_cellSelection.substr(4).split(".")[0],10);b=parseInt(g_cellSelection.substr(4).split(".")[1],10);document.getElementById(g_cellSelection="cell"+(a+1)%g_boardLength+"."+b).focus()}
function moveUp(){var a,b;g_cellSelection==="tiles"?document.getElementById(g_cellSelection="cell"+g_xLast+"."+(g_boardLength-1)).focus():(a=parseInt(g_cellSelection.substr(4).split(".")[0],10),b=parseInt(g_cellSelection.substr(4).split(".")[1],10),g_xLast=a,b===0?document.getElementById(g_cellSelection="tiles").focus():document.getElementById(g_cellSelection="cell"+g_xLast+"."+(b-1)).focus())}
function moveDown(){var a,b;g_cellSelection==="tiles"?document.getElementById(g_cellSelection="cell"+g_xLast+".0").focus():(a=parseInt(g_cellSelection.substr(4).split(".")[0],10),b=parseInt(g_cellSelection.substr(4).split(".")[1],10),g_xLast=a,b===g_boardLength-1?document.getElementById(g_cellSelection="tiles").focus():document.getElementById(g_cellSelection="cell"+g_xLast+"."+(b+1)).focus())}
document.onkeydown=function(a){var b;if(!a)a=window.event;a.which?g_keyCode=a.which:a.keyCode?g_keyCode=a.keyCode:window.alert("Exception: function keyDown()");if(!a.ctrlKey&&!a.altKey){if(g_keyCode>=48&&g_keyCode<=57)return!1;if(g_keyCode===96||g_keyCode===101)return!1;if(37<=g_keyCode&&g_keyCode<=40||65<=g_keyCode&&g_keyCode<=90||g_keyCode===8||g_keyCode===46||g_keyCode===98||g_keyCode===100||g_keyCode===102||g_keyCode===104||g_keyCode===97||g_keyCode===99||g_keyCode===103||g_keyCode===105||g_keyCode===
35||g_keyCode===34||g_keyCode===36||g_keyCode===33){if(a.target&&a.target.name)b=a.target.name;else if(a.srcElement&&a.srcElement.name)b=a.srcElement.name;b||document.getElementById(g_cellSelection).focus();if(!(g_cellSelection==="tiles"&&(g_keyCode===37||g_keyCode===39||g_keyCode===100||g_keyCode===102)))if(g_cellSelection!=="tiles"&&(g_keyCode>=65&&g_keyCode<=90||g_keyCode===8||g_keyCode===46)){if(g_keyCode>=65&&g_keyCode<=90)a.shiftKey?document.getElementById(g_cellSelection).value=String.fromCharCode(g_keyCode):
document.getElementById(g_cellSelection).value=String.fromCharCode(g_keyCode).toLowerCase();if(g_keyCode===8||g_keyCode===46)document.getElementById(g_cellSelection).value="";page==="game"&&(document.getElementById(g_cellSelection).blur(),x=parseInt(g_cellSelection.substr(4).split(".")[0],10),y=parseInt(g_cellSelection.substr(4).split(".")[1],10),removeHighlight(x,y),g_foundWords[g_wordNum].direction===Enum.Direction.right?y===g_foundWords[g_wordNum].y&&x>=g_foundWords[g_wordNum].x&&x<g_foundWords[g_wordNum].x+
g_foundWords[g_wordNum].word.length&&removeBorder():x===g_foundWords[g_wordNum].x&&y>=g_foundWords[g_wordNum].y&&y<g_foundWords[g_wordNum].y+g_foundWords[g_wordNum].word.length&&removeBorder(),document.getElementById(g_cellSelection).focus())}else if(g_keyCode===37||g_keyCode===100)return moveLeft(),!1;else if(g_keyCode===38||g_keyCode===104)return moveUp(),!1;else if(g_keyCode===39||g_keyCode===102)return moveRight(),!1;else if(g_keyCode===40||g_keyCode===98)return moveDown(),!1;else if(g_keyCode===
97||g_keyCode===35)return moveDown(),moveLeft(),!1;else if(g_keyCode===99||g_keyCode===34)return moveDown(),moveRight(),!1;else if(g_keyCode===103||g_keyCode===36)return moveUp(),moveLeft(),!1;else if(g_keyCode===105||g_keyCode===33)return moveUp(),moveRight(),!1}}};function verifyNotAllUppercase(){return!0}function numberOfBlankTiles(){var a,b,c;a=document.getElementById("tiles").value;for(c=b=0;c<a.length;++c)(a.charAt(c)<"a"||a.charAt(c)>"z")&&(a.charAt(c)<"A"||a.charAt(c)>"Z")&&++b;return b}
function enableFormButtons(){document.getElementById("search").disabled=!1;document.getElementById("clear").disabled=!1;return!0}function disableFormButtons(){document.getElementById("search").disabled=!0;return document.getElementById("clear").disabled=!0}
function verify(){if(document.getElementById("tiles").value===""||numberOfBlankTiles()>2||!verifyNotAllUppercase())return numberOfBlankTiles()>2&&window.alert("A maximum of two blank tiles may be input."),Effect.Shake("divLowerBoardInput",{duration:0.5,distance:10}),Effect.Pulsate("tiles",{duration:1.5,pulses:5}),new Effect.Highlight("tiles",{duration:5,startcolor:"#ff9999",endcolor:"#ffffff",restorecolor:"#ffffff"}),document.getElementById("tiles").focus(),!1;disableFormButtons();return!0}
var MOVING_DOT_UPDATE_DELAY_IN_MILLISECONDS=333,TOTAL_DOTS=4;function movingDots(a){var b,a=a===void 0?0:parseInt(a,10);for(b=1;b<=TOTAL_DOTS;++b)b<=a?document.getElementById("spanDot"+b).style.visibility="visible":document.getElementById("spanDot"+b).style.visibility="hidden";setTimeout("movingDots("+(a+1)%(TOTAL_DOTS+1)+")",MOVING_DOT_UPDATE_DELAY_IN_MILLISECONDS)}
function displayPleaseWait(){var a,b;a=[];numberOfBlankTiles()===2?a.push('<span class="overlay">Wow, you have two blank tiles!<br /><br />Searching</span>'):a.push('<span class="overlay">Searching</span>');for(b=1;b<=TOTAL_DOTS;++b)a.push('<span id="spanDot'+b+'" class="overlay">.</span>');document.getElementById("divCenteredInnerWrapper").innerHTML=a.join("");movingDots()}
function deleteGameId(a){var b,c,d;getCookie("gameId")===a&&eraseCookie("gameId");b=getCookie("gameIds");b=b.replace(a,"").replace("  "," ").replace(/^\s+|\s+$/g,"");setCookie("gameIds",b,365);b=document.cookie.split(";");for(c=0;c<b.length;++c)d=b[c].split("=")[0].replace(/^\s+|\s+$/g,""),d.substr(0,a.length+7)==="gameId_"+a&&eraseCookie(d)}
function addAllMissingGameCookies(){var a,b,c,d;d=!1;c=getCookieArray();for(a=0;a<c.length;++a)b=c[a],b=getCookieName(b),b.substring(0,7)==="gameId_"&&addGameIdToGameIdsIfDoesntExist(b.substring(7,20))===!0&&(d=!0);d===!0&&location.reload()}
function addGameIdToGameIdsIfDoesntExist(a){gameIdsString=getCookie("gameIds");if(gameIdsString!==null&&gameIdsString!==""){gameIdsArray=gameIdsString.split(" ");if(gameIdsArray.indexOf(a)!==-1)return!1;setCookie("gameIds",gameIdsString+" "+a,365)}else setCookie("gameIds",a,365);return!0}function setGameId(a){setCookie("gameId",a,365);addGameIdToGameIdsIfDoesntExist(a)}function generateNewGameId(){return g_guidGenerated}
function getGameId(){if(getGameId.s_gameId===void 0&&(getGameId.s_gameId=getCookie("gameId"),getGameId.s_gameId===null))getGameId.s_gameId=generateNewGameId();return getGameId.s_gameId}
function getGameIdInformation(a){var b=null;return b=new GameIdInformation(a,getCookie("gameId_"+a+".game"),getCookie("gameId_"+a+".layout"),getCookie("gameId_"+a+".tiles"),getCookie("gameId_"+a+".board"),getCookie("gameId_"+a+".lexicon"),getCookie("gameId_"+a+".wordNum"),getCookie("gameId_"+a+".foundWord"),getCookie("gameId_"+a+".foundWordScore"),getCookie("gameId_"+a+".dateTime"))}
function setGameIdInformation(a,b,c,d,e,f,g,h,j){e.replace("-","")===""&&(h===null||h==="")||(a="gameId_"+a+".",b==getCookie(a+"game")&&c==getCookie(a+"layout")&&d==getCookie(a+"tiles")&&e==getCookie(a+"board")&&f==getCookie(a+"lexicon")&&g==getCookie(a+"wordNum")||(setCookie(a+"game",b,365),setCookie(a+"layout",c,365),setCookie(a+"tiles",d,365),setCookie(a+"board",e,365),setCookie(a+"lexicon",f,365),g!==void 0&&setCookie(a+"wordNum",g,365),h!==void 0&&setCookie(a+"foundWord",h,365),j!==void 0&&setCookie(a+
"foundWordScore",j,365),setCookie(a+"dateTime",new Date,365)))}
function submitBoard(){var a,b;if(verify())disableFormButtons();else return!1;a=[];for(y=0;y<g_boardLength;++y)for(x=0;x<g_boardLength;++x)document.getElementById("cell"+x+"."+y).value?a.push(document.getElementById("cell"+x+"."+y).value):a.push("-");a=a.join("");page==="main"&&setGameId(generateNewGameId());b=document.getElementById("tiles").value;displayPleaseWait();document.location.href="?game="+wf_game+"&layout="+wf_layout+"&tiles="+b+"&board="+a+"&lexicon="+wf_lexicon;return!0}
function clearBoard(){disableFormButtons();document.location.href="/"}function generateWordDefinition(){document.getElementById("tdWordDefinition").innerHTML='<iframe id="iframeWordDefinition" class="wordDefinition" height="385" width="180" allowtransparency="true" frameborder="0" src="define.php?word='+g_foundWords[g_wordNum].word.toLowerCase()+'"></iframe>';document.getElementById("iframeWordDefinition").height=document.getElementById("tdBoard").offsetHeight-2}
var g_wordDefinitionOn=!1,g_wordDefinitionGenerated=!1;function toggleDisplayOfWordDefinition(){g_wordDefinitionOn=!g_wordDefinitionOn;g_wordDefinitionGenerated||(g_wordDefinitionGenerated=!0,generateWordDefinition());g_wordDefinitionOn?document.getElementById("iframeWordDefinition").style.display="inline":document.getElementById("iframeWordDefinition").style.display="none"}
function generateBoard(){var a,b;g_board=new Board;a=[];a.push('<table id="tableBoard" class="board"><tbody>');for(y=0;y<g_boardLength;++y){a.push("<tr>");for(x=0;x<g_boardLength;++x){a.push("<td>");b=PremiumColors[g_board.squares[x][y].premium];switch(g_board.squares[x][y].premium){case Enum.Premium.ctr:case Enum.Premium.dls:case Enum.Premium.dws:case Enum.Premium.tls:case Enum.Premium.tws:case Enum.Premium.qls:case Enum.Premium.qws:a.push('<div class="premiumSquare" style="background-color:'+b+
"; outline-color:"+b+';">');break;case Enum.Premium.spc:a.push('<div class="normalSquare"  style="background-color:'+b+';">');break;case Enum.Premium.gen:a.push('<div class="normalSquare"  style="background-color:'+b+"; outline-color:"+b+';">');break;default:console.error("Exception: printBoardAndWordInfo() - switch (g_board.squares[x][y].premium)")}a.push('<div class="notHighlighted" id="div'+x+"."+y+'">');a.push('<input class="square" type="text" size="1" maxlength="1" id="cell'+x+"."+y+'" name="cell'+
x+"."+y+'" value="" autocomplete="off" onkeydown="this.select();" onkeyup="this.select();" onmouseup="if (g_cellSelection === \'cell'+x+"."+y+"') this.select();\" onfocus=\"g_previousClassName = this.className; this.className = 'focusedSquare'; g_cellSelection = 'cell"+x+"."+y+'\'; this.select();" onblur="this.className = g_previousClassName;" />');a.push("</div>");a.push("</div></td>")}a.push("</tr>")}a.push("</tbody></table>");document.getElementById("tdBoard").innerHTML=a.join("")}
var g_boardGenerated=!1;
function displayBoardAndWordInfo(){g_boardGenerated||(g_boardGenerated=!0,generateBoard());if(page==="game"){var a,b,c;a=[];for(b=0;b<g_missingWords.length;++b)a.push('<h2>Warning: "<span class="redBackground lighterLinkColor">'+g_missingWords[b].word+'</span>" is invalid.</h2>');g_foundWords.length!==0?(document.title="Lexical Word Finder - "+wf_game.multipleReplace("_"," ")+" - "+g_foundWords[g_wordNum].word+" for "+g_foundWords[g_wordNum].value+" points",a.push('<h2>Played "<a href="#" onclick="toggleDisplayOfWordDefinition(); return false;"'+(g_missingWords.length!==
0?' class="yellowBackground">':">")+g_foundWords[g_wordNum].word+'</a>" for '+g_foundWords[g_wordNum].value+' points. [<a href="#" onclick="toggleDisplayOfMoreResults(); return false;">more...</a>]</h2>')):a.push("<h2>No words found!</h2>");document.getElementById("captionWordPlayed").innerHTML=a.join("");for(a=0;a<g_boardLength;++a)for(b=0;b<g_boardLength;++b)document.getElementById("cell"+b+"."+a).value=g_board.squares[b][a].letter;for(a=0;a<g_missingWords.length;++a){c=g_missingWords[a];for(b=
0;b<c.word.length;++b)addHighlight(c,color_r)}addWordAndBorderAndHighlight(g_foundWords[g_wordNum],color_y);wf_save&&setGameIdInformation(getGameId(),wf_game,wf_layout,wf_tiles,wf_board,wf_lexicon,g_wordNum,g_foundWords[g_wordNum].word,g_foundWords[g_wordNum].value)}g_wordDefinitionOn=g_wordDefinitionGenerated=!1}function linkToSelectedWord(){document.location.href="?game="+wf_game+"&layout="+wf_layout+"&tiles="+wf_tiles+"&board="+wf_board+"&lexicon="+wf_lexicon+"&word="+(g_wordNum+1)}
function generateMoreResults(){var a,b,c,d,e;document.getElementById("tdMoreWords").innerHTML='<\!--div id="divMoreResults" style="display:none;"><div--\><iframe id="iframeMoreWords" height="385" width="180" allowtransparency="true" frameborder="0"></iframe><\!--/div></div--\>';a=document.getElementById("iframeMoreWords");b=a.contentDocument;if(b===void 0||b===null)b=a.contentWindow.document;b.open();c=wf_foundWords.split(" ");d=0;e=document.location.host==="www.lexicalwordfinder.com"?"//static.lexicalwordfinder.com":
"";b.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');b.writeln('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">');b.writeln("<head>");b.writeln("<title>Lexical Word Finder - "+wf_game.multipleReplace("_"," ")+" - Top "+c.length/5+" Words</title>");b.writeln('<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />');b.writeln('<link rel="stylesheet" type="text/css" href="'+e+'/includes/style.css" />');
b.writeln("<![if !IE]>");b.writeln('<script type="text/javascript" src="'+e+'/includes/jquery/jquery-1.4.1.min-v20100130.1.js"><\/script>');b.writeln('<script type="text/javascript" src="'+e+'/includes/tablesorter/jquery.tablesorter.min-v20100114.1.js"><\/script>');b.writeln('<script type="text/javascript">');b.writeln("$(document).ready(function()");b.writeln("{");b.writeln('\t$("#tableMoreWords").tablesorter(');b.writeln("\t{");b.writeln('\t\twidgets: ["zebra"]');b.writeln("\t});");e=scrollBarWidth(window);
b.writeln('\tparent.document.getElementById("iframeMoreWords").width = '+(e&&e!==0?e:"17")+' + document.getElementById("tableMoreWords").offsetWidth;');b.writeln("}); ");b.writeln("<\/script>");b.writeln("<![endif]>");b.writeln("</head>");b.writeln('<body class="moreWords lighterLinks">');b.writeln('<table id="tableMoreWords">');b.writeln('<thead title="Hold SHIFT to sort multiple columns."><tr><\!-- th><big><a href="#" onclick="return false;">#<span></span></a></big></th --\><th><big><a href="#" onclick="return false;">&#9733;<span></span></a></big></th><th style="text-align:left;"><big><a href="#" onclick="return false;">word<span></span></a></big></th><th><big><a href="#" onclick="return false;">x<span></span></a></big></th><th><big><a href="#" onclick="return false;">y<span></span></a></big></th><th><big><a href="#" onclick="return false;">&darr;<span></span></a></big></th></tr></thead>');
for(b.writeln("<tbody>");d<c.length;)b.writeln('<tr onmouseover="parent.document.getElementById(parent.g_cellSelection).blur(); parent.removeBorderAndHighlight('+d/5+"); parent.g_wordNum="+d/5+'; parent.displayBoardAndWordInfo();" onclick="parent.g_wordNum='+d/5+'; parent.linkToSelectedWord();">'),b.writeln("<td>"+c[d++]+"</td>"),b.writeln("<td>"+c[d++]+"</td>"),b.writeln("<td>"+ ++c[d++]+"</td>"),b.writeln("<td>"+(g_boardLength-c[d++])+"</td>"),c[d++]==="0"?b.writeln("<td>&rarr;</td>"):b.writeln("<td>&darr;</td>"),
b.writeln("</tr>");b.writeln("</tbody>");b.writeln("</table>");b.writeln("</body>");b.writeln("</html>");b.close();a.height=document.getElementById("tdBoard").offsetHeight-2}var g_moreResultsOn=!1,g_moreResultsGenerated=!1;
function toggleDisplayOfMoreResults(){g_moreResultsOn=!g_moreResultsOn;g_moreResultsGenerated||(g_moreResultsGenerated=!0,generateMoreResults());g_moreResultsOn?document.getElementById("iframeMoreWords").style.display="inline":document.getElementById("iframeMoreWords").style.display="none"}function pad2(a){return(a<10?"0":"")+a}
function displaySavedGames(){var a,b,c,d,e;a=[];b=getCookie("gameIds");if(b!==null&&b!==""){a.push('<table id="tableSavedGames" width="100%">');a.push('<thead title="Hold SHIFT to sort multiple columns."><tr><th><big><a href="#" onclick="return false;">Game<span></span></a></big></th><th style="text-align:left;"><big><a href="#" onclick="return false;">Word<span></span></a></big></th><th><big><a href="#" onclick="return false;">Value<span></span></a></big></th><th><big><a href="#" onclick="return false;">Date Last Played<span></span></a></big></th><th><big><a href="#" onclick="return false;">Delete?<span></span></a></big></th></tr></thead>');a.push("<tbody>");
c=b.split(" ");for(b=0;b<c.length;++b){d=getGameIdInformation(c[b]);var f="setGameId('"+d.gameId+"'); document.location.href = '?game="+d.game+"&layout="+d.layout+"&tiles="+d.tiles+"&board="+d.board+"&lexicon="+d.lexicon+"&word="+(d.wordNum+1)+"&save=0';";a.push("<tr>");a.push('<td onclick="'+f+'">'+(d.game===null?d.game:d.game.replace(/_/g," ").replace("Words With Friends","WWF"))+"</td>");a.push('<td onclick="'+f+'">'+d.foundWord+"</td>");a.push('<td onclick="'+f+'">'+d.foundWordScore+"</td>");
e=d.dateTime;a.push('<td onclick="'+f+'">'+e.getFullYear()+"-"+pad2(e.getMonth()+1)+"-"+pad2(e.getDate())+" "+pad2(e.getHours())+":"+pad2(e.getMinutes())+"</td>");a.push('<td class="deleteGame" onclick="deleteGameId(\''+d.gameId+"'); location.reload();\">delete</td>");a.push("</tr>")}a.push("</tbody>");a.push("</table>")}document.getElementById("divSavedGames").innerHTML=a.join("")}
function setGooglePlusOneVisibility(a){var b;b=document.getElementById("divGooglePlusOne");typeof a==="undefined"&&(a=getCookie("googlePlusOne")==="on"?"hidden":"visibile",b=document.getElementById("divGooglePlusOne"));if(b!==null&&a==="hidden")b.innerHTML=""}function googlePlusOneCallback(a){setCookie("googlePlusOne",a.state,3650);if(a.state==="on"&&(setGooglePlusOneVisibility("hidden"),a=document.getElementById("divGooglePlusOne"),typeof a!=="undefined"))a.innerHTML="Thanks! :)"};
