/**
 * Switch for multilingual form fields.
 * @param theSelect <select> object used for the switch
 */
function changeGroupLang(theSelect) {
	var group = theSelect.name;
	// Hide all blocks
	for (i = 0; i < theSelect.length; i++) {
		var optlang = theSelect.options[i].value;
		var div = document.getElementById(group+'_'+optlang+'_container');
		if (div) div.style.display = 'none';
	}
	// Show the current block
	var lang = theSelect.options[theSelect.selectedIndex].value;
	var div = document.getElementById(group+'_'+lang+'_container');
	if (div) div.style.display = 'block';
	// Fix for FCKeditor on Gecko browsers
	//var editor = FCKeditorAPI.GetInstance(group+'_'+lang);
	//if (editor) editor.EditorDocument.designMode = "on";
	// Save the state
	setLangCookie(group, lang);
	return true;
}
