function createInput(tdID,row,col) 
{
	var input = document.createElement('input');
	input.setAttribute('type','text');
	input.setAttribute('value',$(tdID).firstChild.nodeValue.strip());
	input.setAttribute('id','input'+row+'_'+col);
	input.observe('blur', function () {
		new Ajax.Request('/sudoku/move', {
			method: 'get',
			parameters: {row: row, col: col, value: $('input'+row+'_'+col).value},
			onSuccess: function(response) {
				Element.replace($('cell'+row+'_'+col),response.responseText);
			}
			})
		}
	);
	
	$(tdID).removeAttribute('onclick');
	$(tdID).toggleClassName('click');
	$(tdID).replaceChild(input,$(tdID).firstChild);
	$(tdID).firstChild.focus();
}

function alert_invalid_move (row,col) 
{
	var td = $('cell'+row+'_'+col);
	$('invalid_move').style.top = (td.offsetTop - $('invalid_move').offsetTop + 70) + 'px';
	$('invalid_move').style.left = (td.offsetLeft - $('invalid_move').offsetLeft + 35) + 'px';
	$('invalid_move').show();
	var f = new Effect.Fade('invalid_move', { duration: 1.5 });
}