function enableDictionary() 
{
	var chkUseDictionary = document.getElementById("ctl00_PageContent_chkUseDictionary");
	if( chkUseDictionary != null )
	{
		var optUryuomocoToEnglish = document.getElementById("ctl00_PageContent_optUryuomocoToEnglish");
		chkUseDictionary.disabled = !optUryuomocoToEnglish.checked;					
	}
}
window.onload = enableDictionary;

function validate(evt)
{
	var txtInput = document.getElementById("ctl00_PageContent_txtInput");
	if( txtInput.value.length == 0 )
	{
		alert("Please enter some text to translate.");
		if( typeof(evt.preventDefault) == "function" )
			evt.preventDefault();
		else
			evt.returnValue = false;
	}
	else if( txtInput.value.length > 2000 )
	{
	    alert("The text may not be longer than 1000 characters.");
		if( typeof(evt.preventDefault) == "function" )
			evt.preventDefault();
		else
			evt.returnValue = false;
	}	    
}
