		var sUnsolvedSudoku
		var sSolvedSudoku
		var sStyle
		var sHeader
		var sTodaysDate
		var d_names = new Array("Sunday", "Monday", "Tuesday","Wednesday", "Thursday", "Friday", "Saturday");
		var d = new Date();
		var curr_day = d.getDay();
		var curr_date = d.getDate();
		var curr_month = d.getMonth() + 1;
		var curr_year = d.getFullYear();

		var sQueryString = unescape(location.search);
		var sDiff;
		var sLongDiff;


		sDiff = 'E';
		sSourceName = sDiff + curr_date + "-" + curr_month + "-" + curr_year +".js";
		sTodaysDate = d_names[curr_day] + ' ' + curr_date + '/' + curr_month + '/' + curr_year
		
		if (sQueryString)
			{
			if (sQueryString.split("=")[0].toUpperCase()=="?GO")
				{
				sQueryString= sQueryString.split("=")[1];
				sDiff= sQueryString.substring(0,1);
				sTodaysDate = sQueryString.substring(1);
				sSourceName = sDiff + sTodaysDate  + '.js';
				}
			}

		switch (sDiff) {
			case 'E' : sLongDiff='Easy';break;
			case 'M' : sLongDiff='Medium';break;
			case 'H' : sLongDiff='Hard';break;
			}

		sStyle = "<style> div {font-family:Verdana,Arial, Helvetica, sans-serif; font-size:11px; }	table.sudokutable {BORDER-COLLAPSE: collapse; width:100%;height:100%; cellSpacing:1; cellPadding:1 ;text-align:center}	.bdr00 {width:11%;border-top:2px solid black; border-bottom:1px solid black;border-left:2px solid black; border-right:1px solid black}	.bdr10 {width:11%;border-top:2px solid black; border-bottom:1px solid black;border-left:1px solid black; border-right:1px solid black}	.bdr20 {width:11%;border-top:2px solid black; border-bottom:1px solid black;border-left:1px solid black; border-right:2px solid black}	.bdr01 {width:11%;border-top:1px solid black; border-bottom:1px solid black;border-left:2px solid black; border-right:1px solid black}	.bdr11 {width:11%;border-top:1px solid black; border-bottom:1px solid black;border-left:1px solid black; border-right:1px solid black}	.bdr21 {width:11%;border-top:1px solid black; border-bottom:1px solid black;border-left:1px solid black; border-right:2px solid black}	.bdr02 {width:11%;border-top:1px solid black; border-bottom:2px solid black;border-left:2px solid black; border-right:1px solid black}	.bdr12 {width:11%;border-top:1px solid black; border-bottom:2px solid black;border-left:1px solid black; border-right:1px solid black}	.bdr22 {width:11%;border-top:1px solid black; border-bottom:2px solid black;border-left:1px solid black; border-right:2px solid black}		</style>";
		sHeader = "<div style='width:100%;text-align:center'><b>Wordoku for " + sTodaysDate + "</b><br><br>";

function TellAFriend() {
var initialsubj="Check it out, Wordoku";
var initialmsg="Hi:\n Free Wordokus daily at \<A href='http://wordoku.biz'\>http://wordoku.biz\<\/A\>";
window.location = "mailto:?subject="+initialsubj+"&body="+initialmsg; }

			document.write( "\<SCRIPT" );
			document.write( '   LANGUAGE="JavaScript"' );
			document.write( "   SRC='DayFiles\\" + sSourceName + "'" );
			document.write( "\>" );
			document.write( "\</SCRIPT\>" );


function PrintPuzzle(bWithSolution)
{
	var sAllText
		
	sAllText = sStyle;
	sAllText = sAllText + ' ' + sHeader;
	sAllText = sAllText + ' <div style=width:330px;height:300px>' + sUnsolvedSudoku + '</div>';
	if (bWithSolution==true) 
		{
		sAllText = sAllText + '<div style=height:100px>&nbsp;</div><div style=width:330px;height:300px>' + sSolvedSudoku + '</div>';
		}
	sAllText = sAllText + '</div>';
	Win1=window.open('', target = '_Blank');
        Win1.document.open();
        Win1.document.writeln(sAllText);
        Win1.document.close();
}
