function TellAFriend() {

var initialmsg;
var initialsubj;

initialmsg="Hi:\n Free Sudokus daily at \<A href='http://sudoku.com.au'\>http://sudoku.com.au\<\/A\>";
initialsubj="Check it out - sudoku";

window.location = "mailto:?body="+initialmsg+"&subject="+initialsubj; }


	function PrintPuzzle(bWithSolution,UsePopUp)
		{
		var sAllText;
		var bSmallGrid;

		bSmallGrid = document.getElementById('gridsize_small').checked;		
		sDiffSetting=='E';

		sAllText = sStyle;
		if (sPrintDescription=='16x16')
			sAllText = sAllText.replace(/11%/g,'6%');

		sAllText = sAllText +   sHeader.replace('<b>Sudoku','<b>' + sPrintDescription + ' Sudoku');
		if (bSmallGrid==true)
			sAllText = sAllText + ' <div style=width:330px;height:300px>' + sUnsolvedSudoku + '</div>';
		else
			sAllText = sAllText + '<style> div#LargePrint table tr td { font-size:30px } </style> <div id=LargePrint style=' + String.fromCharCode(39) +'width:530px;height:500px' + String.fromCharCode(39) + '>' + sUnsolvedSudoku + '</div>';
			
		if (bWithSolution==true) 
			{
			if (bSmallGrid==true)
				sAllText = sAllText + '<div style=height:100px>&nbsp;</div><div style=width:330px;height:300px>' + sSolvedSudoku + '</div>';
			else
				sAllText = sAllText + '<div style=height:100px>&nbsp;</div><div style=width:200px;height:200px>' + sSolvedSudoku + '</div>';

			}
		sAllText = sAllText + '</div>';
		if (UsePopUp==true)
			{
			Win1=window.open('', target = '_Blank');
        		Win1.document.open();
        		Win1.document.writeln(sAllText);
        		Win1.document.close();
			} else
			{
        		document.open();
        		document.writeln(sAllText);
        		document.close();
			}
		}

function  DoLink()
{

var i = Math.floor(Math.random()*5)
i+=1;
sSourceName= sSourceName.split(".")[0];
window.location='Default.aspx?Go=E' + sSourceName + '&ID=' + i;

}

function  DoLinkDiffSetting(sDiff)
{

var i = Math.floor(Math.random()*5)
i+=1;
sSourceName= sSourceName.split(".")[0];
window.location='Default.aspx?Go=' + sDiff + sSourceName + '&ID=' + i;

}

