function closelink() {
	document.write('<p><i><a href="javascript:window.close()">' +
	  'Close window</a></i></p>');
}

function showanswer(name, width, height) {
	if(isNaN(parseInt(width))) width = 400;
	if(isNaN(parseInt(height))) height = 350;

	window.open(name + '.html', 'Answer',
	  'toolbar=no,menubar=no,resizable=yes,width=' + width + ',height='
	  + height).focus();
	return false;
}

function showapplet(puzzle) {
	window.open('matchapplet/matchapplet.html?' + puzzle, 'Applet',
	  'toolbar=no,menubar=no,width=616,height=440').focus();
}

function appletlink(puzzle) {
	if(navigator.javaEnabled()) {
		document.write('<a href="javascript:showapplet(\'' + puzzle
		  + '\');">Experiment</a> |');
	}
}
