<!--

	function validateRequest()
	{
		//check if a "group by" category has been selected
//		if(typeof(document.optionForm.answerSortOrGroup) != "undefined")
//		{
//			if( (document.optionForm.answerSortOrGroup[1].checked )
//				&& (document.optionForm.answerGroupBy.selectedIndex == 0 ) )
//			{
//				doAlert('selectGroup');
//				document.optionForm.answerGroupBy.focus();
//				return false;
//			}
//		}

		return true;
	}

	function submitOptions()
	{
		if(validateRequest())
			document.optionForm.submit();
	}

	function restoreDefaults()	{
			document.optionForm.restoreDefaultValues.value='true';
			document.optionForm.submit();
	}

	function cancelEdit()	{
			document.optionForm.reset();
			document.optionForm.targetPage.value='cancel';
			document.optionForm.submit();
	}

	function updateSourceLanguage() {
	   if( document.optionForm.sourceLang ) {
	      var uiOpts = document.optionForm.uiLang.options;
	      var text2find = uiOpts[ document.optionForm.uiLang.selectedIndex ].text;
	      var sourceOpts = document.optionForm.sourceLang.options;
	      for( var i = 0; i < sourceOpts.length; i++ ) {
	         if( sourceOpts[ i ].text == text2find ) {
	            sourceOpts.selectedIndex = i;
	            updateTargetLanguage();
	            break;
	         }
	      }
	   }
	}

	function updateTargetLanguage() {
	   if( document.optionForm.targetLang && document.optionForm.targetLang.value != "all" ) {
	      document.optionForm.targetLang.value = document.optionForm.sourceLang.value;
	   }
	}
//-->