Notă: După salvare, trebuie să treceți peste cache-ul browser-ului pentru a vedea modificările. Mozilla/Safari/Konqueror: țineți apăsat Shift în timp ce apăsați Reload (sau apăsați Ctrl-Shift-R), IE: apăsați Ctrl-F5, Opera: apăsați F5.

/** See talk page for details **/
 
//JsMwApi documentation is at http://en.wiktionary.org/wiki/User_talk:Conrad.Irwin/Api.js
function JsMwApi (api_url, request_type) {
 
	if (!api_url) 
	{
		if (typeof(true) === 'undefined' || true == false)
			throw "Local API is not usable.";
 
		api_url = wgScriptPath + "/api.php";
	}
 
	if (!request_type)
	{
		if (api_url.indexOf('http://') == 0 || api_url.indexOf('https://') == 0)
			request_type = "remote";
		else
			request_type = "local";
	}
	function call_api (query, callback)
	{
		if(!query || !callback)
			throw "Insufficient parameters for API call";
 
		query = serialise_query(query);
 
		if(request_type == "remote")
			request_remote(api_url, query, callback, call_api.on_error || default_on_error);
		else
			request_local(api_url, query, callback, call_api.on_error || default_on_error);
 
	}
 
	var default_on_error = JsMwApi.prototype.on_error || function (xhr, callback, res)
	{
		if (typeof(console) != 'undefined')
			console.log([xhr, res]);
 
		callback(null);
	}
 
	function get_xhr () 
	{
		try{
			return new XMLHttpRequest();
		}catch(e){ try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){ try {
			return new ActiveXObject("Microsoft.XMLHTTP");
		}catch(e){
			throw "Could not create an XmlHttpRequest";
		}}}
	}
 
	function request_local (url, query, callback, on_error)
	{
		var xhr = get_xhr();
 
		xhr.open('POST', url + '?format=json', true);
		xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                  
		xhr.send(query);
		xhr.onreadystatechange = function ()
		{
			if (xhr.readyState == 4)
			{
				var res;
				if (xhr.status != 200)
					res = {error: {
						code: '_badresponse', 
						info: xhr.status + " " + xhr.statusText
					}};
				else
				{
					try
					{
						res = JSON.parse("("+xhr.responseText+")");
					}
					catch(e)
					{
						res = {error: {
							code: '_badresult',
							info: "The server returned an incorrectly formatted response"
						}};
					}
				}
				if (!res || res.error /*|| res.warnings*/)
					on_error(xhr, callback, res);
				else
					callback(res);
			}
		}
	}
 
	function request_remote (url, query, callback, on_error)
	{
		if(! window.__JsMwApi__counter)
			window.__JsMwApi__counter = 0;
 
		var cbname = '__JsMwApi__callback' + window.__JsMwApi__counter++; 
 
		window[cbname] = function (res)
		{
			if (res.error || res.warnings)
				on_error(null, callback, res);
			else
				callback(res);
		}
 
		var script = document.createElement('script');
		script.setAttribute('type', 'text/javascript');
		script.setAttribute('src', url + '?format=json&callback=window.' + cbname + '&' + query);
		document.getElementsByTagName('head')[0].appendChild(script);
	}
 
	function serialise_query (obj)
	{
		var amp = "";
		var out = "";
		if (String(obj) === obj)
		{
			out = obj;
		}
		else if (obj instanceof Array)
		{
			for (var i=0; i < obj.length; i++)
			{
				out += amp + serialise_query(obj[i]);
				amp = (out == '' || out.charAt(out.length-1) == '&') ? '' : '&';
			}
		}
		else if (obj instanceof Object)
		{
			for (var k in obj)
			{
				if (obj[k] === true)
					out += amp + encodeURIComponent(k) + '=1';
				else if (obj[k] === false)
					continue;
				else if (obj[k] instanceof Array)
					out += amp + encodeURIComponent(k) + '=' + encodeURIComponent(obj[k].join('|'));
				else if (obj[k] instanceof Object)
					throw "API parameters may not be objects";
				else
					out += amp + encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);
				amp = '&';
			}
		}
		else if (typeof(obj) !== 'undefined' && obj !== null)
		{
			throw "An API query can only be a string or an object";
		}
		return out;
	}
 
	// Make JSON.parse work
	var JSON = (typeof JSON == 'undefined' ? new Object() : JSON);
 
	if (typeof JSON.parse != 'function')
		JSON.parse = function (json) { return eval('(' + json + ')'); };
 
	// Allow .prototype. extensions
	if (JsMwApi.prototype)
	{
		for (var i in JsMwApi.prototype)
		{
			call_api[i] = JsMwApi.prototype[i];
		}
	}
	return call_api;
}
 
JsMwApi.prototype.page = function (title) {
 
	function call_with_page (params, callback)
	{
		call_with_page.api([params, {title: title, titles: title}], callback);
	}
 
	call_with_page.api = this;
 
	call_with_page.edit = function (params, edit_function)
	{
		if (typeof(params) == 'function')
		{
			edit_function = params;
			params = null;
		}
		params = [params, {
			action: "query", 
			prop: ["info", "revisions"], 
			intoken: "edit", 
			rvprop: ["content", "timestamp"]
		}];
 
		call_with_page(params, function (res)
		{
			if (!res || !res.query || !res.query.pages)
				return edit_function(null);
 
			// Get the first (and only) page from res.query.pages
			for (var pageid in res.query.pages) break;
			var page = res.query.pages[pageid];
 
			var text = page.revisions ? page.revisions[0]['*'] : '';
 
			function save_function (ntext, params, post_save)
			{
				if (typeof(params) == 'function')
				{
					post_save = params;
					params = null;
				}
				params = [params, {
					action: "edit",
					text: ntext,
					token: page.edittoken,
					starttimestamp: page.starttimestamp,
					basetimestamp: (page.revisions ? page.revisions[0].timestamp : false)
				}];
 
				call_with_page(params, post_save);
			}
 
			edit_function(text, save_function, res);
 
		});
	}
 
	call_with_page.parse = function (to_parse, callback)
	{
		if (typeof to_parse == "function")
		{
			callback = to_parse;
			to_parse = null;
		}
		var params = (to_parse == null ? {page: title} : {title: title, text: to_parse});
 
		call_with_page.api([{action: "parse", pst: true}, params], function (res)
		{
			if (!res || !res.parse || !res.parse.text)
				callback(null, res);
			else
				callback(res.parse.text['*'], res);
		})
	}
 
	call_with_page.parseFragment = function (to_parse, callback)
	{
		call_with_page.parse("<div>\n" + to_parse + "</div>", function (parsed, res)
		{
			callback(parsed ? parsed.replace(/^<div>\n?/,'').replace(/(\s*\n)?<\/div>\n*(<!--[^>]*-->\s*)?$/,'') : parsed, res);
		})
	}
 
	return call_with_page;
}
/**
 * Storage of "string" preferences.
 */
function CookiePreferences (context)
{
	//Repeated calls with the same context should get the same preferences object.
	if (arguments.callee[context])
		return arguments.callee[context];
	else
		arguments.callee[context] = this;
 
	/**
	 * Change the value of a preference and store into a cookie.
	 */
	this.set = function (name, value)
	{
		if (value === null || storage[name] === value)
			return;
		storage[name] = value;
		updateCookie();
	}
 
	/**
	 * Get the value of a preference from the cookie or default
	 *
	 * If the preference isn't set, return the second argument or undefined.
	 */
	this.get = function (name, def)
	{
		if (storage[name])
			return storage[name];
		else if (defaults[name])
			return defaults[name];
		else
			return def;
	}
 
	/**
	 * let the default for get(name) be value for this session
	 */
	this.setDefault = function(name, value)
	{
		defaults[name] = value;
	}
 
	var storage = {};
	var defaults = {};
 
	// Save storage into the cookie.
	function updateCookie ()
	{
		var value = "";
		for (var name in storage)
		{
			value += '&' + encodeURIComponent(name) + "=" + encodeURIComponent(storage[name]);
		}
 
		setCookie('preferences' + context, value)
	}
	/* @deprecated: Use $.cookie instead */
	function setCookie(cookieName, cookieValue) {
		 var today = new Date();
		 var expire = new Date();
		 var nDays = 30;
		 expire.setTime( today.getTime() + (3600000 * 24 * nDays) );
		 document.cookie = cookieName + "=" + escape(cookieValue)
						 + ";path=/"
						 + ";expires="+expire.toGMTString();
		 // We need to delete the more specific paths for the next while. Safe to remove this by July 2011, if not before.
		 document.cookie = cookieName + "=" + ";path=/w" +
		  ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
		 document.cookie = cookieName + "=" + ";path=/wiki" +
		  ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
	}
 
	function getCookie(cookieName) {
		  var start = document.cookie.indexOf( cookieName + "=" );
		  if ( start == -1 ) return "";
		  var len = start + cookieName.length + 1;
		  if ( ( !start ) &&
			( cookieName != document.cookie.substring( 0, cookieName.length ) ) )
			  {
				return "";
			  }
		  var end = document.cookie.indexOf( ";", len );
		  if ( end == -1 ) end = document.cookie.length;
		  return unescape( document.cookie.substring( len, end ) );
	}
 
	function deleteCookie(cookieName) {
		  if ( getCookie(cookieName) ) {
			document.cookie = cookieName + "=" + ";path=/" +
			";expires=Thu, 01-Jan-1970 00:00:01 GMT";
		  }
	}
	// Load storage from the cookie.
	// NOTE: If you wish to update the cookie format, both loading and storing
	// must continue to work for 30 days.
	// function updateStorage ()
	// {
		// var value = getCookie('preferences' + context, value) || '';
		// var pairs = value.split('&');
 
		// for (var i=1; i < pairs.length; i++)
		// {
			// var val = pairs[i].split('=');
 
			// if (storage[val[0]] === val[1])
				// continue;
 
			// storage[val[0]] = val[1];
		// }
	// }
 
	//__init__
//	updateStorage();
}
/**
 * A generic page editor for the current page.
 *
 * This is a singleton and it displays a small interface in the top left after
 * the first edit has been registered.
 *
 * @public
 * this.page
 * this.addEdit
 * this.error
 *
 */
function Editor ()
{
	//Singleton
	if (arguments.callee.instance)
		return arguments.callee.instance
	else
		arguments.callee.instance = this;
 
	// @public - the JsMwApi object for the current page
	this.page = JsMwApi().page(wgPageName);
 
	// get the current text of the article and call the callback with it
	// NOTE: This function also acts as a loose non-re-entrant lock to protect currentText.
	this.withCurrentText = function(callback)
	{
		if (callbacks.length == 0)
		{
			callbacks = [callback];
			for (var i=0; i<callbacks.length; i++)
			{
				callbacks[i](currentText);
			}
			return callbacks = [];
		} 
 
		if (callbacks.length > 0) 
		{
			return callbacks.push(callback);
		}
 
		callbacks = [callback];
		thiz.page.edit(function (text, _save)
		{
			if (text === null)
				return thiz.error("Could not connect to server");
 
			currentText = originalText = text;
			saveCallback = _save;
 
			for (var i=0; i<callbacks.length; i++)
			{
				callbacks[i](currentText);
			}
			callbacks = [];
 
		});
	}
	// A decorator for withCurrentText
	function performSequentially(f)
	{
		return (function () 
		{
			var the_arguments = arguments;
			thiz.withCurrentText(function ()
			{
				f.apply(thiz, the_arguments);
			});
		});
	}
 
	// add an edit to the editstack
	function addEdit(edit, node, fromRedo)
	{
		withPresenceShowing(false, function ()
		{
			if (node)
			{
				nodestack.push(node);
				node.style.cssText = "border: 2px #00FF00 dashed;"
			}
 
			if (! fromRedo)
				redostack = [];
 
			var ntext = false;
			try
			{
				ntext = edit.edit(currentText);
 
				if (ntext && ntext != currentText)
				{
					edit.redo();
					currentText = ntext;
				}
				else
					return false;
			}
			catch (e)
			{
				this.error("ERROR:" + e);
			}
 
			editstack.push(edit);
		});
	}
	this.addEdit = performSequentially(addEdit);
 
	// display an error to the user
	this.error = function (message)
	{ 
		if (!errorlog)
		{
			errorlog = newNode('ul',{style: "background-color: #FFDDDD; margin: 0px -10px -10px -10px; padding: 10px;"});
			withPresenceShowing(true, function (presence)
			{
				presence.appendChild(errorlog);
			});
		}
		errorlog.appendChild(newNode('li', message));
	}
 
 
	var thiz = this; // this is set incorrectly when private functions are used as callbacks.
 
	var editstack = []; // A list of the edits that have been applied to get currentText
	var redostack = []; // A list of the edits that have been recently undone.
	var nodestack = []; // A lst of nodes to which we have added highlighting
	var callbacks = {}; // A list of onload callbacks (initially .length == undefined)
 
	var originalText = ""; // What was the contents of the page before we fiddled?
	var currentText = ""; // What is the contents now?
 
	var saveCallback; // The callback returned by the api's edit function to save.
 
	var errorlog; // The ul for sticking errors in.
	var savelog; // The ul for save messages.
 
	//Move an edit from the editstack to the redostack 
	function undo ()
	{
		if (editstack.length == 0)
			return false;
		var edit = editstack.pop();
		redostack.push(edit);
		edit.undo();
 
		var text = originalText;
		for (var i=0; i < editstack.length; i++)
		{
			var ntext = false;
			try
			{
				ntext = editstack[i].edit(text);
			}
			catch (e)
			{
				thiz.error("ERROR:" + e);
			}
			if (ntext && ntext != text)
			{
				text = ntext;
			}
			else
			{
				editstack[i].undo();
				editstack = editstack.splice(0, i);
				break;
			}
		}
		currentText = text;
		return true;
	}
	this.undo = performSequentially(undo);
 
	//Move an edit from the redostack to the editstack
	function redo ()
	{
		if (redostack.length == 0)
			return;
		var edit = redostack.pop();
		addEdit(edit, null, true);
	}
	this.redo = performSequentially(redo);
 
	function withPresenceShowing(broken, callback)
	{
		if (arguments.callee.presence)
		{
			arguments.callee.presence.style.display = "block";
			return callback(arguments.callee.presence);
		}
 
		var presence = newNode('div',{'style':"position: fixed; top:0px; left: 0px; background-color: #00FF00; z-index: 10;padding: 30px;"})
		//Fix fixed positioning for IE6/
		/*@cc_on
			@if (@_jscript_version <= 5.6)
				presence.style.cssText = "position: absolute; top: expression((dummy = (document.documentElement.scrollTop || document.body.scrollTop || 0)) + 'px'); background-color: #00FF00; z-index: 10000; padding: 30px;"
			@end
		@*/
		window.setTimeout(function () {
			presence.style.backgroundColor = "#CCCCFF";
			presence.style.padding = "10px";
		}, 400);
 
		presence.appendChild(newNode('div',{'style':"position: relative; top:0px; left:0px; margin: -10px; color: #0000FF;cursor:pointer;", click:performSequentially(close)},"X"))
		document.body.insertBefore(presence, document.body.firstChild);
 
		var contents = newNode('p', {style: 'text-align: center'},
			newNode('b', "Page Editing"), newNode('br'));
 
		if (!broken)
		{
			contents.appendChild(newNode('button',"Save Changes", {'title':'Salvează modificări ['+mw.util.tooltipAccessKeyPrefix+'s]','accesskey':'s','click': save}));
			contents.appendChild(newNode('br'));
			contents.appendChild(newNode('button',"Undo", {'title':'Undo last change ['+mw.util.tooltipAccessKeyPrefix+'z]','accesskey':'z','click': thiz.undo}));
			contents.appendChild(newNode('button', "Redo", {'click':thiz.redo}));
		}
		presence.appendChild(contents);
 
		arguments.callee.presence = presence;
		callback(presence);
	}
 
	// Remove the button
	function close ()
	{
		while (undo())
			;
 
		withPresenceShowing(true, function (presence)
		{
			presence.style.display = "none";
			if (errorlog)
			{
				errorlog.parentNode.removeChild(errorlog);
				errorlog = false;
			}
		});
	}
 
	//Send the currentText back to the server to save.
	function save ()
	{
		thiz.withCurrentText(function ()
		{
			if (editstack.length == 0)
				return;
 
			var cleanup_callbacks = callbacks;
			callbacks = [];
			var sum = {};
			for (var i=0; i<editstack.length; i++)
			{
				sum[editstack[i].summary] = true;
				if (editstack[i].after_save)
					cleanup_callbacks.push(editstack[i].after_save);
			}
			var summary = "";
			for (var name in sum)
			{
				summary += name + " ";
			}
			editstack = [];
			redostack = [];
			var saveLi = newNode('li', 'Salvare:' + summary + "...");
			withPresenceShowing(false, function (presence)
			{
				if (! savelog)
				{
					savelog = newNode('ul', {style: "background-color: #DDFFDD; margin: 0px -10px -10px -10px; padding: 10px;"});
					presence.appendChild(savelog);
				}
				savelog.appendChild(saveLi);
 
				if (originalText == currentText)
					return thiz.error("Nu au fost efectuate modificări.");
 
				else if (!currentText)
					return thiz.error("EROARE: pagina a devenit goală.");
			});
 
			originalText = currentText;
			var nst = []
			var node;
			while (node = nodestack.pop())
			{
				nst.push(node);
			}
			saveCallback(currentText, {summary: summary + "([[Wikționar:Modificare asistată|Asistat]])"}, function (res)
			{
				if (res == null)
					return thiz.error("A apărut o eroare în timpul salvării.");
 
				try {
					saveLi.appendChild(newNode('span', newNode('b', " Saved "),
						newNode('a', {'href': wgScript + 
						'?title=' + encodeURIComponent(mw.config.get('wgPageName')) + 
						'&diff=' + encodeURIComponent(res.edit.newrevid) +
						'&oldid=' + encodeURIComponent(res.edit.oldrevid)}, "(Arată diferențele)")));
				}catch(e){
					if (res.error)
					{
						thiz.error("Nesalvat: " + String(res.error.info));
					}
					else
					{
						thiz.error(newNode('p',String(e)));
					}
				}
 
				for (var i=0; i < nst.length; i++)
					nst[i].style.cssText = "background-color: #0F0;border: 2px #0F0 solid;";
 
				window.setTimeout(function () {
					var node;
					while (node = nst.pop())
						node.style.cssText = "";
				}, 400);
 
				// restore any callbacks that were waiting for currentText before we started
				for (var i=0; i < cleanup_callbacks.length; i++)
					thiz.withCurrentText(cleanup_callbacks[i]);
 
			});
		});
	}
}
 
var util = {
 
	getVanillaIndexOf: function (str, text, pos)
	{
		if (!pos)
			pos = 0;
		var cpos = 0, tpos = 0, wpos = 0, spos = 0;
		do
		{
			cpos = text.indexOf('<!--', pos);
			tpos = text.indexOf('{'+'{', pos);
			wpos = text.indexOf('<nowiki>', pos);
			spos = text.indexOf(str, pos);
 
			pos = Math.min(
				Math.min(
					cpos == -1 ? Infinity : cpos , 
					tpos == -1 ? Infinity : tpos
				), 
				Math.min(
					wpos == -1 ? Infinity : wpos,
					spos == -1 ? Infinity : spos
				)
			)
 
			if (pos == spos)
				return pos == Infinity ? -1 : pos;
 
			else if (pos == cpos)
				pos = text.indexOf('-->', pos) + 3;
 
			else if (pos == wpos)
				pos = text.indexOf('</nowiki>', pos) + 9;
 
			else if (pos == tpos) //FIXME
				pos = text.indexOf('}}', pos) + 2;
 
 
		} while (pos < Infinity)
		return -1;
	},
 
	validateNoWikisyntax: function(field, nonempty)
	{
		return function(txt, error)
		{
			if(/[\[\{\|#\}\]]/.test(txt))
				return error("Nu folosiți marcaje wiki ([]{}#|) în " + field +".");
			if(nonempty && !txt)
				return error("Specificați " + field + ".");
			return txt;
		}
	},
 
	escapeRe: function(txt)
	{
		return txt.replace(/([\\{}(\|)[\].?*+])/g, "\\$1");
	},
 
	// pos is a position in the line containing the gloss
	getWikitextGloss: function (txt, pos)
	{
		var g_start = txt.lastIndexOf('\n{'+'{(', pos) + 1; 
		var g_end = txt.indexOf('\n', pos);
		var g_line = txt.substr(g_start, g_end - g_start);
		g_line = g_line.replace("{"+"{(}}", "{"+"{(|Traduceri}}");
		return g_line.replace(/\{\{\(\|(.*)\}\}/, "$1");
	},
 
	// get [start_pos, end_pos] of position of wikitext for trans_table containing node in text
	getTransTable: function (text, node, recursive)
	{
		var gloss = util.getTransGloss(node);
		var pos = 0;
		var transect = [];
		while(pos > -1)
		{
			pos = util.getVanillaIndexOf('{'+'{(', text, pos+1)	// }}
			if (pos > -1 && util.matchGloss(util.getWikitextGloss(text, pos), gloss))
			{
				transect.push(pos);
			}
		}
		if (transect.length > 1)
		{
			var poss = transect;
			transect = [];
			for (var i=0; i<poss.length; i++)
			{
				pos = poss[i];
				if (util.matchGloss(gloss, util.getWikitextGloss(text, pos)))
				{
					transect.push(pos);
				}
			}
 
			if (transect.length > 1 && !recursive)
				transect = util.tieBreakTransTable(text, transect, node);
		}
		if (transect.length == 1)
		{
			pos = transect[0];
			pos = util.getVanillaIndexOf("\n", text, pos) + 1;
			var endpos = text.indexOf('{'+'{)}}', pos); 
			if (endpos > -1 && pos > 0)
				return [pos, endpos];
		}
 
		return false;
	},
 
	// try to narrow down the correct poss if multiple matching trans tables
	tieBreakTransTable: function (text, poss, node)
	{
		if (node.nodeName.toLowerCase() == 'div')
		{
			while (node && !(node.className && node.className.indexOf('NavFrame') > -1))
				node = node.parentNode;
 
			var nodes = node.getElementsByTagName('table');
			if (! nodes.length)
				return poss;
 
			node = nodes[0];
		}
		else
		{
			while (node && node.nodeName.toLowerCase() != 'table')
				node = node.parentNode;
		}
 
		var tables = document.getElementsByTagName('table');
		var before_count = 0;
		var after_count = 0;
		var is_found = false;
		for (var i=0; i < tables.length; i++)
		{
			if (tables[i].className.indexOf('translations') >= 0)
			{
				var gloss = util.getTransGloss(tables[i]);
				if (gloss == "Translations to be checked")
					continue;
 
				if (tables[i] == node)
				{
					is_found = true;
					continue;
				}
 
				var pos = util.getTransTable(text, tables[i], true);
 
				if (pos)
				{
					for (var j=0; j < poss.length; j++)
					{
						if (poss[j] == pos)
							return util.tieBreakTransTable(poss.splice(j, 1), node);
					}
				}
				else
				{
					var matched = 0;
					for (var j=0; j < poss.length; j++)
					{
						if (util.matchGloss(util.getWikitextGloss(text, poss[j]), gloss) &&
							 util.matchGloss(gloss, util.getWikitextGloss(text, poss[j])))
						{
							matched++;
						}
					}
					if (matched == poss.length) 
					{
						if (is_found)
							after_count++;
						else
							before_count++;
					}
				}
			}
		}
 
		if (before_count + 1 + after_count == poss.length)
			return [poss[before_count]];
		else
			return poss;
	},
 
	matchGloss: function (line, gloss)
	{
		if (gloss.match(/^ *$/))
			return !!(line.match(/\{\{\(\| *\}\}/) || line.match(/^ *$/));
 
		var words = gloss.split(/\W+/);
		var pos = 0;
		for (var i=0; i < words.length; i++)
		{
			pos = line.indexOf(words[i], pos);
			if (pos == -1)
				return false;
		}
		return pos > -1;
	},
 
	//User:Karelklic
	getTransGlossText: function (node) {
		var ret = '';
		var children = node.childNodes;
		for (var i=0; i<children.length; i++)
		{
			if (children[i].nodeType == 3)
				ret += children[i].nodeValue;
			else if (children[i].nodeName.match(/^(i|b)$/i) || children[i].className.indexOf('wt-edit-recurse') > -1)
				ret += util.getTransGlossText(children[i]);
			else if (ret.match(/\w$/)) //Prevent new words from being created across node boundaries
				ret += " ";
		}
		// all characters except a-zA-Z0-9 are changed to spaces
		return ret.replace(/\W/g, ' '); 
	},
 
	getTransGloss: function (ul)
	{
		var node = ul;
		while (node && node.className.indexOf('NavFrame') == -1)
			node = node.parentNode;
 
		if (!node) return ''; 
 
		var children = node.childNodes;
		for (var i=0; i< children.length; i++)
		{
			if(children[i].className && children[i].className.indexOf('NavHead') > -1)
				return util.getTransGlossText(children[i]);
 
		}
		return '';
	},
 
	isTrreq: function (li)
	{
		var spans = li.getElementsByTagName('span');
		return (spans && spans.length > 0 && spans[0].className.indexOf("trreq") > -1)
	}
};
 
/**
 * A small amount of common code that can be usefully applied to adder forms.
 *
 * An adder is assumed to be an object that has:
 *
 * .fields  A object mapping field names to either validation functions used
 *          for text fields, or the word 'checkbox'
 * 
 * .createForm  A function () that returns a newNode('form') to be added to the
 *              document (by appending to insertNode)
 * 
 * .onsubmit  A function (values, register (wikitext, callback)) that accepts 
 *            the validated set of values and processes them, the register
 *            function accepts wikitext and a continuation function to be 
 *            called with the result of rendering it.
 *
 * Before onsubmit or any validation functions are called, but after running
 * createForm, a new property .elements will be added to the adder which is a
 * dictionary mapping field names to HTML input elements.
 *
 * @param {editor}  The current editor.
 * @param {adder}  The relevant adder.
 * @param {insertNode}  Where to insert this in the document.
 * @param {insertSibling} Where to insert this within insertNode.
 */
function AdderWrapper (editor, adder, insertNode, insertSibling)
{
	var form = adder.createForm()
	var status = newNode('span');
 
	form.appendChild(status);
	if (insertSibling)
		insertNode.insertBefore(form, insertSibling);
	else
		insertNode.appendChild(form);
 
	adder.elements = {};
 
	//This is all because IE doesn't reliably allow form.elements['name']
	for (var i=0; i< form.elements.length; i++)
	{
		adder.elements[form.elements[i].name] = form.elements[i];
	}
 
	form.onsubmit = function ()
	{
		try
		{
			var submit = true;
			var values = {}
 
			status.innerHTML = "";
			for (var name in adder.fields)
			{
				if (adder.fields[name] == 'checkbox')
				{
					values[name] = adder.elements[name].checked ? name : false;
				}
				else if (adder.fields[name] == 'systemSelect')
				{
					values[name] = adder.elements[name].options[adder.elements[name].selectedIndex].value;
				}
				else
				{
					adder.elements[name].style.border = ''; // clear error styles
					values[name] = adder.fields[name](adder.elements[name].value || '', function (msg) 
					{
						status.appendChild(newNode('span',{style:'color: red'}, newNode('img', {'src':'http://upload.wikimedia.org/wikipedia/commons/4/4e/MW-Icon-AlertMark.png'}), msg, newNode('br'))); 
						adder.elements[name].style.border="solid #CC0000 2px";
						return false
					});
 
					if (values[name] === false)
						submit = false;
				}
			}
			if (!submit)
				return false;
 
			var loading = newNode('span', 'Încărcare...');
			status.appendChild(loading);
 
			adder.onsubmit(values, function (text, callback)
			{
				editor.page.parseFragment(text, function (res)
				{
					if (!res) 
						return loading.appendChild(newNode('p', {style: 'color: red'}, "Conectare la server nereușită."));
 
					callback(res);
					status.removeChild(loading);
				});
			});   
		}
		catch(e)
		{
			status.innerHTML = "ERROR:" + e.description; 
			return false;
		}
 
		return false;
	}
 
}
 
// An adder for pronunciations on ro.wikt
function PronunciationAdders (editor)
{
 
	function PronunciationAdder (newSpan, missLang)
	{
		var langmetadata = new LangMetadata ();
//		var rometadata = new RomanianMetadata();
		var advancedMode = false;
		var inputform;
 
		this.fields = 
		{
			systemSelect: 'systemSelect',
			pronunciation: function (txt, error) { if (!txt) return error("Specificați pronunția."); return txt; }
		};
		this.createForm = function()
		{
			var controls = {
				system: newNode('select', {name: 'systemSelect'}, newNode('option', {value: "AFI"}, "AFI"), newNode('option', {value: "SAMPA"}, "SAMPA"), newNode('option', {value: "AHD"}, "AHD")), 
				pronunciation: newNode('input', {size:30, type:'text', name:'pronunciation', title:'Pronunția', value:getPronunciation(hyphenator(document.getElementById('firstHeading').childNodes[0].nodeValue.toLowerCase().trim()))}),
				submit: newNode('input', {type: 'submit', value:'Previzualizare pronunție'})
			};
			
			var helpCharTable;
			var afi = langmetadata.hasAFI(missLang);
			if (afi) {
				var letters = newNode("tr", newNode("th", {style: "background: #EEE"}, "Literă"));
				var chars = newNode("tr", newNode("th", {style: "background: #EEE"}, "Sunet"));
				var cols = 1; // first column is for headers
				for (key in afi) {
					cols = cols + 1;
					letters.appendChild(newNode("td", {align: "center", style: "background: #EEE"}, key));
					chars.appendChild(newNode("td", {align: "center", style: "background: #EEE"}, afi[key]));
				}
				var helpCharBody = newNode('tbody', newNode('tr', newNode('th', {colspan:cols, style: "background: #EEE"}, 'Caractere AFI speciale')));
				helpCharBody.appendChild(letters);
				helpCharBody.appendChild(chars);
				helpCharTable = newNode('table', {cellspacing: "1", cellpadding: "2", style: "background: #555"}, helpCharBody);
			}
			else {
				helpCharTable = newNode('p', 'Caractere AFI: t̪ d̪ ʈ ɖ ɟ ɡ ɢ ʡ ʔ ʦ ʧ ʤ   ɸ ʃ ʒ ɕ ʑ ʂ ʐ ʝ ɣ ʁ ʕ ʜ ʢ ɦ   ɱ ɳ ɲ ŋ ɴ   ʋ ɹ ɻ ɰ   ʙ ʀ ɾ ɽ   ɫ ɬ ɮ ɺ ɭ ʎ ʟ   ɥ ʍ ɧ   ɓ ɗ ʄ ɠ ʛ   ʘ ǀ ǃ ǂ ǁ   ɨ ʉ ɯ   ɪ ʏ ʊ   ɘ ɵ ɤ   ə ɚ   ɛ ɜ ɝ ɞ ʌ ɔ   ɐ ɶ ɑ ɒ   ʰ ʷ ʲ ˠ ˤ ⁿ ˡ   ˈ ˌ ː ˑ ̪ e̯ o̯');
			}
			inputform = newNode('form', newNode('p', controls.system, newNode('b', ':'), controls.pronunciation, controls.submit, helpCharTable));
			inputform.style.display = "none";
			return inputform;
		};
		this.onsubmit = function(values, render)
		{
			var system = values.systemSelect;
			var wikitext = '{' + '{' + system + '}}: '+ '{' + '{' + system + '|/' + values.pronunciation + '/}}';
			render(wikitext, function (html) { registerEdits(values, wikitext, html)});
		}
 
		var showButton = newNode('span',{'click': function ()
		{
			if (!advancedMode)
			{
				advancedMode = true;
				inputform.style.display = "inline";
			}
			else
			{
				advancedMode = false;
				inputform.style.display = "none";
			}
		}, 'style':"color: #0000FF;cursor: pointer;"}, newNode('i', ' (Adaugă pronunție) '));
		newSpan.appendChild(showButton);
 
		function registerEdits(values, wikitext, content)
		{
			var li = newNode('li');
			li.innerHTML = content;
			var ul = newNode('ul', li);
			var parentNode = newSpan.parentNode;
			var noPronSpan = parentNode.firstElementChild;
			var lang = noPronSpan.className.substr(16);
			var summary = 'pron+ ' + lang + ': ' + values.systemSelect + ': /' + (values.pronunciation) + '/';
 
			editor.addEdit({
				'undo': function(){ parentNode.insertBefore(noPronSpan, ul); parentNode.removeChild(ul); },
				'redo': function(){ parentNode.insertBefore(ul, noPronSpan); parentNode.removeChild(noPronSpan); },
				'edit': function(text){ 
					var start = util.getVanillaIndexOf('{' + '{-pron-lipsă-|' + lang + '}}', text, 1);
					var end = start + 20;
					var newWiki = text.substr(0, start) + '* ' + wikitext + text.substr(end);
					return newWiki;
				},
				'summary': summary
			}, li);
		}
		
		function hyphenator(word)
		{
			var hyphenated = '';
			
			for (var letter = 0; letter < word.length; letter++)
			{
				hyphenated += word[letter] + " "
			}
			
			word = "." + word + "."
			hyphenated = "." + hyphenated.substr(0, hyphenated.length - 1) + "."

			var rules = [];
			var texts = [];
			var blanks = [];
			var numbers = "1234567890";
			var numbersblank = numbers + " ";
			var oddnumbers = "13579";
			
			for (var index = 0; index < RomanianMetadata.hyphdic.length; index++)
			{
				var rule = RomanianMetadata.hyphdic[index];
				
				var rule_text = ""
				var rule_blan = ""

				for (var i = 0; i < rule.length; i++)
				{
					if (numbers.indexOf(rule[i]) == -1)
					{
						rule_text += rule[i];
						rule_blan += rule[i];
					} else {
						rule_blan += " ";
						}
				}
				if (word.indexOf(rule_text) != -1)
				{
					// print "testam regula:", rule.encode(encoding),
					// print "- da"
					rules.push(rule);
					texts.push(rule_text);
					blanks.push(rule_blan);
				}
			}
			
			var parts = [];
		//    print hyphenated
			for (var index = 0; index < rules.length; index++)
			{
		//        print (t,b,r)
				var w = hyphenated;
				var patt = blanks[index];
//				var regex = new RegExp(patt, "g");
				w = w.replace(patt, rules[index]);
				var temp = w.replace(patt, rules[index]);
				while (temp != w) {
					w = temp;
					temp = w.replace(patt, rules[index]);
				}
		//        print w.encode(encoding)
				parts.push(w);
			}
			parts.push(hyphenated);
			
			hyphenated = "";
			for (var i = 0; i < parts[0].length; i++)
			{
				if (numbersblank.indexOf(parts[0][i]) != -1)
				{
					//print "to check"
					var max = parts[0][i];
					for (var j in parts)
					{
						if (parts[j][i] > max)
							max = parts[j][i];
					}
					if (oddnumbers.indexOf(max) != -1)
					{
		//                print "."
						hyphenated += ".";
					}
				}
				else
				{
		//            print parts[0][i].encode(encoding)
					hyphenated += parts[0][i];
				}
			}

			return hyphenated.substr(1, hyphenated.length - 2);
		}
		
		function getSilablePron(silable)
		{
			var pron = "";
			var hasVowel1 = 0;
			var hasVowel2 = 0;
			var hasVowel3 = 0;
			
			if ((silable.indexOf("a") != -1) || (silable.indexOf("ă") != -1) || (silable.indexOf("î") != -1) || (silable.indexOf("â") != -1))
			{
				hasVowel1 = 1;
			}	
			if (silable.indexOf("e") != -1 || silable.indexOf("o") != -1 || silable.indexOf("u") != -1)
			{
				hasVowel2 = 1;
			}
			
			for (var i = 0; i < silable.length; i = i + 1)
			{
				// Consonants
				if (silable[i] == "c")
				{
					if ((i < silable.length - 1) && (silable[i+1] == "e" || silable[i+1] == "i"))
					{
						pron += "ʧ";
					}
					else
					{
						pron += "k";
					}
				}
				else if (silable[i] == "g")
					{
						if ((i < silable.length - 1) && (silable[i+1] == "e" || silable[i+1] == "i"))
						{
							pron += "ʤ";
						} 
						else 
						{
							pron += "g";
						}
					}
				else if (silable[i] == "h")
					{
						if ((i == 0) || ((i > 0) && (silable[i-1] != "c" && silable[i-1] != "g")))
						{
							pron += "h";
						}
					}
				else if (silable[i] == "j")
					{
						pron += "ʒ";
					}
				else if (silable[i] == "ș")
					{
						pron += "ʃ";
					}
				else if (silable[i] == "ț")
					{
						pron += "ʦ";
					}
				else if (silable[i] == "x")
					{
						pron += "ks";
					}
				// Vowels
				else if (silable[i] == "ă")
					{
						pron += "ə";
					}
				else if (silable[i] == "â" || silable[i] == "î")
					{
						pron += "ɨ";
					}
				else if (silable[i] == "e" && hasVowel1 == 1)
					{
						pron += "e̯";
					}
				else if (silable[i] == "o" && hasVowel1 == 1)
					{
						pron += "o̯";
					}
				else if (silable[i] == "u" && hasVowel1 == 1)
					{
						pron += "w";
					}
				else if (silable[i] == "i")
					{
						if ((hasVowel1 == 1 || hasVowel2 == 1 || hasVowel3 == 1))
						{
							var consonants = "bcdfghjklmnprsștțvxz";
							if (i == silable.length - 1 && consonants.indexOf(silable[i-1]) != -1 )
							{
								pron += "ʲ";
							}
							else
							{
								pron += "j";
							}
						}
						else
						{
							pron += "i";
							hasVowel3 = 1;
						}
					}
				else
				{
					pron += silable[i];
				}
			}
			return pron;
		}
		
		function addStress(pron)
		{
			if ((pron.match(/\./g) || []).length < 1)
				// just 1 silable, no stress
				return pron;
				
			if (pron.substr(pron.length-1) == "ə" || pron.substr(pron.length-1) == "e" || pron.substr(pron.length-3) == "bil") {
				// stress on penultimate silable
				if ((pron.match(/\./g) || []).length < 2)
					// just 2 silables, first is stressed
					return "'" + pron;
				else
					// more than 2 silables, penultimate is stressed
					return pron.substring(0, pron.lastIndexOf(".", pron.lastIndexOf(".") -1 )) + "'" + pron.substring(pron.lastIndexOf(".", pron.lastIndexOf(".") - 1) + 1);
			}
			else
				return pron.substring(0, pron.lastIndexOf(".")) + "'" + pron.substring(pron.lastIndexOf(".") + 1);
			
			//unknown case, do manually
			return pron;
		}

		function getPronunciation(word)
		{
		//	if u"xa" in word or u"xă" in word or u"xâ" in word or u"xe" in word or u"xi" in word or u"xo" in word or u"xu" in word:
		//		return "";
			
			var pron = "";
			
			var silabe = word;
			
			if (silabe == "")
			{
				return "";
			}
			
			silabe = silabe.split(".");
			for (var length = 0; length < silabe.length; length++)
			{
				var silable = silabe[length];
				pron += getSilablePron(silable) + ".";
			}

			pron = pron.substr(0, pron.length - 1);
			
			pron = addStress(pron);
			
			return pron;
		}
	}
 
	var spans = document.getElementsByTagName('span');
	for (var i = 0; i < spans.length; i++)
	{
		if (spans[i].className.indexOf('nopronunciation') > -1)
		{
			var lang = spans[i].className.substr(16);
			var span = spans[i];
			var newSpan = newNode('span');
			span.parentNode.insertBefore(newSpan, span.nextElementSibling);
			new AdderWrapper(editor, new PronunciationAdder(newSpan, lang), newSpan);
		}
	}
	
}
 
// An adder for translations on ro.wikt
function TranslationAdders (editor)
{
	function TranslationLabeller (insertDiv)
	{
		var original_span;
		var adder_form;
		var initial_value;
		var edit_button;
 
		var editing = false;
 
		var adderInterface = {
			'fields': {
				'gloss': function (txt, error) { return util.validateNoWikisyntax('gloss', true)(txt, error) }
			},
			'createForm': function ()
			{
				var thisId = "a" + String(Math.random()).replace(".","");
				return adder_form = newNode('form', {style:'display: inline', width: 'auto', click: kill_event}, 
					newNode('label', {'for': thisId}, "Titlu: "),
					newNode('input', {type: 'text', name:'gloss', value: initial_value, style: 'width: 50%', title: 'Introduceți un rezumat al definiției corespunzătoare', id: thisId}),
					newNode('input', {type: 'submit', name: 'preview', value: 'Previzualizare'}),
					newNode('a', {href: '/wiki/Ajutor:Titluri de tabele'}, 'Ajutor?!')
					);
			},
			'onsubmit': function (values, render)
			{
				render(values.gloss, function (new_html) {
					if (editing)
						toggle_editing(false);
 
					var old_html = original_span.innerHTML;
					editor.addEdit({
						'undo': function () { original_span.innerHTML = old_html; if(!editing) toggle_editing();},
						'redo': function () { original_span.innerHTML = new_html; if(editing) toggle_editing();},
						'edit': function (text) { return perform_edit(text, values.gloss) },
						'summary': 'titlu traduceri:"' + (values.gloss.length > 50 ? values.gloss.substr(0, 50) + '...' : values.gloss + '"')
					}, original_span);
				});
			}
		};
 
		// The actual modification to the wikitext
		function perform_edit(wikitext, gloss)
		{
			var pos = util.getTransTable(wikitext, insertDiv)[0] - 4;
			var g_start = wikitext.lastIndexOf('\n{'+'{(', pos) + 1;
			var g_end = wikitext.indexOf('}}\n', pos) + 2;
 
			if (g_start == 0 || wikitext.substr(g_start, g_end - g_start).indexOf("\n") > - 1)
			{
				editor.error("Tabel de traduceri negăsit.");
				return wikitext;
			}
			else
			{
				return wikitext.substr(0, g_start) + '{'+'{(|' + gloss + '}}' + wikitext.substr(g_end);
			}
		}
 
		// Don't open and close box when interacting with form.
		function kill_event(e)
		{
			if (e && e.stopPropagation)
				e.stopPropagation();
			else
				window.event.cancelBubble = true;
		}
 
		// What to do when the +/- button is clicked.
		function toggle_editing ()
		{
			if (editing)
			{
				adder_form.style.display = "none";
				original_span.style.display = "inline";
				editing = false;
				return;
			}
			editing = true;
			edit_button.innerHTML = "Încărcare...";
			editor.withCurrentText(function (currentText)
			{
				var pos = util.getTransTable(currentText, insertDiv);
				edit_button.innerHTML = '±';
 
				if (!pos)
					return editor.error("Tabel de traduceri negăsit.");
 
				var gloss_line = currentText.substr(currentText.lastIndexOf('\n', pos[0] - 2) + 1);
				gloss_line = gloss_line.substr(0, gloss_line.indexOf('\n'));
				initial_value = gloss_line.replace(/^\{\{\((\|(.*)|)\}\}\s*$/,"$2");
 
				if (initial_value.indexOf("\n") > 0)
					return editor.error("Internal error: guess spanning multiple lines");
 
				if (!original_span)
				{
					original_span = newNode('span', {'class':'wt-edit-recurse'});
					for (var i=0; i<insertDiv.childNodes.length; i++)
					{
						var child = insertDiv.childNodes[i];
						if (child != edit_button && (!child.className || child.className != 'NavToggle'))
						{
							original_span.appendChild(insertDiv.removeChild(child));
							i--;
						}
					}
					insertDiv.appendChild(original_span);
 
					new AdderWrapper(editor, adderInterface, insertDiv, original_span);
				}
				original_span.style.display = "none";
				adder_form.style.display = "inline";
                                adder_form.getElementsByTagName('input')[0].focus()
			});
		}
		edit_button = newNode('a', '±', {href: '#', click: function (e) 
		{ 
			if (e && e.preventDefault)
				e.preventDefault();
			kill_event(e); 
			toggle_editing(); 
			return false;
		}, title:"Modifică titlul tabelului", style:"padding:2px;"});
		insertDiv.insertBefore(edit_button, insertDiv.firstChild);
	}
 
	function TranslationAdder (insertUl)
	{
		// Hippietrail
		var langmetadata = new LangMetadata ();
 
		this.fields =  {
			lang: function (txt, error)
			{
				if (txt == 'ron') return error("Vă rugăm să alegeți o limbă străină (fr, es, aaa).")
				if (/^[a-z]{2,3}(-[a-z\-]{1,7})?$/.test(txt)) return txt;
				return error("Vă rugăm să alegeți un cod de limbă (fr, es, aaa).")
			},
			word: function (txt, error)
			{
				if (txt == '{'+'{trreq}}')
					return txt;
 
				if (txt.indexOf(',') == -1 || forceComma)
				{
					forceComma = false;
					if (langmetadata.expectedCase(thiz.elements.lang.value, wgTitle, txt) || forceCase)
					{
						forceCase = false;
						return util.validateNoWikisyntax('traducerea', true)(txt, error);
					}
 
					if (prefs.get('case-knowledge', 'none') == 'none')
					{
						return error(newNode('span',
							"Traducerile nu conțin de obicei majuscule. Dacă sunteți sigur, ",
							newNode('span', {style: "color: blue; text-decoration: underline; cursor: pointer;", click: function ()
								{
									forceCase = true;
									inputForm.onsubmit();
									prefs.set('case-knowledge', 'guru');
								}}, "continuați apăsând aici.")));
					}
					else
					{
						var msg = newNode('span',
							newNode('span', {style: "color: blue; text-decoration: underline; cursor: pointer;", click: function ()
								{
									prefs.set('case-knowledge', 'none')
									try{ msg.parentNode.removeChild(msg); } catch(e) {}
									editor.undo()
								}}, "Please click undo"), " unless you are certain that this translation has a capital letter.");
 
						error(msg)
						return txt;
					}
				}
 
				if (prefs.get('comma-knowledge', 'none') == 'none')
				{
					return error(newNode('span',
						"You can only add one translation at a time. If this is one translation that contains a comma, you can ",
						newNode('span', {style: "color: blue; text-decoration: underline; cursor: pointer;", click: function ()
							{
								forceComma = true;
								inputForm.onsubmit();
								prefs.set('comma-knowledge', 'guru')
							}}, "add it by clicking here.")))
				}
				else
				{
					var msg = newNode('span',
						newNode('span', {style: "color: blue; text-decoration: underline; cursor: pointer;", click: function ()
							{
								prefs.set('comma-knowledge', 'none')
								try{ msg.parentNode.removeChild(msg); } catch(e) {}
								editor.undo()
							}}, "Please click undo"), " if you were trying to create a list of translations in one go, this is currently not supported.");
 
					error(msg)
					return txt;
				}
			},
			qual: util.validateNoWikisyntax('qualifier'),
			tr: util.validateNoWikisyntax('transcription'),
			alt: util.validateNoWikisyntax('page name'),
			sc: function (txt, error)
			{
				if (txt && !/^((?:[a-z][a-z][a-z]?-)?[A-Z][a-z][a-z][a-z]|polytonic|unicode)$/.test(txt))
					return error(newNode('span', "Please use a ", newNode('a',{href: '/wiki/Category:Script templates'},"script template"), "(e.g. fa-Arab, Deva, polytonic)"))
 
				if (!txt)
					txt = prefs.get('script-' + thiz.elements.lang.value, langmetadata.guessScript(thiz.elements.lang.value) || '');
				if (txt == 'Latn')
					txt = '';
				return txt;
			},
			nested: util.validateNoWikisyntax('nested'),
			m: 'checkbox', f: 'checkbox', n: 'checkbox', c: 'checkbox', p: 'checkbox'
		};
 
		this.createForm = function ()
		{
			var controls = {
				lang: newNode('input', {size:4, type:'text', name:'lang', value:prefs.get('curlang',''), title:'Codul ISO 639-3 al limbii'}),
				transliteration: newNode('span', newNode('a', {href: '/wiki/Wiktionary:Transliteration'}, "Transliterare"), ": ", 
									 newNode('input', {name: "tr", title: "Cuvântul scris cu alfabetul latin."}), " (de exemplu, ázbuka pentru азбука)"),
				qualifier: newNode('p', "Qualifier: ", newNode('input', {name: 'qual', title: "A qualifier for the word"}), " (e.g. literally, formally, slang)"),
				display: newNode('p',"Page name: ", newNode('input', {name: 'alt', title: "The word with all of the dictionary-only diacritics."}), " (e.g. amo for amō)"),
				script: newNode('p', newNode('a', {href: '/wiki/Category:Script_templates'},"Script template"),": ", 
					newNode('input', {name: 'sc', size: 6, title: "The script template to render this word in."}), "(e.g. Cyrl for Cyrillic, Latn for Latin)", newNode('br')),
				nested: newNode('p', "Nesting: ", newNode('input', {name: 'nested', title: "The nesting of this language"}), " (e.g. Norwegian/Nynorsk)"),
				gender_m: newNode('span',newNode('input', {type: 'checkbox', name: 'm'}), 'masculin '),
				gender_f: newNode('span', newNode('input', {type: 'checkbox', name: 'f'}), 'feminin '),
				gender_n: newNode('span', newNode('input', {type: 'checkbox', name: 'n'}), 'neutru '),
				gender_c: newNode('span', newNode('input', {type: 'checkbox', name: 'c'}), 'comun '),
				plural: newNode('span', newNode('input', {type: 'checkbox', name: 'p'}), 'plural ', newNode('br'))
			};
 
			controls.gender = newNode('p', controls.gender_m, controls.gender_f, controls.gender_n, controls.gender_c, controls.plural);
 
			langInput = controls.lang;
 
			var showButton = newNode('span',{'click': function ()
			{
				if (!advancedMode)
				{
					advancedMode = true;
					showButton.innerHTML = " Less";
				}
				else
				{
					advancedMode = false;
					showButton.innerHTML = " More";
				}
				updateScriptGuess.call(langInput, true);
			}, 'style':"color: #0000FF;cursor: pointer;"}, advancedMode ? " Less" : " More");
 
			function autoTransliterate () {
				if (thiz.elements.word.value == '{'+'{trreq}}')
					thiz.elements.alt.value = ''
				else
					thiz.elements.alt.value = langmetadata.generateAltForm(thiz.elements.lang.value, thiz.elements.word.value) || '';
			}
			function updateScriptGuess (preserve) {
				preserve = (preserve === true);
 
				//show all arguments
				function show ()
				{
					for (var i=0; i<arguments.length; i++)
					{
						if (arguments[i].nodeName.toLowerCase() == 'p')
							arguments[i].style.display = "block";
						else
							arguments[i].style.display = "inline";
					}
 
				}
				//hide all arguments
				function hide ()
				{
					for (var i=0; i < arguments.length; i++)
						arguments[i].style.display = "none";
				}
				//if the first argument is false hide the remaining arguments, otherwise show them.
				function toggle (condition)
				{
					if (condition) //eww...
						show.apply(this, [].splice.call(arguments, 1, arguments.length - 1));
					else
						hide.apply(this, [].splice.call(arguments, 1, arguments.length - 1));
				}
 
				if (!preserve)
					langInput.value = langmetadata.cleanLangCode(langInput.value);
 
				var guess = prefs.get('script-' + langInput.value, langmetadata.guessScript(langInput.value || ''));
				if (!preserve)
				{
					if (guess)
						thiz.elements.sc.value = guess;
					else
						thiz.elements.sc.value = '';
 
					thiz.elements.nested.value = langmetadata.getNested(langInput.value || '');
 
					autoTransliterate();
				}
 
				var lang = langInput.value;
 
				if (!advancedMode)
				{
					var g = langmetadata.getGenders(lang);
 
					if (!lang)
					{
						hide(controls.gender);
					}
					else if (g == undefined)
					{
						show(controls.gender,controls.gender_m, controls.gender_f, controls.gender_n, controls.gender_c);
					}
					else
					{
						toggle(g.indexOf('m') > -1, controls.gender);
						toggle(g.indexOf('m') > -1, controls.gender_m);
						toggle(g.indexOf('f') > -1, controls.gender_f);
						toggle(g.indexOf('n') > -1, controls.gender_n);
						toggle(g.indexOf('c') > -1, controls.gender_c);
					}
 
					var p = langmetadata.hasPlural(lang);
 
					toggle(p !== false, controls.plural);
					toggle(g || p, controls.gender); 
 
					toggle(guess && guess != 'Latn', controls.transliteration);
 
					var alt = langmetadata.needsAlt(lang);
 
					toggle(alt === true, controls.display);
 
					hide(controls.qualifier, controls.nested); //only in more
					hide(controls.script); //should be in less when array returned from .getScripts
 
				}
				else
				{
					show(controls.gender, controls.gender_m, controls.gender_f, controls.gender_n, controls.gender_c,
						controls.plural, controls.transliteration, controls.qualifier, controls.display,
						controls.script, controls.nested);
				}
			} 
 
			//autocomplete language names
			var langNameToCode={};
			function langAutoFill(e){
				e = (e || event).keyCode;if((e >= 33 && e <= 40) || e == 8 || e == 46 || e == 27 || e == 16){
					return;
				}
				var t = this, v = t.value;
				if(v.substr(0,1) != v.substr(0,1).toUpperCase()){
					return;
				}
				JsMwApi()({action:'query',generator:'allpages',gapnamespace:10,gapprefix:'langrev/'+v,gaplimit:3,prop:'revisions',rvprop:'content'},function(r){
					if(r.query && r.query.pages && t.value == v){
						var l={}, ll={}
						for(var i in r.query.pages){
							var rqp = r.query.pages[i];ll = rqp.title < ll.title?ll:rqp;l = rqp.title > l.title?l:rqp;
						}
						if(!r['query-continue'] && ll.title.indexOf(l.title) == 0){
							langNameToCode[l.title.substr(17)]=l.revisions[0]['*'];
							if(l.title != "Template:langrev/"+v){
								if (t.setSelectionRange){
									t.setSelectionRange([t.value.length, t.value = l.title.substr(17)][0], t.value.length);
								} else if (t.createTextRange) {
									var z = t.createTextRange();
									z.moveEnd('character', 0 - z.move('character', [t.value.length, t.value = l.title.substr(17)][0]) + t.value.length);
									z.select()
								}
							}
						}
					}
				})
			}
			langInput.onkeyup = langAutoFill;
 
			langInput.onblur = function(){
				if(langNameToCode[this.value]){
					this.value=langNameToCode[this.value]
				}
				updateScriptGuess.call(langInput)
			}
 
			window.setTimeout(function () {updateScriptGuess.call(langInput)}, 0);
 
			inputForm = newNode('form',
						newNode('p', newNode('a',{href:"/wiki/User_talk:Conrad.Irwin/editor.js#Usage"},"Adaugă traducere"),' ',
							langInput, newNode('b',': '), newNode('input', {'name': 'word', size:20, change:autoTransliterate}),
							newNode('input',{'type': 'submit', 'value':'Previzualizare traducere'}), showButton
						), 
						controls.gender,
						controls.transliteration,
						controls.display,
						controls.qualifier,
						controls.script,
						controls.nested
					)
			return inputForm;
		}
 
		this.onsubmit = function (values, render)
		{
			// Use (no) for Bokmal per WT:ANO
			var wikt_lang = values.lang;
			if (wikt_lang == 'nb')
				wikt_lang = 'no';
 
			var wikitext;
			if (values.word.indexOf('{'+'{trreq') == 0)
				wikitext = '{'+'{trreq|' + '{'+'{' + values.lang + '|l=}}}}'
			else
				wikitext = '{'+'{' + values.lang + '}}: ' + 
				//(values.qual? '{'+'{qualifier|' + values.qual + '}} ' : '') +  
				'{'+'{trad' + //(langmetadata.hasWiktionary(wikt_lang) ? '' : 'ø') +
				'|' + (langmetadata.iso6391LangCode(values.lang)) + '|' + (values.alt ? values.alt : values.word) + '}}' +
				(values.m ? ' {{m}}' : '') +
				(values.f ? ' {{f}}' : '') +
				(values.n ? ' {{n}}' : '') +
				(values.c ? ' {{c}}' : '') +
				(values.p ? ' {{p}}' : '') +
				//(values.tr ? '|tr=' + values.tr : '') + 
				//((values.alt && values.alt != values.word) ? '|alt=' + values.word : '') +
				//(values.sc ? '|sc=' + values.sc  : '') + '}}' +
				'' ;
			render(wikitext, function (html) { registerEdits(values, wikitext, html)});
			if (!this.balancer)
				this.balancer = new TranslationBalancer(editor, insertUl.parentNode.parentNode.parentNode);
		}
 
		var thiz = this;
		var prefs = new CookiePreferences('EditorJs');
		var langInput;
		var inputForm;
		var advancedMode = prefs.get('more-display', 'none') != 'none';
		var forceComma = false;
		var forceCase = false;
 
		//Reset elements to default values.
		function resetElements ()
		{
			if (prefs.get('more-display', 'none') != advancedMode ? 'block' : 'none')
				prefs.set('more-display', advancedMode ? 'block' : 'none'); //named for compatibility
			thiz.elements.word.value = thiz.elements.tr.value = thiz.elements.alt.value = thiz.elements.qual.value = '';
			thiz.elements.m.checked = thiz.elements.f.checked = thiz.elements.n.checked = thiz.elements.c.checked = thiz.elements.p.checked = false;
			prefs.set('curlang', thiz.elements.lang.value);
			if ((thiz.elements.sc.value || 'Latn') != (prefs.get('script-'+thiz.elements.lang.value, langmetadata.guessScript(thiz.elements.lang.value) || 'Latn')))
			{
				prefs.set('script-'+thiz.elements.lang.value, thiz.elements.sc.value); 
				thiz.elements.lang.update();
			}
		}
 
		// This is onsubmit after the wikitext has been rendered to give content
		function registerEdits (values, wikitext, content)
		{
			var li = newNode('li',{'class': 'trans-'+values.lang});
			li.innerHTML = content;
			var lang = getLangName(li);
			var summary = 'trad+ ' + values.lang + ':[[' + (values.alt || values.word) + ']]';
 
			var insertBefore = null;
			var nextLanguage = null;
 
			var nestedHeading, nestedLang;
			var nestedLang;
			if (values.nested.indexOf('/') > -1) 
			{
				nestedLang = values.nested.replace(/.*\//, '');
				nestedHeading = values.nested.replace(/\/.*/,'');
				if (nestedHeading == '')
					nestedHeading = lang;
				content = content.replace(/.*: /, nestedLang + ": ");
				wikitext = wikitext.replace("subst:", "").replace(/.*: /, nestedLang + ": ");
			}
			else
			{ 
				nestedHeading = values.nested;
				nestedLang = lang;
			}
			var nestedWikitext = "\n* " + nestedHeading + ":\n*: " + wikitext;
 
			function addEdit (edit, span)
			{
				editor.addEdit({
					'undo': function () 
					{
						edit.undo();
						if (thiz.elements.word.value == "" &&
							thiz.elements.tr.value == "" &&
							thiz.elements.alt.value == "" &&
							thiz.elements.qual.value == "")
						{
							var fields = ["lang","word","alt","qual","tr","sc"];
							var cb = "mnfcp".split("");
							for (var i=0; i < fields.length; i++)
							{
								thiz.elements[fields[i]].value = values[fields[i]];
							}
							for (var i=0; i < cb.length; i++)
							{
								thiz.elements[fields[i]].checked = values[fields[i]];
							}
						}
					},
					'redo': function ()
					{ 
						edit.redo();
						var fields = ["lang","word","alt","qual","tr","sc"];
						for (var i=0; i < fields.length; i++)
						{
							if (thiz.elements[fields[i]].value != values[fields[i]])
								return;
						}
						resetElements();
					},
					'edit': edit.edit,
					'summary': summary
				}, span);
			}
 
 
			if (lang)
			{
				//Get all li's in this table row. 
				var lis = [];
				var ls = insertUl.parentNode.parentNode.getElementsByTagName('li');
				for (var j=0; j < ls.length; j++)
					lis.push(ls[j]);
 
				ls = insertUl.parentNode.parentNode.getElementsByTagName('dd');
				for (var j=0; j < ls.length; j++)
					lis.push(ls[j]);
 
				for (var j=0; j < lis.length; j++)
				{
					if (lis[j].getElementsByTagName('form').length > 0)
						continue;
					var ln = getLangName(lis[j]);
					if (ln == lang)
					{
						if (values.word == '{'+'{trreq}}') {
							addEdit({
								'redo': function () {},
								'undo': function () {},
								'edit': function () {
									return editor.error("Can not add a translation request for a language with translations");
								}
							});
							return resetElements();
						}
 
						var span = newNode('span');
						var parent = lis[j];
						if (util.isTrreq(parent))
						{
							span.innerHTML = content;
							var trspan = parent.getElementsByTagName('span')[0];
							addEdit({
								'redo': function () { parent.removeChild(trspan); parent.innerHTML = ""; parent.appendChild(span); },
								'undo': function () { parent.removeChild(span); parent.appendChild(trspan); },
								'edit': getEditFunction(values, wikitext, ln, values.lang, true, function (text, ipos)
								{
									//Converting a Translation request into a translation
									var lineend = text.indexOf('\n', ipos);
									return text.substr(0, ipos) + wikitext + text.substr(lineend);
								})
							}, span);
							return resetElements();
						}
						else
						{
							if (parent.getElementsByTagName('ul').length + parent.getElementsByTagName('dl').length == 0)
							{
								span.innerHTML = ", " + content.substr(content.indexOf(':') + 1);
								addEdit({
									'redo': function () { parent.appendChild(span) },
									'undo': function () { parent.removeChild(span) },
									'edit': getEditFunction(values, wikitext, ln, values.lang, false, function (text, ipos)
											{
												 //We are adding the wikitext to a list of translations that already exists.
												 var lineend = text.indexOf('\n', ipos);
												 var wt = wikitext.replace('subst:','');
												 wt = wt.substr(wt.indexOf(':') + 1);
												 return text.substr(0, lineend) + "," + wt + text.substr(lineend);
											})
								}, span);
								return resetElements();
							}
							else
							{
								var node = parent.firstChild;
								var hastrans = false;
								while (node)
								{
									if (node.nodeType == 1)
									{
										var nn = node.nodeName.toUpperCase();
										if (nn == 'UL' || nn == 'DL')
										{
											// If we want to use the dialectical nesting for orthographical nesting
											// then we need to skip this (otherwise perfect) match.
											if (!hastrans && nestedHeading == ln)
											{
												node = node.nextSibling;
												continue;
											}
											span.innerHTML = (hastrans ? ", ": " ") + content.substr(content.indexOf(':') + 1);
											addEdit({
												'redo': function () { parent.insertBefore(span, node) },
												'undo': function () { parent.removeChild(span) },
												'edit': getEditFunction(values, wikitext, ln, values.lang, false, function (text, ipos)
														{
															//Adding the translation to a language that has nested translations under it
															var lineend = text.indexOf('\n', ipos);
															var wt = wikitext.replace('subst:','');
															wt = wt.substr(wt.indexOf(':') + 1);
															return text.substr(0, lineend) + (hastrans ? "," : "") + wt + text.substr(lineend);
														})
											}, span);
											return resetElements();
										}
										else
										{
											hastrans = true;
										}
 
									}
									node = node.nextSibling;
								}
							}
						}
					}
					else if (ln && ln > lang && (!nextLanguage || ln < nextLanguage) && lis[j].parentNode.parentNode.nodeName.toLowerCase() != 'li')
					{
						nextLanguage = ln;
						var parent = lis[j];
						insertBefore = [
							{
								'redo': function () {parent.parentNode.insertBefore(li, parent);},
								'undo': function () {parent.parentNode.removeChild(li)},
								'edit': getEditFunction(values, wikitext, ln, getLangCode(parent), util.isTrreq(parent), function (text, ipos)
										{
											//Adding a new language's translation before another language's translation
											var lineend = text.lastIndexOf('\n', ipos);
											return text.substr(0, lineend) + "\n* " + wikitext + text.substr(lineend);
										})
							},li];
					}
				}
			}
			if (values.nested)
			{
				nextLanguage = null;
				insertBefore = null;
				li.innerHTML = nestedHeading + ":" + "<dl><dd class=\"trans-" + values.lang + "\">" + content + "</dd></dl>";
 
				var lis = insertUl.parentNode.parentNode.getElementsByTagName('li');
				for (var j = 0; j < lis.length; j++)
				{
					//Ignore the editor form
					if (lis[j].getElementsByTagName('form').length > 0)
						continue;
 
					//Don't look at nested translations
					if (lis[j].parentNode.parentNode.nodeName.toLowerCase() != 'td')
						continue;
 
					var ln = getLangName(lis[j]);
					if (ln == nestedHeading)
					{
						var sublis = lis[j].getElementsByTagName('li');
 
						if (! sublis.length)
							sublis = lis[j].getElementsByTagName('dd');
 
						if (sublis.length == 0)
						{
							var parent = lis[j];
							var dd = newNode('dd', {'class': 'trans-'+values.lang});
							var dl = newNode('dl', dd);
							dd.innerHTML = content;
 
							addEdit({
								'redo': function () {parent.appendChild(dl);},
								'undo': function () {parent.removeChild(dl);},
								'edit': getEditFunction(values, wikitext, nestedHeading, getLangCode(parent), util.isTrreq(parent), function (text, ipos)
										{
											//Adding a new dl to an existing translation line
											var lineend = text.indexOf('\n', ipos);
											return text.substr(0, lineend) + "\n*: " + wikitext + text.substr(lineend);
										})
							}, dd);
							return resetElements();
						}
						else
						{
							var dd = newNode(sublis[0].nodeName, {'class': 'trans-'+values.lang});
							var linestart = dd.nodeName.toLowerCase() == 'dd' ? '\n*: ' : '\n** ';
							dd.innerHTML = content;
							for (var k = 0; k < sublis.length; k++)
							{
								var subln = getLangName(sublis[k]);
								var parent = sublis[k];
								if (subln == nestedLang) {
									var span = newNode('span');
									span.innerHTML = ", " + content.substr(content.indexOf(':') + 1);
									addEdit({
										'redo': function () { parent.appendChild(span) },
										'undo': function () { parent.removeChild(span) },
										'edit': getEditFunction(values, wikitext, nestedLang, values.lang, false, function (text, ipos)
												{
													 // Adding the wikitext to a list of translations that already exists.
													 var lineend = text.indexOf('\n', ipos);
													 var wt = wikitext.replace('subst:','');
													 wt = wt.substr(wt.indexOf(':') + 1);
													 return text.substr(0, lineend) + "," + wt + text.substr(lineend);
												})
									}, span);
 
									return resetElements();
								} else if (langmetadata.nestsBefore(nestedLang, subln)) {
 
									addEdit({
										'redo': function () { parent.parentNode.insertBefore(dd, parent); },
										'undo': function () { parent.parentNode.removeChild(dd); },
										'edit': getEditFunction(values, wikitext, subln, getLangCode(parent), util.isTrreq(parent), 
												function (text, ipos) 
												{
													// Adding a nested translation in-order
													var lineend = text.lastIndexOf('\n', ipos);
													return text.substr(0, lineend) + linestart + wikitext + text.substr(lineend);
												})
									}, dd);
									return resetElements();
								}
							}
 
							addEdit({
								'redo': function () { parent.parentNode.appendChild(dd); },
								'undo': function () { parent.parentNode.removeChild(dd); },
								'edit': getEditFunction(values, wikitext, subln, getLangCode(parent), util.isTrreq(parent),
										function (text, ipos)
										{
											// Adding a nested translation at the end of its group
											var lineend = text.indexOf('\n', ipos);
											return text.substr(0, lineend) + linestart + wikitext + text.substr(lineend);
										})
							}, dd);
							return resetElements();
						}
 
					}
					else if (ln && ln > nestedHeading && (!nextLanguage || ln < nextLanguage))
					{
						nextLanguage = ln;
						var parent = lis[j];
						insertBefore = [
							{
								'redo': function () {parent.parentNode.insertBefore(li, parent);},
								'undo': function () {parent.parentNode.removeChild(li)},
								'edit': getEditFunction(values, wikitext, ln, getLangCode(parent), util.isTrreq(parent), function (text, ipos)
										{
											//Adding a new nested translation section.
											var lineend = text.lastIndexOf('\n', ipos);
											return text.substr(0, lineend) +  nestedWikitext + text.substr(lineend);
										})
							},li];
					}
				}
				wikitext = nestedHeading + ":\n*: " + wikitext;
			}
 
			li.className = "trans-" + values.lang;
			if (insertBefore)
			{
				addEdit(insertBefore[0], insertBefore[1]);
			}
			else
			{
				//Append the translations to the end (no better way found)
				addEdit({
					'redo': function () {insertUl.appendChild(li);},
					'undo': function () {insertUl.removeChild(li)},
					'edit': getEditFunction(values, wikitext)
				}, li);
			}
			return resetElements();
		}
 
		//Get the wikitext modification for the current form submission.
		function getEditFunction (values, wikitext, findLanguage, findLangCode, trreq, callback)
		{
			return function(text)
			{
				var p = util.getTransTable(text, insertUl);
 
				if (!p)
					return editor.error("Could not find translation table for '" + values.lang + ":" + values.word + "'. Glosses should be unique");
 
				var stapos = p[0];
				var endpos = p[1];
 
				if (findLangCode)
				{
					var ipos = 0;
					if (trreq)
					{
						ipos = text.indexOf('{'+'{trreq|'+langmetadata.cleanLangCode(findLangCode)+'}}', stapos);
						if (ipos < 0 || ipos > endpos)
							ipos = text.indexOf('{'+'{trreq|'+findLangCode+'}}', stapos);
						if (ipos < 0 || ipos > endpos)
							ipos = text.indexOf('{'+'{trreq|{'+'{subst:'+langmetadata.cleanLangCode(findLangCode)+'|l=}}}}', stapos);
					}
 
					// If we have a nested trreq, then we still need to look for the non-trreq form of the heading language
					if (!trreq || ipos < 0 || ipos > endpos )
					{
						ipos = text.substr(stapos).search(RegExp("\\*[:*]? ?\\{\\{" + langmetadata.cleanLangCode(findLangCode) + "\\}\\}:")) + stapos;
						if (ipos < stapos || ipos > endpos)
							ipos = text.substr(stapos).search(RegExp('\\*[:*]? ?' + util.escapeRe(findLanguage) + ':')) + stapos;
						if (ipos < stapos || ipos > endpos)
							ipos = text.indexOf('{'+'{subst:'+langmetadata.cleanLangCode(findLangCode)+'}}:', stapos);
					}
 
					if (ipos >= stapos && ipos < endpos)
					{
						return callback(text, ipos, trreq);
					}
					else
					{
						return editor.error("Could not find translation entry for '" + values.lang + ":" +values.word + "'. Please reformat");
					}
				}
 
				return text.substr(0, endpos) + "* " + wikitext + "\n" + text.substr(endpos);
			};
		}
 
		// For an <li> in well-formed translation sections, return the language name.
		function getLangName(li)
		{
			var guess = li.textContent || li.innerText;
 
			if (guess)
				guess = guess.substr(0, guess.indexOf(':'));
 
			if (guess == 'Template') {
				return false;
			}
 
			return guess.replace(/^[\s\n]*/,'');
		}
 
		// Try to get the language code from an <li> containing { {t t+ or t-	// }}
		function getLangCode(li)
		{
			if (li.className.indexOf('trans-') == 0)
				return li.className.substr(6);
			var spans = li.getElementsByTagName('span');
			for (var i=0; i < spans.length; i++)
			{
				if (spans[i].lang) {
					return spans[i].lang;
				}
			}
			return false;
		}
 
	}
	var tables = document.getElementsByTagName('table');
	for (var i=0; i<tables.length; i++)
	{
		if (tables[i].className.indexOf('translations') > -1 && util.getTransGloss(tables[i]) != 'Translations to be checked')
		{
			var _lists = tables[i].getElementsByTagName('ul');
			var lists = [];
			for (var j=0; j<_lists.length; j++)
				if (_lists[j].parentNode.nodeName.toLowerCase() == 'td')
					lists.push(_lists[j]);
 
			if (lists.length == 0)
			{
				tables[i].getElementsByTagName('td')[0].appendChild(newNode('ul'));
				lists = tables[i].getElementsByTagName('ul');
			}
			if (lists.length == 1)
			{
				var table = tables[i].getElementsByTagName('td')[2]
				if (table)
				{
					table.appendChild(newNode('ul'));
					lists = tables[i].getElementsByTagName('ul');
				}
			}
			if (lists)
			{
				var li = newNode('li');
				var ul = lists[lists.length - 1];
				var table = tables[i];
				if (table.getElementsByTagName('tbody').length > 0)
					table = table.getElementsByTagName('tbody')[0];
				table.appendChild(newNode('tr', newNode('td'), newNode('td'), newNode('td', {'style':'text-align: left'},newNode('ul', li))));
				new AdderWrapper(editor, new TranslationAdder(ul), li);
				if ((new CookiePreferences('EditorJs')).get('labeller') == 'true')
				{
					var div = tables[i].parentNode.parentNode.getElementsByTagName('div')[0];
					if (div.className.indexOf('NavHead') > -1)
					{
						new TranslationLabeller(div)
					}
				}
			}
		}
	}
}
 
function TranslationBalancer (editor, insertTable)
{
	var status;
 
	//create the form
	function init ()
	{
		var cns = insertTable.getElementsByTagName('tr')[0].childNodes;
		var tds = []; 
		//Find all three table cells in the translation table.
		for (var i=0; i<cns.length; i++)
		{
			if (cns[i].nodeName.toUpperCase() == 'TD')
				tds.push(cns[i])
		}
 
		//Ensure that there is a <ul> on the left side of the balancer.
		var left = tds[0].getElementsByTagName('ul');
		if (left.length > 0)
			left = left[0];
		else
		{
			left = newNode('ul');
			tds[0].appendChild(left);
		}
 
		//Ensure that there is a <ul> on the right side of the balancer.
		var right = tds[2].getElementsByTagName('ul');
		if (right.length > 0)
			right = right[0];
		else
		{
			right = newNode('ul');
			tds[2].appendChild(right);
		}
 
		var moveLeft = newNode('input',{'type':'submit','name':'ml', 'value':'←', 'click': function(){return prepareEdits('←', left, right)}});
		var moveRight = newNode('input',{'type':'submit','name':'mr', 'value':'→', 'click': function(){return prepareEdits('→', left, right)}});
		status = newNode('span');
 
		var form = newNode('form', moveLeft, newNode('br'), moveRight, newNode('br'), status);
		tds[1].appendChild(form);
		form.onsubmit = function () { return false; } //Must be done after the appendChild for IE :(
	}
 
	function moveOneRight(left, right)
	{
		var li = left.lastChild;
		while (li && li.nodeName.toLowerCase() != 'li')
			li = li.previousSibling;
 
		if (li) 
			right.insertBefore(left.removeChild(li), right.firstChild);
	}
 
	function moveOneLeft(left, right)
	{
		var li = right.firstChild;
		while (li && li.nodeName.toLowerCase() != 'li')
			li = li.nextSibling;
 
		if (li)
			left.appendChild(right.removeChild(li));
	}
 
	//store the edit object with the editor
	function prepareEdits(direction, left, right)
	{
		status.innerHTML = "Încărcare...";
 
		editor.addEdit({
			'redo': function () { (direction == '→' ? moveOneRight : moveOneLeft)(left, right) },
			'undo': function () { (direction == '→' ? moveOneLeft : moveOneRight)(left, right) },
			'edit': function (text) {return editWikitext(right, direction, text);},
			'summary': 'echilibrare traduceri'
		});
	}
 
	//get the wikitext modification
	function editWikitext(insertUl, direction, text)
	{
		status.innerHTML = "";
		//Find the position of the translation table
		var p = util.getTransTable(text, insertUl);
 
		if (!p)
			return editor.error("Could not find translation table, please improve glosses.");
 
		var stapos = p[0];
		var endpos = p[1];
 
		//Find the start and end of the { {trans-mid}} in the table
		var midpos = text.indexOf('{'+'{-}}', stapos);
		var midstart = text.lastIndexOf("\n", midpos);
		var midend = text.indexOf("\n", midpos);
 
		if (midstart < stapos - 1 || midend > endpos)
			return editor.error("Nu am putut găsi {'+'{-}}, vă rugăm să corectați pagina.");
 
		if (direction == '→')
		{
			// Select the last list item of the left list (may be more than one line if nested translations are present)
			var linestart = text.lastIndexOf("\n", midstart - 3);
			while (/^[:*#;]$/.test(text.substr(linestart+2,1)))
				linestart = text.lastIndexOf("\n", linestart - 1);
 
			if (linestart < stapos - 1 || linestart >= endpos) 
				return editor.error("Nu există traduceri de mutat.");
 
			return text.substr(0, linestart)  //Everything before the item we are moving
					+ text.substr(midstart, midend - midstart) //Then { {trans-mid}}
					+ text.substr(linestart, midstart - linestart) //Then the item we are moving
					+ text.substr(midend); //Then everything after { {trans-mid}}
		}
		else if (direction == '←')
		{
			// Select the first list item of the right list (may be more than one line if nested translations are present)
			var lineend = text.indexOf("\n", midend + 3);
			while (/^[:*#;]$/.test(text.substr(lineend+2,1)))
				lineend = text.indexOf("\n", lineend + 1);
 
			if (lineend < stapos - 1 || lineend >= endpos) 
				return editor.error("Nu există traduceri de mutat.");
 
			return text.substr(0, midstart) //Everything before { {trans-mid}}
					+ text.substr(midend, lineend - midend) //Then the item we are moving
					+ text.substr(midstart, midend - midstart) //Then { {trans-mid}}
					+ text.substr(lineend); //Then everything after the item we are moving
		}
		return text;
	}
	init();
}
 
var RomanianMetadata = {
	hyphdic : ["2b.", "2c.", "2d.", "2f.", "2g.", "2h.", "2j.", "2k.", "2l.", "2m.", "2n.", "2p.", "2q.", "2r.", "2s.", "2ș.", "2t.", "2ț.", "2v.", "2w.", "2x.", "2z.", "2ci.", "e2a.", "i2u.", "2ni.", "o2u.", "2ri.", "2ți.", "ve3ni.", "o1ve4ni.", "a1a", "a1e", "ă1i", "e1a", "e1e", "e1o", "i1e", "i1i", "i1o", "i1u", "o1e", "o1o", "o1u", "u1i", "u1o", "u1u", "l2p1t", "m2p1t", "m2p1ț", "n2c1ș", "n2c1t", "n2c1ț", "n2d1v", "r2c1t", "r2t1f", "s2t1m", "r2s2t1n", "a1b", "a1c", "a1d", "a1f", "a1g", "a1h", "a1j", "a1k", "a1l", "a1m", "a1n", "a1p", "a1q", "a1r", "a1s", "a1ș", "a1t", "a1ț", "a1v", "a1w", "a1x", "a1z", "ă1b", "ă1c", "ă1d", "ă1f", "ă1g", "ă1h", "ă1j", "ă1k", "ă1l", "ă1m", "ă1n", "ă1p", "ă1q", "ă1r", "ă1s", "ă1ș", "ă1t", "ă1ț", "ă1v", "ă1w", "ă1x", "ă1z", "â1b", "â1c", "â1d", "â1f", "â1g", "â1h", "â1j", "â1k", "â1l", "â1m", "â1n", "â1p", "â1q", "â1r", "â1s", "â1ș", "â1t", "â1ț", "â1v", "â1w", "â1x", "â1z", "e1b", "e1c", "e1d", "e1f", "e1g", "e1h", "e1j", "e1k", "e1l", "e1m", "e1n", "e1p", "e1q", "e1r", "e1s", "e1ș", "e1t", "e1ț", "e1v", "e1w", "e1x", "e1z", "i1b", "i1c", "i1d", "i1f", "i1g", "i1h", "i1j", "i1k", "i1l", "i1m", "i1n", "i1p", "i1q", "i1r", "i1s", "i1ș", "i1t", "i1ț", "i1v", "i1w", "i1x", "i1z", "î1b", "î1c", "î1d", "î1f", "î1g", "î1h", "î1j", "î1k", "î1l", "î1m", "î1n", "î1p", "î1q", "î1r", "î1s", "î1ș", "î1t", "î1ț", "î1v", "î1w", "î1x", "î1z", "o1b", "o1c", "o1d", "o1f", "o1g", "o1h", "o1j", "o1k", "o1l", "o1m", "o1n", "o1p", "o1q", "o1r", "o1s", "o1ș", "o1t", "o1ț", "o1v", "o1w", "o1x", "o1z", "u1b", "u1c", "u1d", "u1f", "u1g", "u1h", "u1j", "u1k", "u1l", "u1m", "u1n", "u1p", "u1q", "u1r", "u1s", "u1ș", "u1t", "u1ț", "u1v", "u1w", "u1x", "u1z", "y1b", "y1c", "y1d", "y1f", "y1g", "y1h", "y1j", "y1k", "y1l", "y1m", "y1n", "y1p", "y1q", "y1r", "y1s", "y1ș", "y1t", "y1ț", "y1v", "y1w", "y1x", "y1z", "a2b1b", "a2b1c", "a2b1d", "a2b1f", "a2b1g", "a2b1h", "a2b1j", "a2b1k", "a2b1m", "a2b1n", "a2b1p", "a2b1q", "a2b1s", "a2b1ș", "a2b1t", "a2b1ț", "a2b1v", "a2b1w", "a2b1x", "a2b1z", "a2c1b", "a2c1c", "a2c1d", "a2c1f", "a2c1g", "a2c1j", "a2c1k", "a2c1m", "a2c1n", "a2c1p", "a2c1q", "a2c1s", "a2c1ș", "a2c1t", "a2c1ț", "a2c1v", "a2c1w", "a2c1x", "a2c1z", "a2d1b", "a2d1c", "a2d1d", "a2d1f", "a2d1g", "a2d1h", "a2d1j", "a2d1k", "a2d1m", "a2d1n", "a2d1p", "a2d1q", "a2d1s", "a2d1ș", "a2d1t", "a2d1ț", "a2d1v", "a2d1w", "a2d1x", "a2d1z", "a2f1b", "a2f1c", "a2f1d", "a2f1f", "a2f1g", "a2f1h", "a2f1j", "a2f1k", "a2f1m", "a2f1n", "a2f1p", "a2f1q", "a2f1s", "a2f1ș", "a2f1t", "a2f1ț", "a2f1v", "a2f1w", "a2f1x", "a2f1z", "a2g1b", "a2g1c", "a2g1d", "a2g1f", "a2g1g", "a2g1j", "a2g1k", "a2g1m", "a2g1n", "a2g1p", "a2g1q", "a2g1s", "a2g1ș", "a2g1t", "a2g1ț", "a2g1v", "a2g1w", "a2g1x", "a2g1z", "a2h1b", "a2h1c", "a2h1d", "a2h1f", "a2h1g", "a2h1h", "a2h1j", "a2h1k", "a2h1m", "a2h1n", "a2h1p", "a2h1q", "a2h1s", "a2h1ș", "a2h1t", "a2h1ț", "a2h1v", "a2h1w", "a2h1x", "a2h1z", "a2j1b", "a2j1c", "a2j1d", "a2j1f", "a2j1g", "a2j1h", "a2j1j", "a2j1k", "a2j1l", "a2j1m", "a2j1n", "a2j1p", "a2j1q", "a2j1r", "a2j1s", "a2j1ș", "a2j1t", "a2j1ț", "a2j1v", "a2j1w", "a2j1x", "a2j1z", "a2k1b", "a2k1c", "a2k1d", "a2k1f", "a2k1g", "a2k1h", "a2k1j", "a2k1k", "a2k1l", "a2k1m", "a2k1n", "a2k1p", "a2k1q", "a2k1r", "a2k1s", "a2k1ș", "a2k1t", "a2k1ț", "a2k1v", "a2k1w", "a2k1x", "a2k1z", "a2l1b", "a2l1c", "a2l1d", "a2l1f", "a2l1g", "a2l1h", "a2l1j", "a2l1k", "a2l1l", "a2l1m", "a2l1n", "a2l1p", "a2l1q", "a2l1r", "a2l1s", "a2l1ș", "a2l1t", "a2l1ț", "a2l1v", "a2l1w", "a2l1x", "a2l1z", "a2m1b", "a2m1c", "a2m1d", "a2m1f", "a2m1g", "a2m1h", "a2m1j", "a2m1k", "a2m1l", "a2m1m", "a2m1n", "a2m1p", "a2m1q", "a2m1r", "a2m1s", "a2m1ș", "a2m1t", "a2m1ț", "a2m1v", "a2m1w", "a2m1x", "a2m1z", "a2n1b", "a2n1c", "a2n1d", "a2n1f", "a2n1g", "a2n1h", "a2n1j", "a2n1k", "a2n1l", "a2n1m", "a2n1n", "a2n1p", "a2n1q", "a2n1r", "a2n1s", "a2n1ș", "a2n1t", "a2n1ț", "a2n1v", "a2n1w", "a2n1x", "a2n1z", "a2p1b", "a2p1c", "a2p1d", "a2p1f", "a2p1g", "a2p1h", "a2p1j", "a2p1k", "a2p1m", "a2p1n", "a2p1p", "a2p1q", "a2p1s", "a2p1ș", "a2p1t", "a2p1ț", "a2p1v", "a2p1w", "a2p1x", "a2p1z", "a2q1b", "a2q1c", "a2q1d", "a2q1f", "a2q1g", "a2q1h", "a2q1j", "a2q1k", "a2q1l", "a2q1m", "a2q1n", "a2q1p", "a2q1q", "a2q1r", "a2q1s", "a2q1ș", "a2q1t", "a2q1ț", "a2q1v", "a2q1w", "a2q1x", "a2q1z", "a2r1b", "a2r1c", "a2r1d", "a2r1f", "a2r1g", "a2r1h", "a2r1j", "a2r1k", "a2r1l", "a2r1m", "a2r1n", "a2r1p", "a2r1q", "a2r1r", "a2r1s", "a2r1ș", "a2r1t", "a2r1ț", "a2r1v", "a2r1w", "a2r1x", "a2r1z", "a2s1b", "a2s1c", "a2s1d", "a2s1f", "a2s1g", "a2s1h", "a2s1j", "a2s1k", "a2s1l", "a2s1m", "a2s1n", "a2s1p", "a2s1q", "a2s1r", "a2s1s", "a2s1ș", "a2s1t", "a2s1ț", "a2s1v", "a2s1w", "a2s1x", "a2s1z", "a2ș1b", "a2ș1c", "a2ș1d", "a2ș1f", "a2ș1g", "a2ș1h", "a2ș1j", "a2ș1k", "a2ș1l", "a2ș1m", "a2ș1n", "a2ș1p", "a2ș1q", "a2ș1r", "a2ș1s", "a2ș1ș", "a2ș1t", "a2ș1ț", "a2ș1v", "a2ș1w", "a2ș1x", "a2ș1z", "a2t1b", "a2t1c", "a2t1d", "a2t1f", "a2t1g", "a2t1h", "a2t1j", "a2t1k", "a2t1m", "a2t1n", "a2t1p", "a2t1q", "a2t1s", "a2t1ș", "a2t1t", "a2t1ț", "a2t1v", "a2t1w", "a2t1x", "a2t1z", "a2ț1b", "a2ț1c", "a2ț1d", "a2ț1f", "a2ț1g", "a2ț1h", "a2ț1j", "a2ț1k", "a2ț1l", "a2ț1m", "a2ț1n", "a2ț1p", "a2ț1q", "a2ț1r", "a2ț1s", "a2ț1ș", "a2ț1t", "a2ț1ț", "a2ț1v", "a2ț1w", "a2ț1x", "a2ț1z", "a2v1b", "a2v1c", "a2v1d", "a2v1f", "a2v1g", "a2v1h", "a2v1j", "a2v1k", "a2v1m", "a2v1n", "a2v1p", "a2v1q", "a2v1s", "a2v1ș", "a2v1t", "a2v1ț", "a2v1v", "a2v1w", "a2v1x", "a2v1z", "a2w1b", "a2w1c", "a2w1d", "a2w1f", "a2w1g", "a2w1h", "a2w1j", "a2w1k", "a2w1l", "a2w1m", "a2w1n", "a2w1p", "a2w1q", "a2w1r", "a2w1s", "a2w1ș", "a2w1t", "a2w1ț", "a2w1v", "a2w1w", "a2w1x", "a2w1z", "a2x1b", "a2x1c", "a2x1d", "a2x1f", "a2x1g", "a2x1h", "a2x1j", "a2x1k", "a2x1l", "a2x1m", "a2x1n", "a2x1p", "a2x1q", "a2x1r", "a2x1s", "a2x1ș", "a2x1t", "a2x1ț", "a2x1v", "a2x1w", "a2x1x", "a2x1z", "a2z1b", "a2z1c", "a2z1d", "a2z1f", "a2z1g", "a2z1h", "a2z1j", "a2z1k", "a2z1l", "a2z1m", "a2z1n", "a2z1p", "a2z1q", "a2z1r", "a2z1s", "a2z1ș", "a2z1t", "a2z1ț", "a2z1v", "a2z1w", "a2z1x", "a2z1z", "ă2b1b", "ă2b1c", "ă2b1d", "ă2b1f", "ă2b1g", "ă2b1h", "ă2b1j", "ă2b1k", "ă2b1m", "ă2b1n", "ă2b1p", "ă2b1q", "ă2b1s", "ă2b1ș", "ă2b1t", "ă2b1ț", "ă2b1v", "ă2b1w", "ă2b1x", "ă2b1z", "ă2c1b", "ă2c1c", "ă2c1d", "ă2c1f", "ă2c1g", "ă2c1j", "ă2c1k", "ă2c1m", "ă2c1n", "ă2c1p", "ă2c1q", "ă2c1s", "ă2c1ș", "ă2c1t", "ă2c1ț", "ă2c1v", "ă2c1w", "ă2c1x", "ă2c1z", "ă2d1b", "ă2d1c", "ă2d1d", "ă2d1f", "ă2d1g", "ă2d1h", "ă2d1j", "ă2d1k", "ă2d1m", "ă2d1n", "ă2d1p", "ă2d1q", "ă2d1s", "ă2d1ș", "ă2d1t", "ă2d1ț", "ă2d1v", "ă2d1w", "ă2d1x", "ă2d1z", "ă2f1b", "ă2f1c", "ă2f1d", "ă2f1f", "ă2f1g", "ă2f1h", "ă2f1j", "ă2f1k", "ă2f1m", "ă2f1n", "ă2f1p", "ă2f1q", "ă2f1s", "ă2f1ș", "ă2f1t", "ă2f1ț", "ă2f1v", "ă2f1w", "ă2f1x", "ă2f1z", "ă2g1b", "ă2g1c", "ă2g1d", "ă2g1f", "ă2g1g", "ă2g1j", "ă2g1k", "ă2g1m", "ă2g1n", "ă2g1p", "ă2g1q", "ă2g1s", "ă2g1ș", "ă2g1t", "ă2g1ț", "ă2g1v", "ă2g1w", "ă2g1x", "ă2g1z", "ă2h1b", "ă2h1c", "ă2h1d", "ă2h1f", "ă2h1g", "ă2h1h", "ă2h1j", "ă2h1k", "ă2h1m", "ă2h1n", "ă2h1p", "ă2h1q", "ă2h1s", "ă2h1ș", "ă2h1t", "ă2h1ț", "ă2h1v", "ă2h1w", "ă2h1x", "ă2h1z", "ă2j1b", "ă2j1c", "ă2j1d", "ă2j1f", "ă2j1g", "ă2j1h", "ă2j1j", "ă2j1k", "ă2j1l", "ă2j1m", "ă2j1n", "ă2j1p", "ă2j1q", "ă2j1r", "ă2j1s", "ă2j1ș", "ă2j1t", "ă2j1ț", "ă2j1v", "ă2j1w", "ă2j1x", "ă2j1z", "ă2k1b", "ă2k1c", "ă2k1d", "ă2k1f", "ă2k1g", "ă2k1h", "ă2k1j", "ă2k1k", "ă2k1l", "ă2k1m", "ă2k1n", "ă2k1p", "ă2k1q", "ă2k1r", "ă2k1s", "ă2k1ș", "ă2k1t", "ă2k1ț", "ă2k1v", "ă2k1w", "ă2k1x", "ă2k1z", "ă2l1b", "ă2l1c", "ă2l1d", "ă2l1f", "ă2l1g", "ă2l1h", "ă2l1j", "ă2l1k", "ă2l1l", "ă2l1m", "ă2l1n", "ă2l1p", "ă2l1q", "ă2l1r", "ă2l1s", "ă2l1ș", "ă2l1t", "ă2l1ț", "ă2l1v", "ă2l1w", "ă2l1x", "ă2l1z", "ă2m1b", "ă2m1c", "ă2m1d", "ă2m1f", "ă2m1g", "ă2m1h", "ă2m1j", "ă2m1k", "ă2m1l", "ă2m1m", "ă2m1n", "ă2m1p", "ă2m1q", "ă2m1r", "ă2m1s", "ă2m1ș", "ă2m1t", "ă2m1ț", "ă2m1v", "ă2m1w", "ă2m1x", "ă2m1z", "ă2n1b", "ă2n1c", "ă2n1d", "ă2n1f", "ă2n1g", "ă2n1h", "ă2n1j", "ă2n1k", "ă2n1l", "ă2n1m", "ă2n1n", "ă2n1p", "ă2n1q", "ă2n1r", "ă2n1s", "ă2n1ș", "ă2n1t", "ă2n1ț", "ă2n1v", "ă2n1w", "ă2n1x", "ă2n1z", "ă2p1b", "ă2p1c", "ă2p1d", "ă2p1f", "ă2p1g", "ă2p1h", "ă2p1j", "ă2p1k", "ă2p1m", "ă2p1n", "ă2p1p", "ă2p1q", "ă2p1s", "ă2p1ș", "ă2p1t", "ă2p1ț", "ă2p1v", "ă2p1w", "ă2p1x", "ă2p1z", "ă2q1b", "ă2q1c", "ă2q1d", "ă2q1f", "ă2q1g", "ă2q1h", "ă2q1j", "ă2q1k", "ă2q1l", "ă2q1m", "ă2q1n", "ă2q1p", "ă2q1q", "ă2q1r", "ă2q1s", "ă2q1ș", "ă2q1t", "ă2q1ț", "ă2q1v", "ă2q1w", "ă2q1x", "ă2q1z", "ă2r1b", "ă2r1c", "ă2r1d", "ă2r1f", "ă2r1g", "ă2r1h", "ă2r1j", "ă2r1k", "ă2r1l", "ă2r1m", "ă2r1n", "ă2r1p", "ă2r1q", "ă2r1r", "ă2r1s", "ă2r1ș", "ă2r1t", "ă2r1ț", "ă2r1v", "ă2r1w", "ă2r1x", "ă2r1z", "ă2s1b", "ă2s1c", "ă2s1d", "ă2s1f", "ă2s1g", "ă2s1h", "ă2s1j", "ă2s1k", "ă2s1l", "ă2s1m", "ă2s1n", "ă2s1p", "ă2s1q", "ă2s1r", "ă2s1s", "ă2s1ș", "ă2s1t", "ă2s1ț", "ă2s1v", "ă2s1w", "ă2s1x", "ă2s1z", "ă2ș1b", "ă2ș1c", "ă2ș1d", "ă2ș1f", "ă2ș1g", "ă2ș1h", "ă2ș1j", "ă2ș1k", "ă2ș1l", "ă2ș1m", "ă2ș1n", "ă2ș1p", "ă2ș1q", "ă2ș1r", "ă2ș1s", "ă2ș1ș", "ă2ș1t", "ă2ș1ț", "ă2ș1v", "ă2ș1w", "ă2ș1x", "ă2ș1z", "ă2t1b", "ă2t1c", "ă2t1d", "ă2t1f", "ă2t1g", "ă2t1h", "ă2t1j", "ă2t1k", "ă2t1m", "ă2t1n", "ă2t1p", "ă2t1q", "ă2t1s", "ă2t1ș", "ă2t1t", "ă2t1ț", "ă2t1v", "ă2t1w", "ă2t1x", "ă2t1z", "ă2ț1b", "ă2ț1c", "ă2ț1d", "ă2ț1f", "ă2ț1g", "ă2ț1h", "ă2ț1j", "ă2ț1k", "ă2ț1l", "ă2ț1m", "ă2ț1n", "ă2ț1p", "ă2ț1q", "ă2ț1r", "ă2ț1s", "ă2ț1ș", "ă2ț1t", "ă2ț1ț", "ă2ț1v", "ă2ț1w", "ă2ț1x", "ă2ț1z", "ă2v1b", "ă2v1c", "ă2v1d", "ă2v1f", "ă2v1g", "ă2v1h", "ă2v1j", "ă2v1k", "ă2v1m", "ă2v1n", "ă2v1p", "ă2v1q", "ă2v1s", "ă2v1ș", "ă2v1t", "ă2v1ț", "ă2v1v", "ă2v1w", "ă2v1x", "ă2v1z", "ă2w1b", "ă2w1c", "ă2w1d", "ă2w1f", "ă2w1g", "ă2w1h", "ă2w1j", "ă2w1k", "ă2w1l", "ă2w1m", "ă2w1n", "ă2w1p", "ă2w1q", "ă2w1r", "ă2w1s", "ă2w1ș", "ă2w1t", "ă2w1ț", "ă2w1v", "ă2w1w", "ă2w1x", "ă2w1z", "ă2x1b", "ă2x1c", "ă2x1d", "ă2x1f", "ă2x1g", "ă2x1h", "ă2x1j", "ă2x1k", "ă2x1l", "ă2x1m", "ă2x1n", "ă2x1p", "ă2x1q", "ă2x1r", "ă2x1s", "ă2x1ș", "ă2x1t", "ă2x1ț", "ă2x1v", "ă2x1w", "ă2x1x", "ă2x1z", "ă2z1b", "ă2z1c", "ă2z1d", "ă2z1f", "ă2z1g", "ă2z1h", "ă2z1j", "ă2z1k", "ă2z1l", "ă2z1m", "ă2z1n", "ă2z1p", "ă2z1q", "ă2z1r", "ă2z1s", "ă2z1ș", "ă2z1t", "ă2z1ț", "ă2z1v", "ă2z1w", "ă2z1x", "ă2z1z", "â2b1b", "â2b1c", "â2b1d", "â2b1f", "â2b1g", "â2b1h", "â2b1j", "â2b1k", "â2b1m", "â2b1n", "â2b1p", "â2b1q", "â2b1s", "â2b1ș", "â2b1t", "â2b1ț", "â2b1v", "â2b1w", "â2b1x", "â2b1z", "â2c1b", "â2c1c", "â2c1d", "â2c1f", "â2c1g", "â2c1j", "â2c1k", "â2c1m", "â2c1n", "â2c1p", "â2c1q", "â2c1s", "â2c1ș", "â2c1t", "â2c1ț", "â2c1v", "â2c1w", "â2c1x", "â2c1z", "â2d1b", "â2d1c", "â2d1d", "â2d1f", "â2d1g", "â2d1h", "â2d1j", "â2d1k", "â2d1m", "â2d1n", "â2d1p", "â2d1q", "â2d1s", "â2d1ș", "â2d1t", "â2d1ț", "â2d1v", "â2d1w", "â2d1x", "â2d1z", "â2f1b", "â2f1c", "â2f1d", "â2f1f", "â2f1g", "â2f1h", "â2f1j", "â2f1k", "â2f1m", "â2f1n", "â2f1p", "â2f1q", "â2f1s", "â2f1ș", "â2f1t", "â2f1ț", "â2f1v", "â2f1w", "â2f1x", "â2f1z", "â2g1b", "â2g1c", "â2g1d", "â2g1f", "â2g1g", "â2g1j", "â2g1k", "â2g1m", "â2g1n", "â2g1p", "â2g1q", "â2g1s", "â2g1ș", "â2g1t", "â2g1ț", "â2g1v", "â2g1w", "â2g1x", "â2g1z", "â2h1b", "â2h1c", "â2h1d", "â2h1f", "â2h1g", "â2h1h", "â2h1j", "â2h1k", "â2h1m", "â2h1n", "â2h1p", "â2h1q", "â2h1s", "â2h1ș", "â2h1t", "â2h1ț", "â2h1v", "â2h1w", "â2h1x", "â2h1z", "â2j1b", "â2j1c", "â2j1d", "â2j1f", "â2j1g", "â2j1h", "â2j1j", "â2j1k", "â2j1l", "â2j1m", "â2j1n", "â2j1p", "â2j1q", "â2j1r", "â2j1s", "â2j1ș", "â2j1t", "â2j1ț", "â2j1v", "â2j1w", "â2j1x", "â2j1z", "â2k1b", "â2k1c", "â2k1d", "â2k1f", "â2k1g", "â2k1h", "â2k1j", "â2k1k", "â2k1l", "â2k1m", "â2k1n", "â2k1p", "â2k1q", "â2k1r", "â2k1s", "â2k1ș", "â2k1t", "â2k1ț", "â2k1v", "â2k1w", "â2k1x", "â2k1z", "â2l1b", "â2l1c", "â2l1d", "â2l1f", "â2l1g", "â2l1h", "â2l1j", "â2l1k", "â2l1l", "â2l1m", "â2l1n", "â2l1p", "â2l1q", "â2l1r", "â2l1s", "â2l1ș", "â2l1t", "â2l1ț", "â2l1v", "â2l1w", "â2l1x", "â2l1z", "â2m1b", "â2m1c", "â2m1d", "â2m1f", "â2m1g", "â2m1h", "â2m1j", "â2m1k", "â2m1l", "â2m1m", "â2m1n", "â2m1p", "â2m1q", "â2m1r", "â2m1s", "â2m1ș", "â2m1t", "â2m1ț", "â2m1v", "â2m1w", "â2m1x", "â2m1z", "â2n1b", "â2n1c", "â2n1d", "â2n1f", "â2n1g", "â2n1h", "â2n1j", "â2n1k", "â2n1l", "â2n1m", "â2n1n", "â2n1p", "â2n1q", "â2n1r", "â2n1s", "â2n1ș", "â2n1t", "â2n1ț", "â2n1v", "â2n1w", "â2n1x", "â2n1z", "â2p1b", "â2p1c", "â2p1d", "â2p1f", "â2p1g", "â2p1h", "â2p1j", "â2p1k", "â2p1m", "â2p1n", "â2p1p", "â2p1q", "â2p1s", "â2p1ș", "â2p1t", "â2p1ț", "â2p1v", "â2p1w", "â2p1x", "â2p1z", "â2q1b", "â2q1c", "â2q1d", "â2q1f", "â2q1g", "â2q1h", "â2q1j", "â2q1k", "â2q1l", "â2q1m", "â2q1n", "â2q1p", "â2q1q", "â2q1r", "â2q1s", "â2q1ș", "â2q1t", "â2q1ț", "â2q1v", "â2q1w", "â2q1x", "â2q1z", "â2r1b", "â2r1c", "â2r1d", "â2r1f", "â2r1g", "â2r1h", "â2r1j", "â2r1k", "â2r1l", "â2r1m", "â2r1n", "â2r1p", "â2r1q", "â2r1r", "â2r1s", "â2r1ș", "â2r1t", "â2r1ț", "â2r1v", "â2r1w", "â2r1x", "â2r1z", "â2s1b", "â2s1c", "â2s1d", "â2s1f", "â2s1g", "â2s1h", "â2s1j", "â2s1k", "â2s1l", "â2s1m", "â2s1n", "â2s1p", "â2s1q", "â2s1r", "â2s1s", "â2s1ș", "â2s1t", "â2s1ț", "â2s1v", "â2s1w", "â2s1x", "â2s1z", "â2ș1b", "â2ș1c", "â2ș1d", "â2ș1f", "â2ș1g", "â2ș1h", "â2ș1j", "â2ș1k", "â2ș1l", "â2ș1m", "â2ș1n", "â2ș1p", "â2ș1q", "â2ș1r", "â2ș1s", "â2ș1ș", "â2ș1t", "â2ș1ț", "â2ș1v", "â2ș1w", "â2ș1x", "â2ș1z", "â2t1b", "â2t1c", "â2t1d", "â2t1f", "â2t1g", "â2t1h", "â2t1j", "â2t1k", "â2t1m", "â2t1n", "â2t1p", "â2t1q", "â2t1s", "â2t1ș", "â2t1t", "â2t1ț", "â2t1v", "â2t1w", "â2t1x", "â2t1z", "â2ț1b", "â2ț1c", "â2ț1d", "â2ț1f", "â2ț1g", "â2ț1h", "â2ț1j", "â2ț1k", "â2ț1l", "â2ț1m", "â2ț1n", "â2ț1p", "â2ț1q", "â2ț1r", "â2ț1s", "â2ț1ș", "â2ț1t", "â2ț1ț", "â2ț1v", "â2ț1w", "â2ț1x", "â2ț1z", "â2v1b", "â2v1c", "â2v1d", "â2v1f", "â2v1g", "â2v1h", "â2v1j", "â2v1k", "â2v1m", "â2v1n", "â2v1p", "â2v1q", "â2v1s", "â2v1ș", "â2v1t", "â2v1ț", "â2v1v", "â2v1w", "â2v1x", "â2v1z", "â2w1b", "â2w1c", "â2w1d", "â2w1f", "â2w1g", "â2w1h", "â2w1j", "â2w1k", "â2w1l", "â2w1m", "â2w1n", "â2w1p", "â2w1q", "â2w1r", "â2w1s", "â2w1ș", "â2w1t", "â2w1ț", "â2w1v", "â2w1w", "â2w1x", "â2w1z", "â2x1b", "â2x1c", "â2x1d", "â2x1f", "â2x1g", "â2x1h", "â2x1j", "â2x1k", "â2x1l", "â2x1m", "â2x1n", "â2x1p", "â2x1q", "â2x1r", "â2x1s", "â2x1ș", "â2x1t", "â2x1ț", "â2x1v", "â2x1w", "â2x1x", "â2x1z", "â2z1b", "â2z1c", "â2z1d", "â2z1f", "â2z1g", "â2z1h", "â2z1j", "â2z1k", "â2z1l", "â2z1m", "â2z1n", "â2z1p", "â2z1q", "â2z1r", "â2z1s", "â2z1ș", "â2z1t", "â2z1ț", "â2z1v", "â2z1w", "â2z1x", "â2z1z", "e2b1b", "e2b1c", "e2b1d", "e2b1f", "e2b1g", "e2b1h", "e2b1j", "e2b1k", "e2b1m", "e2b1n", "e2b1p", "e2b1q", "e2b1s", "e2b1ș", "e2b1t", "e2b1ț", "e2b1v", "e2b1w", "e2b1x", "e2b1z", "e2c1b", "e2c1c", "e2c1d", "e2c1f", "e2c1g", "e2c1j", "e2c1k", "e2c1m", "e2c1n", "e2c1p", "e2c1q", "e2c1s", "e2c1ș", "e2c1t", "e2c1ț", "e2c1v", "e2c1w", "e2c1x", "e2c1z", "e2d1b", "e2d1c", "e2d1d", "e2d1f", "e2d1g", "e2d1h", "e2d1j", "e2d1k", "e2d1m", "e2d1n", "e2d1p", "e2d1q", "e2d1s", "e2d1ș", "e2d1t", "e2d1ț", "e2d1v", "e2d1w", "e2d1x", "e2d1z", "e2f1b", "e2f1c", "e2f1d", "e2f1f", "e2f1g", "e2f1h", "e2f1j", "e2f1k", "e2f1m", "e2f1n", "e2f1p", "e2f1q", "e2f1s", "e2f1ș", "e2f1t", "e2f1ț", "e2f1v", "e2f1w", "e2f1x", "e2f1z", "e2g1b", "e2g1c", "e2g1d", "e2g1f", "e2g1g", "e2g1j", "e2g1k", "e2g1m", "e2g1n", "e2g1p", "e2g1q", "e2g1s", "e2g1ș", "e2g1t", "e2g1ț", "e2g1v", "e2g1w", "e2g1x", "e2g1z", "e2h1b", "e2h1c", "e2h1d", "e2h1f", "e2h1g", "e2h1h", "e2h1j", "e2h1k", "e2h1m", "e2h1n", "e2h1p", "e2h1q", "e2h1s", "e2h1ș", "e2h1t", "e2h1ț", "e2h1v", "e2h1w", "e2h1x", "e2h1z", "e2j1b", "e2j1c", "e2j1d", "e2j1f", "e2j1g", "e2j1h", "e2j1j", "e2j1k", "e2j1l", "e2j1m", "e2j1n", "e2j1p", "e2j1q", "e2j1r", "e2j1s", "e2j1ș", "e2j1t", "e2j1ț", "e2j1v", "e2j1w", "e2j1x", "e2j1z", "e2k1b", "e2k1c", "e2k1d", "e2k1f", "e2k1g", "e2k1h", "e2k1j", "e2k1k", "e2k1l", "e2k1m", "e2k1n", "e2k1p", "e2k1q", "e2k1r", "e2k1s", "e2k1ș", "e2k1t", "e2k1ț", "e2k1v", "e2k1w", "e2k1x", "e2k1z", "e2l1b", "e2l1c", "e2l1d", "e2l1f", "e2l1g", "e2l1h", "e2l1j", "e2l1k", "e2l1l", "e2l1m", "e2l1n", "e2l1p", "e2l1q", "e2l1r", "e2l1s", "e2l1ș", "e2l1t", "e2l1ț", "e2l1v", "e2l1w", "e2l1x", "e2l1z", "e2m1b", "e2m1c", "e2m1d", "e2m1f", "e2m1g", "e2m1h", "e2m1j", "e2m1k", "e2m1l", "e2m1m", "e2m1n", "e2m1p", "e2m1q", "e2m1r", "e2m1s", "e2m1ș", "e2m1t", "e2m1ț", "e2m1v", "e2m1w", "e2m1x", "e2m1z", "e2n1b", "e2n1c", "e2n1d", "e2n1f", "e2n1g", "e2n1h", "e2n1j", "e2n1k", "e2n1l", "e2n1m", "e2n1n", "e2n1p", "e2n1q", "e2n1r", "e2n1s", "e2n1ș", "e2n1t", "e2n1ț", "e2n1v", "e2n1w", "e2n1x", "e2n1z", "e2p1b", "e2p1c", "e2p1d", "e2p1f", "e2p1g", "e2p1h", "e2p1j", "e2p1k", "e2p1m", "e2p1n", "e2p1p", "e2p1q", "e2p1s", "e2p1ș", "e2p1t", "e2p1ț", "e2p1v", "e2p1w", "e2p1x", "e2p1z", "e2q1b", "e2q1c", "e2q1d", "e2q1f", "e2q1g", "e2q1h", "e2q1j", "e2q1k", "e2q1l", "e2q1m", "e2q1n", "e2q1p", "e2q1q", "e2q1r", "e2q1s", "e2q1ș", "e2q1t", "e2q1ț", "e2q1v", "e2q1w", "e2q1x", "e2q1z", "e2r1b", "e2r1c", "e2r1d", "e2r1f", "e2r1g", "e2r1h", "e2r1j", "e2r1k", "e2r1l", "e2r1m", "e2r1n", "e2r1p", "e2r1q", "e2r1r", "e2r1s", "e2r1ș", "e2r1t", "e2r1ț", "e2r1v", "e2r1w", "e2r1x", "e2r1z", "e2s1b", "e2s1c", "e2s1d", "e2s1f", "e2s1g", "e2s1h", "e2s1j", "e2s1k", "e2s1l", "e2s1m", "e2s1n", "e2s1p", "e2s1q", "e2s1r", "e2s1s", "e2s1ș", "e2s1t", "e2s1ț", "e2s1v", "e2s1w", "e2s1x", "e2s1z", "e2ș1b", "e2ș1c", "e2ș1d", "e2ș1f", "e2ș1g", "e2ș1h", "e2ș1j", "e2ș1k", "e2ș1l", "e2ș1m", "e2ș1n", "e2ș1p", "e2ș1q", "e2ș1r", "e2ș1s", "e2ș1ș", "e2ș1t", "e2ș1ț", "e2ș1v", "e2ș1w", "e2ș1x", "e2ș1z", "e2t1b", "e2t1c", "e2t1d", "e2t1f", "e2t1g", "e2t1h", "e2t1j", "e2t1k", "e2t1m", "e2t1n", "e2t1p", "e2t1q", "e2t1s", "e2t1ș", "e2t1t", "e2t1ț", "e2t1v", "e2t1w", "e2t1x", "e2t1z", "e2ț1b", "e2ț1c", "e2ț1d", "e2ț1f", "e2ț1g", "e2ț1h", "e2ț1j", "e2ț1k", "e2ț1l", "e2ț1m", "e2ț1n", "e2ț1p", "e2ț1q", "e2ț1r", "e2ț1s", "e2ț1ș", "e2ț1t", "e2ț1ț", "e2ț1v", "e2ț1w", "e2ț1x", "e2ț1z", "e2v1b", "e2v1c", "e2v1d", "e2v1f", "e2v1g", "e2v1h", "e2v1j", "e2v1k", "e2v1m", "e2v1n", "e2v1p", "e2v1q", "e2v1s", "e2v1ș", "e2v1t", "e2v1ț", "e2v1v", "e2v1w", "e2v1x", "e2v1z", "e2w1b", "e2w1c", "e2w1d", "e2w1f", "e2w1g", "e2w1h", "e2w1j", "e2w1k", "e2w1l", "e2w1m", "e2w1n", "e2w1p", "e2w1q", "e2w1r", "e2w1s", "e2w1ș", "e2w1t", "e2w1ț", "e2w1v", "e2w1w", "e2w1x", "e2w1z", "e2x1b", "e2x1c", "e2x1d", "e2x1f", "e2x1g", "e2x1h", "e2x1j", "e2x1k", "e2x1l", "e2x1m", "e2x1n", "e2x1p", "e2x1q", "e2x1r", "e2x1s", "e2x1ș", "e2x1t", "e2x1ț", "e2x1v", "e2x1w", "e2x1x", "e2x1z", "e2z1b", "e2z1c", "e2z1d", "e2z1f", "e2z1g", "e2z1h", "e2z1j", "e2z1k", "e2z1l", "e2z1m", "e2z1n", "e2z1p", "e2z1q", "e2z1r", "e2z1s", "e2z1ș", "e2z1t", "e2z1ț", "e2z1v", "e2z1w", "e2z1x", "e2z1z", "i2b1b", "i2b1c", "i2b1d", "i2b1f", "i2b1g", "i2b1h", "i2b1j", "i2b1k", "i2b1m", "i2b1n", "i2b1p", "i2b1q", "i2b1s", "i2b1ș", "i2b1t", "i2b1ț", "i2b1v", "i2b1w", "i2b1x", "i2b1z", "i2c1b", "i2c1c", "i2c1d", "i2c1f", "i2c1g", "i2c1j", "i2c1k", "i2c1m", "i2c1n", "i2c1p", "i2c1q", "i2c1s", "i2c1ș", "i2c1t", "i2c1ț", "i2c1v", "i2c1w", "i2c1x", "i2c1z", "i2d1b", "i2d1c", "i2d1d", "i2d1f", "i2d1g", "i2d1h", "i2d1j", "i2d1k", "i2d1m", "i2d1n", "i2d1p", "i2d1q", "i2d1s", "i2d1ș", "i2d1t", "i2d1ț", "i2d1v", "i2d1w", "i2d1x", "i2d1z", "i2f1b", "i2f1c", "i2f1d", "i2f1f", "i2f1g", "i2f1h", "i2f1j", "i2f1k", "i2f1m", "i2f1n", "i2f1p", "i2f1q", "i2f1s", "i2f1ș", "i2f1t", "i2f1ț", "i2f1v", "i2f1w", "i2f1x", "i2f1z", "i2g1b", "i2g1c", "i2g1d", "i2g1f", "i2g1g", "i2g1j", "i2g1k", "i2g1m", "i2g1n", "i2g1p", "i2g1q", "i2g1s", "i2g1ș", "i2g1t", "i2g1ț", "i2g1v", "i2g1w", "i2g1x", "i2g1z", "i2h1b", "i2h1c", "i2h1d", "i2h1f", "i2h1g", "i2h1h", "i2h1j", "i2h1k", "i2h1m", "i2h1n", "i2h1p", "i2h1q", "i2h1s", "i2h1ș", "i2h1t", "i2h1ț", "i2h1v", "i2h1w", "i2h1x", "i2h1z", "i2j1b", "i2j1c", "i2j1d", "i2j1f", "i2j1g", "i2j1h", "i2j1j", "i2j1k", "i2j1l", "i2j1m", "i2j1n", "i2j1p", "i2j1q", "i2j1r", "i2j1s", "i2j1ș", "i2j1t", "i2j1ț", "i2j1v", "i2j1w", "i2j1x", "i2j1z", "i2k1b", "i2k1c", "i2k1d", "i2k1f", "i2k1g", "i2k1h", "i2k1j", "i2k1k", "i2k1l", "i2k1m", "i2k1n", "i2k1p", "i2k1q", "i2k1r", "i2k1s", "i2k1ș", "i2k1t", "i2k1ț", "i2k1v", "i2k1w", "i2k1x", "i2k1z", "i2l1b", "i2l1c", "i2l1d", "i2l1f", "i2l1g", "i2l1h", "i2l1j", "i2l1k", "i2l1l", "i2l1m", "i2l1n", "i2l1p", "i2l1q", "i2l1r", "i2l1s", "i2l1ș", "i2l1t", "i2l1ț", "i2l1v", "i2l1w", "i2l1x", "i2l1z", "i2m1b", "i2m1c", "i2m1d", "i2m1f", "i2m1g", "i2m1h", "i2m1j", "i2m1k", "i2m1l", "i2m1m", "i2m1n", "i2m1p", "i2m1q", "i2m1r", "i2m1s", "i2m1ș", "i2m1t", "i2m1ț", "i2m1v", "i2m1w", "i2m1x", "i2m1z", "i2n1b", "i2n1c", "i2n1d", "i2n1f", "i2n1g", "i2n1h", "i2n1j", "i2n1k", "i2n1l", "i2n1m", "i2n1n", "i2n1p", "i2n1q", "i2n1r", "i2n1s", "i2n1ș", "i2n1t", "i2n1ț", "i2n1v", "i2n1w", "i2n1x", "i2n1z", "i2p1b", "i2p1c", "i2p1d", "i2p1f", "i2p1g", "i2p1h", "i2p1j", "i2p1k", "i2p1m", "i2p1n", "i2p1p", "i2p1q", "i2p1s", "i2p1ș", "i2p1t", "i2p1ț", "i2p1v", "i2p1w", "i2p1x", "i2p1z", "i2q1b", "i2q1c", "i2q1d", "i2q1f", "i2q1g", "i2q1h", "i2q1j", "i2q1k", "i2q1l", "i2q1m", "i2q1n", "i2q1p", "i2q1q", "i2q1r", "i2q1s", "i2q1ș", "i2q1t", "i2q1ț", "i2q1v", "i2q1w", "i2q1x", "i2q1z", "i2r1b", "i2r1c", "i2r1d", "i2r1f", "i2r1g", "i2r1h", "i2r1j", "i2r1k", "i2r1l", "i2r1m", "i2r1n", "i2r1p", "i2r1q", "i2r1r", "i2r1s", "i2r1ș", "i2r1t", "i2r1ț", "i2r1v", "i2r1w", "i2r1x", "i2r1z", "i2s1b", "i2s1c", "i2s1d", "i2s1f", "i2s1g", "i2s1h", "i2s1j", "i2s1k", "i2s1l", "i2s1m", "i2s1n", "i2s1p", "i2s1q", "i2s1r", "i2s1s", "i2s1ș", "i2s1t", "i2s1ț", "i2s1v", "i2s1w", "i2s1x", "i2s1z", "i2ș1b", "i2ș1c", "i2ș1d", "i2ș1f", "i2ș1g", "i2ș1h", "i2ș1j", "i2ș1k", "i2ș1l", "i2ș1m", "i2ș1n", "i2ș1p", "i2ș1q", "i2ș1r", "i2ș1s", "i2ș1ș", "i2ș1t", "i2ș1ț", "i2ș1v", "i2ș1w", "i2ș1x", "i2ș1z", "i2t1b", "i2t1c", "i2t1d", "i2t1f", "i2t1g", "i2t1h", "i2t1j", "i2t1k", "i2t1m", "i2t1n", "i2t1p", "i2t1q", "i2t1s", "i2t1ș", "i2t1t", "i2t1ț", "i2t1v", "i2t1w", "i2t1x", "i2t1z", "i2ț1b", "i2ț1c", "i2ț1d", "i2ț1f", "i2ț1g", "i2ț1h", "i2ț1j", "i2ț1k", "i2ț1l", "i2ț1m", "i2ț1n", "i2ț1p", "i2ț1q", "i2ț1r", "i2ț1s", "i2ț1ș", "i2ț1t", "i2ț1ț", "i2ț1v", "i2ț1w", "i2ț1x", "i2ț1z", "i2v1b", "i2v1c", "i2v1d", "i2v1f", "i2v1g", "i2v1h", "i2v1j", "i2v1k", "i2v1m", "i2v1n", "i2v1p", "i2v1q", "i2v1s", "i2v1ș", "i2v1t", "i2v1ț", "i2v1v", "i2v1w", "i2v1x", "i2v1z", "i2w1b", "i2w1c", "i2w1d", "i2w1f", "i2w1g", "i2w1h", "i2w1j", "i2w1k", "i2w1l", "i2w1m", "i2w1n", "i2w1p", "i2w1q", "i2w1r", "i2w1s", "i2w1ș", "i2w1t", "i2w1ț", "i2w1v", "i2w1w", "i2w1x", "i2w1z", "i2x1b", "i2x1c", "i2x1d", "i2x1f", "i2x1g", "i2x1h", "i2x1j", "i2x1k", "i2x1l", "i2x1m", "i2x1n", "i2x1p", "i2x1q", "i2x1r", "i2x1s", "i2x1ș", "i2x1t", "i2x1ț", "i2x1v", "i2x1w", "i2x1x", "i2x1z", "i2z1b", "i2z1c", "i2z1d", "i2z1f", "i2z1g", "i2z1h", "i2z1j", "i2z1k", "i2z1l", "i2z1m", "i2z1n", "i2z1p", "i2z1q", "i2z1r", "i2z1s", "i2z1ș", "i2z1t", "i2z1ț", "i2z1v", "i2z1w", "i2z1x", "i2z1z", "î2b1b", "î2b1c", "î2b1d", "î2b1f", "î2b1g", "î2b1h", "î2b1j", "î2b1k", "î2b1m", "î2b1n", "î2b1p", "î2b1q", "î2b1s", "î2b1ș", "î2b1t", "î2b1ț", "î2b1v", "î2b1w", "î2b1x", "î2b1z", "î2c1b", "î2c1c", "î2c1d", "î2c1f", "î2c1g", "î2c1j", "î2c1k", "î2c1m", "î2c1n", "î2c1p", "î2c1q", "î2c1s", "î2c1ș", "î2c1t", "î2c1ț", "î2c1v", "î2c1w", "î2c1x", "î2c1z", "î2d1b", "î2d1c", "î2d1d", "î2d1f", "î2d1g", "î2d1h", "î2d1j", "î2d1k", "î2d1m", "î2d1n", "î2d1p", "î2d1q", "î2d1s", "î2d1ș", "î2d1t", "î2d1ț", "î2d1v", "î2d1w", "î2d1x", "î2d1z", "î2f1b", "î2f1c", "î2f1d", "î2f1f", "î2f1g", "î2f1h", "î2f1j", "î2f1k", "î2f1m", "î2f1n", "î2f1p", "î2f1q", "î2f1s", "î2f1ș", "î2f1t", "î2f1ț", "î2f1v", "î2f1w", "î2f1x", "î2f1z", "î2g1b", "î2g1c", "î2g1d", "î2g1f", "î2g1g", "î2g1j", "î2g1k", "î2g1m", "î2g1n", "î2g1p", "î2g1q", "î2g1s", "î2g1ș", "î2g1t", "î2g1ț", "î2g1v", "î2g1w", "î2g1x", "î2g1z", "î2h1b", "î2h1c", "î2h1d", "î2h1f", "î2h1g", "î2h1h", "î2h1j", "î2h1k", "î2h1m", "î2h1n", "î2h1p", "î2h1q", "î2h1s", "î2h1ș", "î2h1t", "î2h1ț", "î2h1v", "î2h1w", "î2h1x", "î2h1z", "î2j1b", "î2j1c", "î2j1d", "î2j1f", "î2j1g", "î2j1h", "î2j1j", "î2j1k", "î2j1l", "î2j1m", "î2j1n", "î2j1p", "î2j1q", "î2j1r", "î2j1s", "î2j1ș", "î2j1t", "î2j1ț", "î2j1v", "î2j1w", "î2j1x", "î2j1z", "î2k1b", "î2k1c", "î2k1d", "î2k1f", "î2k1g", "î2k1h", "î2k1j", "î2k1k", "î2k1l", "î2k1m", "î2k1n", "î2k1p", "î2k1q", "î2k1r", "î2k1s", "î2k1ș", "î2k1t", "î2k1ț", "î2k1v", "î2k1w", "î2k1x", "î2k1z", "î2l1b", "î2l1c", "î2l1d", "î2l1f", "î2l1g", "î2l1h", "î2l1j", "î2l1k", "î2l1l", "î2l1m", "î2l1n", "î2l1p", "î2l1q", "î2l1r", "î2l1s", "î2l1ș", "î2l1t", "î2l1ț", "î2l1v", "î2l1w", "î2l1x", "î2l1z", "î2m1b", "î2m1c", "î2m1d", "î2m1f", "î2m1g", "î2m1h", "î2m1j", "î2m1k", "î2m1l", "î2m1m", "î2m1n", "î2m1p", "î2m1q", "î2m1r", "î2m1s", "î2m1ș", "î2m1t", "î2m1ț", "î2m1v", "î2m1w", "î2m1x", "î2m1z", "î2n1b", "î2n1c", "î2n1d", "î2n1f", "î2n1g", "î2n1h", "î2n1j", "î2n1k", "î2n1l", "î2n1m", "î2n1n", "î2n1p", "î2n1q", "î2n1r", "î2n1s", "î2n1ș", "î2n1t", "î2n1ț", "î2n1v", "î2n1w", "î2n1x", "î2n1z", "î2p1b", "î2p1c", "î2p1d", "î2p1f", "î2p1g", "î2p1h", "î2p1j", "î2p1k", "î2p1m", "î2p1n", "î2p1p", "î2p1q", "î2p1s", "î2p1ș", "î2p1t", "î2p1ț", "î2p1v", "î2p1w", "î2p1x", "î2p1z", "î2q1b", "î2q1c", "î2q1d", "î2q1f", "î2q1g", "î2q1h", "î2q1j", "î2q1k", "î2q1l", "î2q1m", "î2q1n", "î2q1p", "î2q1q", "î2q1r", "î2q1s", "î2q1ș", "î2q1t", "î2q1ț", "î2q1v", "î2q1w", "î2q1x", "î2q1z", "î2r1b", "î2r1c", "î2r1d", "î2r1f", "î2r1g", "î2r1h", "î2r1j", "î2r1k", "î2r1l", "î2r1m", "î2r1n", "î2r1p", "î2r1q", "î2r1r", "î2r1s", "î2r1ș", "î2r1t", "î2r1ț", "î2r1v", "î2r1w", "î2r1x", "î2r1z", "î2s1b", "î2s1c", "î2s1d", "î2s1f", "î2s1g", "î2s1h", "î2s1j", "î2s1k", "î2s1l", "î2s1m", "î2s1n", "î2s1p", "î2s1q", "î2s1r", "î2s1s", "î2s1ș", "î2s1t", "î2s1ț", "î2s1v", "î2s1w", "î2s1x", "î2s1z", "î2ș1b", "î2ș1c", "î2ș1d", "î2ș1f", "î2ș1g", "î2ș1h", "î2ș1j", "î2ș1k", "î2ș1l", "î2ș1m", "î2ș1n", "î2ș1p", "î2ș1q", "î2ș1r", "î2ș1s", "î2ș1ș", "î2ș1t", "î2ș1ț", "î2ș1v", "î2ș1w", "î2ș1x", "î2ș1z", "î2t1b", "î2t1c", "î2t1d", "î2t1f", "î2t1g", "î2t1h", "î2t1j", "î2t1k", "î2t1m", "î2t1n", "î2t1p", "î2t1q", "î2t1s", "î2t1ș", "î2t1t", "î2t1ț", "î2t1v", "î2t1w", "î2t1x", "î2t1z", "î2ț1b", "î2ț1c", "î2ț1d", "î2ț1f", "î2ț1g", "î2ț1h", "î2ț1j", "î2ț1k", "î2ț1l", "î2ț1m", "î2ț1n", "î2ț1p", "î2ț1q", "î2ț1r", "î2ț1s", "î2ț1ș", "î2ț1t", "î2ț1ț", "î2ț1v", "î2ț1w", "î2ț1x", "î2ț1z", "î2v1b", "î2v1c", "î2v1d", "î2v1f", "î2v1g", "î2v1h", "î2v1j", "î2v1k", "î2v1m", "î2v1n", "î2v1p", "î2v1q", "î2v1s", "î2v1ș", "î2v1t", "î2v1ț", "î2v1v", "î2v1w", "î2v1x", "î2v1z", "î2w1b", "î2w1c", "î2w1d", "î2w1f", "î2w1g", "î2w1h", "î2w1j", "î2w1k", "î2w1l", "î2w1m", "î2w1n", "î2w1p", "î2w1q", "î2w1r", "î2w1s", "î2w1ș", "î2w1t", "î2w1ț", "î2w1v", "î2w1w", "î2w1x", "î2w1z", "î2x1b", "î2x1c", "î2x1d", "î2x1f", "î2x1g", "î2x1h", "î2x1j", "î2x1k", "î2x1l", "î2x1m", "î2x1n", "î2x1p", "î2x1q", "î2x1r", "î2x1s", "î2x1ș", "î2x1t", "î2x1ț", "î2x1v", "î2x1w", "î2x1x", "î2x1z", "î2z1b", "î2z1c", "î2z1d", "î2z1f", "î2z1g", "î2z1h", "î2z1j", "î2z1k", "î2z1l", "î2z1m", "î2z1n", "î2z1p", "î2z1q", "î2z1r", "î2z1s", "î2z1ș", "î2z1t", "î2z1ț", "î2z1v", "î2z1w", "î2z1x", "î2z1z", "o2b1b", "o2b1c", "o2b1d", "o2b1f", "o2b1g", "o2b1h", "o2b1j", "o2b1k", "o2b1m", "o2b1n", "o2b1p", "o2b1q", "o2b1s", "o2b1ș", "o2b1t", "o2b1ț", "o2b1v", "o2b1w", "o2b1x", "o2b1z", "o2c1b", "o2c1c", "o2c1d", "o2c1f", "o2c1g", "o2c1j", "o2c1k", "o2c1m", "o2c1n", "o2c1p", "o2c1q", "o2c1s", "o2c1ș", "o2c1t", "o2c1ț", "o2c1v", "o2c1w", "o2c1x", "o2c1z", "o2d1b", "o2d1c", "o2d1d", "o2d1f", "o2d1g", "o2d1h", "o2d1j", "o2d1k", "o2d1m", "o2d1n", "o2d1p", "o2d1q", "o2d1s", "o2d1ș", "o2d1t", "o2d1ț", "o2d1v", "o2d1w", "o2d1x", "o2d1z", "o2f1b", "o2f1c", "o2f1d", "o2f1f", "o2f1g", "o2f1h", "o2f1j", "o2f1k", "o2f1m", "o2f1n", "o2f1p", "o2f1q", "o2f1s", "o2f1ș", "o2f1t", "o2f1ț", "o2f1v", "o2f1w", "o2f1x", "o2f1z", "o2g1b", "o2g1c", "o2g1d", "o2g1f", "o2g1g", "o2g1j", "o2g1k", "o2g1m", "o2g1n", "o2g1p", "o2g1q", "o2g1s", "o2g1ș", "o2g1t", "o2g1ț", "o2g1v", "o2g1w", "o2g1x", "o2g1z", "o2h1b", "o2h1c", "o2h1d", "o2h1f", "o2h1g", "o2h1h", "o2h1j", "o2h1k", "o2h1m", "o2h1n", "o2h1p", "o2h1q", "o2h1s", "o2h1ș", "o2h1t", "o2h1ț", "o2h1v", "o2h1w", "o2h1x", "o2h1z", "o2j1b", "o2j1c", "o2j1d", "o2j1f", "o2j1g", "o2j1h", "o2j1j", "o2j1k", "o2j1l", "o2j1m", "o2j1n", "o2j1p", "o2j1q", "o2j1r", "o2j1s", "o2j1ș", "o2j1t", "o2j1ț", "o2j1v", "o2j1w", "o2j1x", "o2j1z", "o2k1b", "o2k1c", "o2k1d", "o2k1f", "o2k1g", "o2k1h", "o2k1j", "o2k1k", "o2k1l", "o2k1m", "o2k1n", "o2k1p", "o2k1q", "o2k1r", "o2k1s", "o2k1ș", "o2k1t", "o2k1ț", "o2k1v", "o2k1w", "o2k1x", "o2k1z", "o2l1b", "o2l1c", "o2l1d", "o2l1f", "o2l1g", "o2l1h", "o2l1j", "o2l1k", "o2l1l", "o2l1m", "o2l1n", "o2l1p", "o2l1q", "o2l1r", "o2l1s", "o2l1ș", "o2l1t", "o2l1ț", "o2l1v", "o2l1w", "o2l1x", "o2l1z", "o2m1b", "o2m1c", "o2m1d", "o2m1f", "o2m1g", "o2m1h", "o2m1j", "o2m1k", "o2m1l", "o2m1m", "o2m1n", "o2m1p", "o2m1q", "o2m1r", "o2m1s", "o2m1ș", "o2m1t", "o2m1ț", "o2m1v", "o2m1w", "o2m1x", "o2m1z", "o2n1b", "o2n1c", "o2n1d", "o2n1f", "o2n1g", "o2n1h", "o2n1j", "o2n1k", "o2n1l", "o2n1m", "o2n1n", "o2n1p", "o2n1q", "o2n1r", "o2n1s", "o2n1ș", "o2n1t", "o2n1ț", "o2n1v", "o2n1w", "o2n1x", "o2n1z", "o2p1b", "o2p1c", "o2p1d", "o2p1f", "o2p1g", "o2p1h", "o2p1j", "o2p1k", "o2p1m", "o2p1n", "o2p1p", "o2p1q", "o2p1s", "o2p1ș", "o2p1t", "o2p1ț", "o2p1v", "o2p1w", "o2p1x", "o2p1z", "o2q1b", "o2q1c", "o2q1d", "o2q1f", "o2q1g", "o2q1h", "o2q1j", "o2q1k", "o2q1l", "o2q1m", "o2q1n", "o2q1p", "o2q1q", "o2q1r", "o2q1s", "o2q1ș", "o2q1t", "o2q1ț", "o2q1v", "o2q1w", "o2q1x", "o2q1z", "o2r1b", "o2r1c", "o2r1d", "o2r1f", "o2r1g", "o2r1h", "o2r1j", "o2r1k", "o2r1l", "o2r1m", "o2r1n", "o2r1p", "o2r1q", "o2r1r", "o2r1s", "o2r1ș", "o2r1t", "o2r1ț", "o2r1v", "o2r1w", "o2r1x", "o2r1z", "o2s1b", "o2s1c", "o2s1d", "o2s1f", "o2s1g", "o2s1h", "o2s1j", "o2s1k", "o2s1l", "o2s1m", "o2s1n", "o2s1p", "o2s1q", "o2s1r", "o2s1s", "o2s1ș", "o2s1t", "o2s1ț", "o2s1v", "o2s1w", "o2s1x", "o2s1z", "o2ș1b", "o2ș1c", "o2ș1d", "o2ș1f", "o2ș1g", "o2ș1h", "o2ș1j", "o2ș1k", "o2ș1l", "o2ș1m", "o2ș1n", "o2ș1p", "o2ș1q", "o2ș1r", "o2ș1s", "o2ș1ș", "o2ș1t", "o2ș1ț", "o2ș1v", "o2ș1w", "o2ș1x", "o2ș1z", "o2t1b", "o2t1c", "o2t1d", "o2t1f", "o2t1g", "o2t1h", "o2t1j", "o2t1k", "o2t1m", "o2t1n", "o2t1p", "o2t1q", "o2t1s", "o2t1ș", "o2t1t", "o2t1ț", "o2t1v", "o2t1w", "o2t1x", "o2t1z", "o2ț1b", "o2ț1c", "o2ț1d", "o2ț1f", "o2ț1g", "o2ț1h", "o2ț1j", "o2ț1k", "o2ț1l", "o2ț1m", "o2ț1n", "o2ț1p", "o2ț1q", "o2ț1r", "o2ț1s", "o2ț1ș", "o2ț1t", "o2ț1ț", "o2ț1v", "o2ț1w", "o2ț1x", "o2ț1z", "o2v1b", "o2v1c", "o2v1d", "o2v1f", "o2v1g", "o2v1h", "o2v1j", "o2v1k", "o2v1m", "o2v1n", "o2v1p", "o2v1q", "o2v1s", "o2v1ș", "o2v1t", "o2v1ț", "o2v1v", "o2v1w", "o2v1x", "o2v1z", "o2w1b", "o2w1c", "o2w1d", "o2w1f", "o2w1g", "o2w1h", "o2w1j", "o2w1k", "o2w1l", "o2w1m", "o2w1n", "o2w1p", "o2w1q", "o2w1r", "o2w1s", "o2w1ș", "o2w1t", "o2w1ț", "o2w1v", "o2w1w", "o2w1x", "o2w1z", "o2x1b", "o2x1c", "o2x1d", "o2x1f", "o2x1g", "o2x1h", "o2x1j", "o2x1k", "o2x1l", "o2x1m", "o2x1n", "o2x1p", "o2x1q", "o2x1r", "o2x1s", "o2x1ș", "o2x1t", "o2x1ț", "o2x1v", "o2x1w", "o2x1x", "o2x1z", "o2z1b", "o2z1c", "o2z1d", "o2z1f", "o2z1g", "o2z1h", "o2z1j", "o2z1k", "o2z1l", "o2z1m", "o2z1n", "o2z1p", "o2z1q", "o2z1r", "o2z1s", "o2z1ș", "o2z1t", "o2z1ț", "o2z1v", "o2z1w", "o2z1x", "o2z1z", "u2b1b", "u2b1c", "u2b1d", "u2b1f", "u2b1g", "u2b1h", "u2b1j", "u2b1k", "u2b1m", "u2b1n", "u2b1p", "u2b1q", "u2b1s", "u2b1ș", "u2b1t", "u2b1ț", "u2b1v", "u2b1w", "u2b1x", "u2b1z", "u2c1b", "u2c1c", "u2c1d", "u2c1f", "u2c1g", "u2c1j", "u2c1k", "u2c1m", "u2c1n", "u2c1p", "u2c1q", "u2c1s", "u2c1ș", "u2c1t", "u2c1ț", "u2c1v", "u2c1w", "u2c1x", "u2c1z", "u2d1b", "u2d1c", "u2d1d", "u2d1f", "u2d1g", "u2d1h", "u2d1j", "u2d1k", "u2d1m", "u2d1n", "u2d1p", "u2d1q", "u2d1s", "u2d1ș", "u2d1t", "u2d1ț", "u2d1v", "u2d1w", "u2d1x", "u2d1z", "u2f1b", "u2f1c", "u2f1d", "u2f1f", "u2f1g", "u2f1h", "u2f1j", "u2f1k", "u2f1m", "u2f1n", "u2f1p", "u2f1q", "u2f1s", "u2f1ș", "u2f1t", "u2f1ț", "u2f1v", "u2f1w", "u2f1x", "u2f1z", "u2g1b", "u2g1c", "u2g1d", "u2g1f", "u2g1g", "u2g1j", "u2g1k", "u2g1m", "u2g1n", "u2g1p", "u2g1q", "u2g1s", "u2g1ș", "u2g1t", "u2g1ț", "u2g1v", "u2g1w", "u2g1x", "u2g1z", "u2h1b", "u2h1c", "u2h1d", "u2h1f", "u2h1g", "u2h1h", "u2h1j", "u2h1k", "u2h1m", "u2h1n", "u2h1p", "u2h1q", "u2h1s", "u2h1ș", "u2h1t", "u2h1ț", "u2h1v", "u2h1w", "u2h1x", "u2h1z", "u2j1b", "u2j1c", "u2j1d", "u2j1f", "u2j1g", "u2j1h", "u2j1j", "u2j1k", "u2j1l", "u2j1m", "u2j1n", "u2j1p", "u2j1q", "u2j1r", "u2j1s", "u2j1ș", "u2j1t", "u2j1ț", "u2j1v", "u2j1w", "u2j1x", "u2j1z", "u2k1b", "u2k1c", "u2k1d", "u2k1f", "u2k1g", "u2k1h", "u2k1j", "u2k1k", "u2k1l", "u2k1m", "u2k1n", "u2k1p", "u2k1q", "u2k1r", "u2k1s", "u2k1ș", "u2k1t", "u2k1ț", "u2k1v", "u2k1w", "u2k1x", "u2k1z", "u2l1b", "u2l1c", "u2l1d", "u2l1f", "u2l1g", "u2l1h", "u2l1j", "u2l1k", "u2l1l", "u2l1m", "u2l1n", "u2l1p", "u2l1q", "u2l1r", "u2l1s", "u2l1ș", "u2l1t", "u2l1ț", "u2l1v", "u2l1w", "u2l1x", "u2l1z", "u2m1b", "u2m1c", "u2m1d", "u2m1f", "u2m1g", "u2m1h", "u2m1j", "u2m1k", "u2m1l", "u2m1m", "u2m1n", "u2m1p", "u2m1q", "u2m1r", "u2m1s", "u2m1ș", "u2m1t", "u2m1ț", "u2m1v", "u2m1w", "u2m1x", "u2m1z", "u2n1b", "u2n1c", "u2n1d", "u2n1f", "u2n1g", "u2n1h", "u2n1j", "u2n1k", "u2n1l", "u2n1m", "u2n1n", "u2n1p", "u2n1q", "u2n1r", "u2n1s", "u2n1ș", "u2n1t", "u2n1ț", "u2n1v", "u2n1w", "u2n1x", "u2n1z", "u2p1b", "u2p1c", "u2p1d", "u2p1f", "u2p1g", "u2p1h", "u2p1j", "u2p1k", "u2p1m", "u2p1n", "u2p1p", "u2p1q", "u2p1s", "u2p1ș", "u2p1t", "u2p1ț", "u2p1v", "u2p1w", "u2p1x", "u2p1z", "u2q1b", "u2q1c", "u2q1d", "u2q1f", "u2q1g", "u2q1h", "u2q1j", "u2q1k", "u2q1l", "u2q1m", "u2q1n", "u2q1p", "u2q1q", "u2q1r", "u2q1s", "u2q1ș", "u2q1t", "u2q1ț", "u2q1v", "u2q1w", "u2q1x", "u2q1z", "u2r1b", "u2r1c", "u2r1d", "u2r1f", "u2r1g", "u2r1h", "u2r1j", "u2r1k", "u2r1l", "u2r1m", "u2r1n", "u2r1p", "u2r1q", "u2r1r", "u2r1s", "u2r1ș", "u2r1t", "u2r1ț", "u2r1v", "u2r1w", "u2r1x", "u2r1z", "u2s1b", "u2s1c", "u2s1d", "u2s1f", "u2s1g", "u2s1h", "u2s1j", "u2s1k", "u2s1l", "u2s1m", "u2s1n", "u2s1p", "u2s1q", "u2s1r", "u2s1s", "u2s1ș", "u2s1t", "u2s1ț", "u2s1v", "u2s1w", "u2s1x", "u2s1z", "u2ș1b", "u2ș1c", "u2ș1d", "u2ș1f", "u2ș1g", "u2ș1h", "u2ș1j", "u2ș1k", "u2ș1l", "u2ș1m", "u2ș1n", "u2ș1p", "u2ș1q", "u2ș1r", "u2ș1s", "u2ș1ș", "u2ș1t", "u2ș1ț", "u2ș1v", "u2ș1w", "u2ș1x", "u2ș1z", "u2t1b", "u2t1c", "u2t1d", "u2t1f", "u2t1g", "u2t1h", "u2t1j", "u2t1k", "u2t1m", "u2t1n", "u2t1p", "u2t1q", "u2t1s", "u2t1ș", "u2t1t", "u2t1ț", "u2t1v", "u2t1w", "u2t1x", "u2t1z", "u2ț1b", "u2ț1c", "u2ț1d", "u2ț1f", "u2ț1g", "u2ț1h", "u2ț1j", "u2ț1k", "u2ț1l", "u2ț1m", "u2ț1n", "u2ț1p", "u2ț1q", "u2ț1r", "u2ț1s", "u2ț1ș", "u2ț1t", "u2ț1ț", "u2ț1v", "u2ț1w", "u2ț1x", "u2ț1z", "u2v1b", "u2v1c", "u2v1d", "u2v1f", "u2v1g", "u2v1h", "u2v1j", "u2v1k", "u2v1m", "u2v1n", "u2v1p", "u2v1q", "u2v1s", "u2v1ș", "u2v1t", "u2v1ț", "u2v1v", "u2v1w", "u2v1x", "u2v1z", "u2w1b", "u2w1c", "u2w1d", "u2w1f", "u2w1g", "u2w1h", "u2w1j", "u2w1k", "u2w1l", "u2w1m", "u2w1n", "u2w1p", "u2w1q", "u2w1r", "u2w1s", "u2w1ș", "u2w1t", "u2w1ț", "u2w1v", "u2w1w", "u2w1x", "u2w1z", "u2x1b", "u2x1c", "u2x1d", "u2x1f", "u2x1g", "u2x1h", "u2x1j", "u2x1k", "u2x1l", "u2x1m", "u2x1n", "u2x1p", "u2x1q", "u2x1r", "u2x1s", "u2x1ș", "u2x1t", "u2x1ț", "u2x1v", "u2x1w", "u2x1x", "u2x1z", "u2z1b", "u2z1c", "u2z1d", "u2z1f", "u2z1g", "u2z1h", "u2z1j", "u2z1k", "u2z1l", "u2z1m", "u2z1n", "u2z1p", "u2z1q", "u2z1r", "u2z1s", "u2z1ș", "u2z1t", "u2z1ț", "u2z1v", "u2z1w", "u2z1x", "u2z1z", "y2b1b", "y2b1c", "y2b1d", "y2b1f", "y2b1g", "y2b1h", "y2b1j", "y2b1k", "y2b1m", "y2b1n", "y2b1p", "y2b1q", "y2b1s", "y2b1ș", "y2b1t", "y2b1ț", "y2b1v", "y2b1w", "y2b1x", "y2b1z", "y2c1b", "y2c1c", "y2c1d", "y2c1f", "y2c1g", "y2c1j", "y2c1k", "y2c1m", "y2c1n", "y2c1p", "y2c1q", "y2c1s", "y2c1ș", "y2c1t", "y2c1ț", "y2c1v", "y2c1w", "y2c1x", "y2c1z", "y2d1b", "y2d1c", "y2d1d", "y2d1f", "y2d1g", "y2d1h", "y2d1j", "y2d1k", "y2d1m", "y2d1n", "y2d1p", "y2d1q", "y2d1s", "y2d1ș", "y2d1t", "y2d1ț", "y2d1v", "y2d1w", "y2d1x", "y2d1z", "y2f1b", "y2f1c", "y2f1d", "y2f1f", "y2f1g", "y2f1h", "y2f1j", "y2f1k", "y2f1m", "y2f1n", "y2f1p", "y2f1q", "y2f1s", "y2f1ș", "y2f1t", "y2f1ț", "y2f1v", "y2f1w", "y2f1x", "y2f1z", "y2g1b", "y2g1c", "y2g1d", "y2g1f", "y2g1g", "y2g1j", "y2g1k", "y2g1m", "y2g1n", "y2g1p", "y2g1q", "y2g1s", "y2g1ș", "y2g1t", "y2g1ț", "y2g1v", "y2g1w", "y2g1x", "y2g1z", "y2h1b", "y2h1c", "y2h1d", "y2h1f", "y2h1g", "y2h1h", "y2h1j", "y2h1k", "y2h1m", "y2h1n", "y2h1p", "y2h1q", "y2h1s", "y2h1ș", "y2h1t", "y2h1ț", "y2h1v", "y2h1w", "y2h1x", "y2h1z", "y2j1b", "y2j1c", "y2j1d", "y2j1f", "y2j1g", "y2j1h", "y2j1j", "y2j1k", "y2j1l", "y2j1m", "y2j1n", "y2j1p", "y2j1q", "y2j1r", "y2j1s", "y2j1ș", "y2j1t", "y2j1ț", "y2j1v", "y2j1w", "y2j1x", "y2j1z", "y2k1b", "y2k1c", "y2k1d", "y2k1f", "y2k1g", "y2k1h", "y2k1j", "y2k1k", "y2k1l", "y2k1m", "y2k1n", "y2k1p", "y2k1q", "y2k1r", "y2k1s", "y2k1ș", "y2k1t", "y2k1ț", "y2k1v", "y2k1w", "y2k1x", "y2k1z", "y2l1b", "y2l1c", "y2l1d", "y2l1f", "y2l1g", "y2l1h", "y2l1j", "y2l1k", "y2l1l", "y2l1m", "y2l1n", "y2l1p", "y2l1q", "y2l1r", "y2l1s", "y2l1ș", "y2l1t", "y2l1ț", "y2l1v", "y2l1w", "y2l1x", "y2l1z", "y2m1b", "y2m1c", "y2m1d", "y2m1f", "y2m1g", "y2m1h", "y2m1j", "y2m1k", "y2m1l", "y2m1m", "y2m1n", "y2m1p", "y2m1q", "y2m1r", "y2m1s", "y2m1ș", "y2m1t", "y2m1ț", "y2m1v", "y2m1w", "y2m1x", "y2m1z", "y2n1b", "y2n1c", "y2n1d", "y2n1f", "y2n1g", "y2n1h", "y2n1j", "y2n1k", "y2n1l", "y2n1m", "y2n1n", "y2n1p", "y2n1q", "y2n1r", "y2n1s", "y2n1ș", "y2n1t", "y2n1ț", "y2n1v", "y2n1w", "y2n1x", "y2n1z", "y2p1b", "y2p1c", "y2p1d", "y2p1f", "y2p1g", "y2p1h", "y2p1j", "y2p1k", "y2p1m", "y2p1n", "y2p1p", "y2p1q", "y2p1s", "y2p1ș", "y2p1t", "y2p1ț", "y2p1v", "y2p1w", "y2p1x", "y2p1z", "y2q1b", "y2q1c", "y2q1d", "y2q1f", "y2q1g", "y2q1h", "y2q1j", "y2q1k", "y2q1l", "y2q1m", "y2q1n", "y2q1p", "y2q1q", "y2q1r", "y2q1s", "y2q1ș", "y2q1t", "y2q1ț", "y2q1v", "y2q1w", "y2q1x", "y2q1z", "y2r1b", "y2r1c", "y2r1d", "y2r1f", "y2r1g", "y2r1h", "y2r1j", "y2r1k", "y2r1l", "y2r1m", "y2r1n", "y2r1p", "y2r1q", "y2r1r", "y2r1s", "y2r1ș", "y2r1t", "y2r1ț", "y2r1v", "y2r1w", "y2r1x", "y2r1z", "y2s1b", "y2s1c", "y2s1d", "y2s1f", "y2s1g", "y2s1h", "y2s1j", "y2s1k", "y2s1l", "y2s1m", "y2s1n", "y2s1p", "y2s1q", "y2s1r", "y2s1s", "y2s1ș", "y2s1t", "y2s1ț", "y2s1v", "y2s1w", "y2s1x", "y2s1z", "y2ș1b", "y2ș1c", "y2ș1d", "y2ș1f", "y2ș1g", "y2ș1h", "y2ș1j", "y2ș1k", "y2ș1l", "y2ș1m", "y2ș1n", "y2ș1p", "y2ș1q", "y2ș1r", "y2ș1s", "y2ș1ș", "y2ș1t", "y2ș1ț", "y2ș1v", "y2ș1w", "y2ș1x", "y2ș1z", "y2t1b", "y2t1c", "y2t1d", "y2t1f", "y2t1g", "y2t1h", "y2t1j", "y2t1k", "y2t1m", "y2t1n", "y2t1p", "y2t1q", "y2t1s", "y2t1ș", "y2t1t", "y2t1ț", "y2t1v", "y2t1w", "y2t1x", "y2t1z", "y2ț1b", "y2ț1c", "y2ț1d", "y2ț1f", "y2ț1g", "y2ț1h", "y2ț1j", "y2ț1k", "y2ț1l", "y2ț1m", "y2ț1n", "y2ț1p", "y2ț1q", "y2ț1r", "y2ț1s", "y2ț1ș", "y2ț1t", "y2ț1ț", "y2ț1v", "y2ț1w", "y2ț1x", "y2ț1z", "y2v1b", "y2v1c", "y2v1d", "y2v1f", "y2v1g", "y2v1h", "y2v1j", "y2v1k", "y2v1m", "y2v1n", "y2v1p", "y2v1q", "y2v1s", "y2v1ș", "y2v1t", "y2v1ț", "y2v1v", "y2v1w", "y2v1x", "y2v1z", "y2w1b", "y2w1c", "y2w1d", "y2w1f", "y2w1g", "y2w1h", "y2w1j", "y2w1k", "y2w1l", "y2w1m", "y2w1n", "y2w1p", "y2w1q", "y2w1r", "y2w1s", "y2w1ș", "y2w1t", "y2w1ț", "y2w1v", "y2w1w", "y2w1x", "y2w1z", "y2x1b", "y2x1c", "y2x1d", "y2x1f", "y2x1g", "y2x1h", "y2x1j", "y2x1k", "y2x1l", "y2x1m", "y2x1n", "y2x1p", "y2x1q", "y2x1r", "y2x1s", "y2x1ș", "y2x1t", "y2x1ț", "y2x1v", "y2x1w", "y2x1x", "y2x1z", "y2z1b", "y2z1c", "y2z1d", "y2z1f", "y2z1g", "y2z1h", "y2z1j", "y2z1k", "y2z1l", "y2z1m", "y2z1n", "y2z1p", "y2z1q", "y2z1r", "y2z1s", "y2z1ș", "y2z1t", "y2z1ț", "y2z1v", "y2z1w", "y2z1x", "y2z1z"]
};
 
function LangMetadata ()
{
	//Singleton
	if (arguments.callee.instance)
		return arguments.callee.instance
	else
		arguments.callee.instance = this;
 
	// {{{ Metadata dictionaries
	var metadata = {aar:{hw:1,sc:["Latn","Ethi"]}, abk:{hw:1,sc:["Cyrl","Latn","Geor"]}, aer:{sc:"Latn"}, afr:{g:"",hw:1,p:1,sc:"Latn"}, aka:{hw:1}, akk:{g:"mf",p:1,sc:"Xsux"}, als:{hw:1}, amh:{g:"mf",hw:1,p:1,sc:"Ethi"}, arg:{g:"mf",hw:1,p:1,sc:"Latn"}, ang:{alt:1,g:"mfn",hw:1,p:1,sc:"Latn"}, ara:{alt:1,g:"mf",hw:1,p:1,sc:"Arab"}, arc:{g:"mf",p:1,sc:"Hebr"}, are:{sc:"Latn"}, arz:{alt:1,g:"mf",p:1,sc:"Arab"}, asm:{hw:1,sc:"Beng"}, ast:{g:"mf",hw:1,p:1,sc:"Latn"}, ava:{hw:1,sc:"Cyrl"}, axm:{alt:0,g:"",sc:"Armn"}, aym:{hw:1}, aze:{alt:0,g:"",hw:1,p:1,sc:["Latn","Cyrl","Arab"]}, bak:{sc:"Cyrl"}, bar:{sc:"Latn"}, "bat-smg":{g:"mf",p:1,sc:"Latn"}, bel:{g:"mfn",hw:1,p:1,sc:["Cyrl","Latn"]}, "be-x-old":{sc:"Cyrl"}, bul:{g:"mfn",hw:1,p:1,sc:"Cyrl"}, bh:{hw:1,sc:"Deva"}, bhb:{sc:"Deva"}, bis:{hw:1,sc:"Latn"}, blt:{sc:"Tavt"}, bam:{hw:1,sc:["Latn","Nkoo","Arab"]}, ben:{g:"",hw:1,sc:"Beng"}, bod:{hw:1,sc:"Tibt"}, bre:{g:"mf",hw:1,sc:"Latn"}, bos:{hw:1,sc:"Latn"}, cat:{g:"mf",hw:1,p:1,sc:"Latn"}, cdo:{g:"",p:0,sc:"Hans"}, cha:{hw:1,sc:"Latn"}, chr:{hw:1,sc:"Cher"}, cjy:{g:"",p:0,sc:"Hans"}, cmn:{g:"",p:0,sc:"Hans"}, cos:{hw:1,sc:"Latn"}, cpx:{g:"",p:0,sc:"Hans"}, cre:{hw:1,sc:"Cans"}, crh:{alt:0,g:"",sc:"Latn"}, ces:{g:"mfn",hw:1,p:1,sc:"Latn"}, csb:{hw:1}, chu:{g:"mfn",p:1,sc:["Cyrs","Glag"]}, chv:{alt:0,g:"",sc:"Cyrl"}, cym:{g:"mf",hw:1,p:1,sc:"Latn"}, czh:{g:"",p:0,sc:"Hans"}, czo:{g:"",p:0,sc:"Hans"}, dan:{g:"cn",hw:1,p:1,sc:"Latn"}, dax:{sc:"Latn"}, deu:{g:"mfn",hw:1,p:1,sc:"Latn"}, dhg:{sc:"Latn"}, djb:{sc:"Latn"}, dji:{sc:"Latn"}, djr:{sc:"Latn"}, dng:{g:"",p:0,sc:"Cyrl"}, dsx:{sc:"Latn"}, duj:{sc:"Latn"}, div:{hw:1,p:1,sc:"Thaa"}, dzo:{hw:1,sc:"Tibt"}, ell:{g:"mfn",hw:1,p:1,sc:"Grek"}, eng:{g:"",hw:1,p:1,sc:"Latn"}, epo:{g:"",hw:1,p:1,sc:"Latn"}, spa:{alt:0,g:"mf",hw:1,p:1,sc:"Latn"}, est:{alt:0,g:"",hw:1,p:1,sc:"Latn"}, ett:{p:1,sc:"Ital"}, eus:{alt:0,g:"",hw:1,p:1,sc:"Latn"}, fas:{g:"",hw:1,sc:"Arab",wsc:"fa-Arab"}, fin:{g:"",hw:1,p:1,sc:"Latn"}, fil:{g:"",p:0,sc:"Latn"}, fij:{hw:1,sc:"Latn"}, fao:{g:"mfn",hw:1,sc:"Latn"}, fra:{alt:0,g:"mf",hw:1,p:1,sc:"Latn"}, frm:{alt:0,g:"mf",p:1,sc:"Latn"}, fro:{alt:0,g:"mf",p:1,sc:"Latn"}, fry:{hw:1,sc:"Latn"}, gle:{g:"mf",hw:1,p:1,sc:"Latn"}, gan:{g:"",p:0,sc:"Hans"}, gla:{g:"mf",hw:1,p:1,sc:"Latn"}, gez:{sc:"Ethi"}, glg:{g:"mf",hw:1,p:1,sc:"Latn"}, gmy:{sc:"Linb"}, grn:{hw:1}, gnn:{sc:"Latn"}, got:{g:"mfn",p:1,sc:"Goth"}, grc:{g:"mfn",p:1,sc:"Grek",wsc:"polytonic"}, guj:{g:"mfn",hw:1,p:1,sc:"Gujr"}, guf:{sc:"Latn"}, glv:{hw:1}, hau:{hw:1}, hak:{g:"",p:0,sc:"Hans"}, har:{sc:"Ethi"}, heb:{alt:1,g:"mf",hw:1,p:1,sc:"Hebr"}, hin:{g:"mf",hw:1,p:1,sc:"Deva"}, hif:{sc:["Latn","Deva"]}, hit:{sc:"Xsux"}, hrv:{alt:1,g:"mfn",hw:1,p:1,sc:"Latn"}, hsb:{hw:1}, hsn:{g:"",p:0,sc:"hans"}, hun:{alt:0,g:"",hw:1,p:1,sc:"Latn"}, hye:{alt:0,g:"",hw:1,sc:"Armn"}, ina:{alt:0,g:"",hw:1,sc:"Latn"}, ind:{hw:1,sc:"Latn"}, ile:{alt:0,g:"",hw:1,sc:"Latn"}, ipk:{hw:1}, ike:{sc:"Cans"}, ikt:{sc:"Cans"}, ido:{hw:1}, isl:{alt:0,g:"mfn",hw:1,p:1,sc:"Latn"}, ita:{alt:0,g:"mf",hw:1,p:1,sc:"Latn"}, iku:{hw:1,sc:"Cans"}, jpn:{alt:0,g:"",hw:1,p:0,sc:"Jpan"}, jay:{sc:"Latn"}, jbo:{hw:1,sc:"Latn"}, jav:{hw:1}, kat:{alt:0,g:"",hw:1,sc:"Geor"}, khb:{sc:"Talu"}, kjh:{sc:"Cyrl"}, kaz:{alt:0,g:"",hw:1,sc:"Cyrl"}, kal:{hw:1}, khm:{hw:1,sc:"Khmr"}, kan:{hw:1,sc:"Knda"}, kor:{alt:0,g:"",hw:1,p:0,sc:"Kore"}, krc:{alt:0,g:"",p:1,sc:"Cyrl"}, kas:{hw:1,sc:["Arab","Deva"],wsc:"ks-Arab"}, kur:{hw:1,sc:"Arab",wsc:"ku-Arab"}, cor:{hw:1}, kir:{alt:0,g:"",hw:1,sc:"Cyrl"}, lat:{alt:1,g:"mfn",hw:1,p:1,sc:"Latn"}, ltz:{hw:1}, lez:{sc:"Cyrl"}, lim:{hw:1}, lin:{hw:1}, lao:{alt:0,g:"",hw:1,p:0,sc:"Laoo"}, lit:{alt:1,g:"mf",hw:1,p:1,sc:"Latn"}, lav:{alt:0,g:"mf",hw:1,p:1,sc:"Latn"}, mlg:{hw:1}, mah:{hw:1}, mri:{alt:0,g:0,hw:1,sc:"Latn"}, mkd:{g:"mfn",hw:1,p:1,sc:"Cyrl"}, mal:{g:"",hw:1,sc:"Mlym"}, mon:{alt:0,g:"",hw:1,sc:["Cyrl","Mong"]}, mnp:{g:"",p:0,sc:"Hans"}, mo:{hw:1,sc:"Cyrl"}, mol:{sc:"Cyrl"}, mar:{g:"mfn",hw:1,sc:"Deva"}, msa:{hw:1,sc:["Latn","Arab"]}, mlt:{g:"mf",hw:1,sc:"Latn"}, mwp:{sc:"Latn"}, mya:{hw:1,sc:"Mymr"}, nau:{hw:1}, nah:{hw:1}, nan:{g:"",p:0,sc:"Hans"}, nob:{alt:0,g:"mfn",p:1,sc:"Latn"}, nds:{hw:1}, nep:{hw:1,sc:"Deva"}, nld:{alt:0,g:"mfn",hw:1,p:1,sc:"Latn"}, nno:{alt:0,g:"mfn",hw:1,p:1,sc:"Latn"}, nor:{alt:0,g:"mfn",hw:1,p:1,sc:"Latn"}, non:{g:"mfn",p:1,sc:"Latn"}, oci:{g:"mf",hw:1,p:1,sc:"Latn"}, orm:{hw:1}, ori:{hw:1,sc:"Orya"}, oss:{alt:0,g:"",sc:"Cyrl"}, osc:{sc:"Ital"}, ota:{sc:"Arab",wsc:"ota-Arab"}, pan:{g:"mf",hw:1,p:1,sc:["Guru","Arab"]}, peo:{sc:"Xpeo"}, phn:{sc:"Phnx"}, pli:{hw:1}, pjt:{sc:"Latn"}, pol:{g:"mfn",hw:1,p:1,sc:"Latn"}, pus:{hw:1,sc:"Arab",wsc:"ps-Arab"}, por:{alt:0,g:"mf",hw:1,p:1,sc:"Latn"}, que:{hw:1}, rit:{sc:"Latn"}, roh:{g:"mf",hw:1,sc:"Latn"}, run:{hw:1}, ron:{g:"mfn",hw:1,p:1,sc:["Latn","Cyrl"]}, "roa-rup":{hw:1}, rus:{alt:1,g:"mfn",hw:1,p:1,sc:"Cyrl"}, ruo:{g:"mfn",p:1,sc:"Latn"}, rup:{g:"mfn",p:1,sc:"Latn"}, ruq:{g:"mfn",p:1,sc:"Latn"}, kin:{hw:1,sc:"Latn"}, san:{g:"mfn",hw:1,p:1,sc:"Deva"}, sah:{sc:"Cyrl"}, srd:{hw:1}, scn:{g:"mf",hw:1,p:1,sc:"Latn"}, sco:{sc:"Latn"}, snd:{hw:1,sc:"Arab",wsc:"sd-Arab"}, sag:{hw:1}, sh:{hw:1}, sin:{hw:1,sc:"Sinh"}, simple:{hw:1,sc:"Latn"}, slk:{g:"mfn",hw:1,p:1,sc:"Latn"}, slv:{g:"mfn",hw:1,p:1,sc:"Latn"}, smo:{hw:1}, sna:{hw:1}, som:{hw:1}, spx:{sc:"Ital"}, sqi:{alt:0,g:"mf",hw:1,sc:"Latn"}, srp:{g:"mfn",hw:1,p:1,sc:["Cyrl","Latn"]}, ssw:{hw:1}, sot:{hw:1}, sun:{hw:1}, sux:{sc:"Xsux"}, swe:{alt:0,g:"cn",hw:1,p:1,sc:"Latn"}, swa:{alt:0,g:"",hw:1,sc:"Latn"}, syr:{sc:"Syrc"}, tam:{alt:0,g:"",hw:1,sc:"Taml"}, tdd:{sc:"Tale"}, tel:{alt:0,g:"",hw:1,sc:"Telu"}, tgk:{alt:0,g:"",hw:1,sc:"Cyrl"}, tha:{alt:0,g:"",hw:1,p:0,sc:"Thai"}, tir:{hw:1,sc:"Ethi"}, tig:{sc:"Ethi"}, tiw:{sc:"Latn"}, tuk:{alt:0,g:"",hw:1,sc:"Latn"}, tgl:{g:"",hw:1,p:0,sc:["Latn","Tglg"]}, tmr:{sc:"Hebr"}, tsn:{hw:1}, ton:{hw:1}, tpi:{hw:1,sc:"Latn"}, tur:{alt:1,g:"",hw:1,p:1,sc:"Latn"}, tso:{hw:1}, tat:{alt:0,g:"",hw:1,sc:"Cyrl"}, twi:{hw:1}, uig:{hw:1,sc:"Arab",wsc:"ug-Arab"}, uga:{sc:"Ugar"}, ukr:{g:"mfn",hw:1,p:1,sc:"Cyrl"}, ulk:{sc:"Latn"}, urd:{g:"mf",hw:1,p:1,sc:"Arab",wsc:"ur-Arab"}, uzb:{alt:0,g:"",hw:1,sc:"Latn"}, vie:{g:"",hw:1,p:0,sc:"Latn"}, vol:{hw:1}, wln:{hw:1}, wbp:{sc:"Latn"}, wol:{hw:1}, wuu:{g:"",p:0,sc:"Hans"}, xae:{sc:"Ital"}, xcl:{alt:0,g:"",sc:"Armn"}, xcr:{sc:"Cari"}, xfa:{sc:"Ital"}, xho:{hw:1}, xlc:{sc:"Lyci"}, xld:{sc:"Lydi"}, xlu:{sc:"Xsux"}, xno:{alt:0,g:"mf",p:1,sc:"Latn"}, xrr:{sc:"Ital"}, xst:{sc:"Ethi"}, xum:{sc:"Ital"}, xve:{sc:"Ital"}, xvo:{sc:"Ital"}, yid:{g:"mfn",hw:1,p:1,sc:"Hebr"}, yor:{hw:1}, yua:{alt:1,g:"",p:1,sc:"Latn"}, yue:{g:"",p:0,sc:"Hant"}, zha:{hw:1}, zho:{g:"",hw:1,p:0,sc:"Hani"}, "zh-classical":{sc:"Hant"}, "zh-min-nan":{hw:1,sc:"Latn"}, "zh-yue":{sc:"Hani"}, zul:{hw:1,sc:"Latn"}};
	
	var clean = {aa:"aar", ab:"abk", af:"afr", ak:"aka", am:"amh", ar:"ara", an:"arg", as:"asm", av:"ava", ae:"ave", ay:"aym", az:"aze", ba:"bak", bm:"bam", be:"bel", bn:"ben", bi:"bis", bo:"bod", bs:"bos", br:"bre", bg:"bul", ca:"cat", cs:"ces", ch:"cha", ce:"che", cu:"chu", cv:"chv", kw:"cor", co:"cos", cr:"cre", cy:"cym", da:"dan", de:"deu", dv:"div", dz:"dzo", el:"ell", en:"eng", eo:"epo", et:"est", eu:"eus", ee:"ewe", fo:"fao", fa:"fas", fj:"fij", fi:"fin", fr:"fra", fy:"fry", ff:"ful", gd:"gla", ga:"gle", gl:"glg", gv:"glv", gn:"grn", gu:"guj", ht:"hat", ha:"hau", he:"heb", hz:"her", hi:"hin", ho:"hmo", hr:"hrv", hu:"hun", hy:"hye", ig:"ibo", io:"ido", ii:"iii", iu:"iku", ie:"ile", ia:"ina", id:"ind", ik:"ipk", is:"isl", it:"ita", jv:"jav", ja:"jpn", kl:"kal", kn:"kan", ks:"kas", ka:"kat", kr:"kau", kk:"kaz", km:"khm", ki:"kik", rw:"kin", ky:"kir", kv:"kom", kg:"kon", ko:"kor", kj:"kua", ku:"kur", lo:"lao", la:"lat", lv:"lav", li:"lim", ln:"lin", lt:"lit", lb:"ltz", lu:"lub", lg:"lug", mh:"mah", ml:"mal", mr:"mar", mk:"mkd", mg:"mlg", mt:"mlt", mn:"mon", mi:"mri", ms:"msa", my:"mya", na:"nau", nv:"nav", nr:"nbl", nd:"nde", ng:"ndo", ne:"nep", nl:"nld", nn:"nno", nb:"nob", no:"nor", ny:"nya", oc:"oci", oj:"oji", or:"ori", om:"orm", os:"oss", pa:"pan", pi:"pli", pl:"pol", pt:"por", ps:"pus", qu:"que", rm:"roh", ro:"ron", rn:"run", ru:"rus", sg:"sag", sa:"san", si:"sin", sk:"slk", sl:"slv", se:"sme", sm:"smo", sn:"sna", sd:"snd", so:"som", st:"sot", es:"spa", sq:"sqi", sc:"srd", sr:"srp", ss:"ssw", su:"sun", sw:"swa", sv:"swe", ty:"tah", ta:"tam", tt:"tat", te:"tel", tg:"tgk", tl:"tgl", th:"tha", ti:"tir", to:"ton", tn:"tsn", ts:"tso", tk:"tuk", tr:"tur", tw:"twi", ug:"uig", uk:"ukr", ur:"urd", uz:"uzb", ve:"ven", vi:"vie", vo:"vol", wa:"wln", wo:"wol", xh:"xho", yi:"yid", yo:"yor", za:"zha", zh:"zho", zu:"zul"};
	
	var iso6391 = {aar:"aa", abk:"ab", afr:"af", aka:"ak", amh:"am", ara:"ar", arg:"an", asm:"as", ava:"av", ave:"ae", aym:"ay", aze:"az", bak:"ba", bam:"bm", bel:"be", ben:"bn", bis:"bi", bod:"bo", bos:"bs", bre:"br", bul:"bg", cat:"ca", ces:"cs", cha:"ch", che:"ce", chu:"cu", chv:"cv", cor:"kw", cos:"co", cre:"cr", cym:"cy", dan:"da", deu:"de", div:"dv", dzo:"dz", ell:"el", eng:"en", epo:"eo", est:"et", eus:"eu", ewe:"ee", fao:"fo", fas:"fa", fij:"fj", fin:"fi", fra:"fr", fry:"fy", ful:"ff", gla:"gd", gle:"ga", glg:"gl", glv:"gv", grn:"gn", guj:"gu", hat:"ht", hau:"ha", heb:"he", her:"hz", hin:"hi", hmo:"ho", hrv:"hr", hun:"hu", hye:"hy", ibo:"ig", ido:"io", iii:"ii", iku:"iu", ile:"ie", ina:"ia", ind:"id", ipk:"ik", isl:"is", ita:"it", jav:"jv", jpn:"ja", kal:"kl", kan:"kn", kas:"ks", kat:"ka", kau:"kr", kaz:"kk", khm:"km", kik:"ki", kin:"rw", kir:"ky", kom:"kv", kon:"kg", kor:"ko", kua:"kj", kur:"ku", lao:"lo", lat:"la", lav:"lv", lim:"li", lin:"ln", lit:"lt", ltz:"lb", lub:"lu", lug:"lg", mah:"mh", mal:"ml", mar:"mr", mkd:"mk", mlg:"mg", mlt:"mt", mon:"mn", mri:"mi", msa:"ms", mya:"my", nau:"na", nav:"nv", nbl:"nr", nde:"nd", ndo:"ng", nep:"ne", nld:"nl", nno:"nn", nob:"nb", nor:"no", nya:"ny", oci:"oc", oji:"oj", ori:"or", orm:"om", oss:"os", pan:"pa", pli:"pi", pol:"pl", por:"pt", pus:"ps", que:"qu", roh:"rm", ron:"ro", run:"rn", rus:"ru", sag:"sg", san:"sa", sin:"si", slk:"sk", slv:"sl", sme:"se", smo:"sm", sna:"sn", snd:"sd", som:"so", sot:"st", spa:"es", sqi:"sq", srd:"sc", srp:"sr", ssw:"ss", sun:"su", swa:"sw", swe:"sv", tah:"ty", tam:"ta", tat:"tt", tel:"te", tgk:"tg", tgl:"tl", tha:"th", tir:"ti", ton:"to", tsn:"tn", tso:"ts", tuk:"tk", tur:"tr", twi:"tw", uig:"ug", ukr:"uk", urd:"ur", uzb:"uz", ven:"ve", vie:"vi", vol:"vo", wln:"wa", wol:"wo", xho:"xh", yid:"yi", yor:"yo", zha:"za", zho:"zh", zul:"zu"};
	
	var afi = {
		ron:{"ă":"ə","â/î":"ɨ","c":"ʧ","e":"e̯","g":"ʤ","i":"ʲ","j":"ʒ","o":"o̯","ș":"ʃ","ț":"ʦ"}
	};
	// }}}
 
	// FIXME: merge into above
	var c = 'Chinese';var a = 'Arabic';
	var nesting = {
		apj:'Apache',apm:'Apache',apw:'Apache',
		syr:'Aramaic',syc:'Aramaic',
		xcl:'Armenian',axm:'Armenian',
		// ang:'English',enm:'English', don't nest English (Encyclopetey)
		fro:'French',frm:'French',
		oge:'Georgian',
		gmh:'German',goh:'German',gsw:'German',ksh:'German',pfl:'German',sxu:'German',
		grc:'Greek/Ancient',gmy:'Greek/Mycenaean', //el:'Greek/Modern', don't nest modern greek (Atelaes)
		sga:'Irish',mga:'Irish',
		nb:'Norwegian/Bokmål',nn:'Norwegian/Nynorsk', 
		mhr:'Mari',mrj:'Mari',
		cmg:'Mongolian',
		sro:'Sardinian',sdn:'Sardinian',src:'Sardinian',scd:'Sardinian',
		dsb:'Sorbian',hsb:'Sorbian', 
		osp:'Spanish',
		owl:'Welsh',wlm:'Welsh',
		zh:c,yue:c,dng:c,gan:c,hak:c,czh:c,cjy:c,cmn:c,mnp:c,cdo:c,nan:c,czo:c,cpx:c,wuu:c,hsn:c,lzh:c,
		arq:a,aao:a,bbz:a,abv:a,shu:a,acy:a,adf:a,avl:a,arz:a,afb:a,ayh:a,acw:a,ayl:a,acm:a,ary:a,
		ars:a,apc:a,ayp:a,acx:a,aec:a,ayn:a,ssh:a,ajp:a,arb:a,apd:a,pga:a,acq:a,abh:a,aeb:a,auz:a
	}
 
	var altForm = {
		ang: {from:"ĀāǢǣĊċĒēĠġĪīŌōŪūȲȳ", to:"AaÆæCcEeGgIiOoUuYy", strip:"\u0304\u0307"}, //macron and above dot
		ar: {strip:"\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652"},
		he: {strip:"\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BF\u05C1\u05C2"},
		hr: {from:"ȀȁÀàȂȃÁáĀāȄȅÈèȆȇÉéĒēȈȉÌìȊȋÍíĪīȌȍÒòȎȏÓóŌōȐȑȒȓŔŕȔȕÙùȖȗÚúŪū",
			 to:"AaAaAaAaAaEeEeEeEeEeIiIiIiIiIiOoOoOoOoOoRrRrRrUuUuUuUuUu",
			 strip:"\u030F\u0300\u0311\u0301\u0304"},
		la: {from:"ĀāĒēĪīŌōŪū", to:"AaEeIiOoUu",strip:"\u0304"}, //macron
		lt: {from:"áãàéẽèìýỹñóõòúù", to:"aaaeeeiyynooouu", strip:"\u0340\u0301\u0303"},
		ro: {from:"ŞŢşţ", to:"ȘȚșț"},
		sh: {from:"ȀȁÀàȂȃÁáĀāȄȅÈèȆȇÉéĒēȈȉÌìȊȋÍíĪīȌȍÒòȎȏÓóŌōȐȑȒȓŔŕȔȕÙùȖȗÚúŪū",
			 to:"AaAaAaAaAaEeEeEeEeEeIiIiIiIiIiOoOoOoOoOoRrRrRrUuUuUuUuUu",
			 strip:"\u030F\u0300\u0311\u0301\u0304"},
		sr: {from:"ȀȁÀàȂȃÁáĀāȄȅÈèȆȇÉéĒēȈȉÌìȊȋÍíĪīȌȍÒòȎȏÓóŌōȐȑȒȓŔŕȔȕÙùȖȗÚúŪū",
			 to:"AaAaAaAaAaEeEeEeEeEeIiIiIiIiIiOoOoOoOoOoRrRrRrUuUuUuUuUu",
			 strip:"\u030F\u0300\u0311\u0301\u0304"},
		tr: {from:"ÂâÛû", to:"AaUu",strip:"\u0302"},
		sl: {from: "áÁàÀâÂȃȂȁȀéÉèÈêÊȇȆȅȄíÍìÌîÎȋȊȉȈóÓòÒôÔȏȎȍȌŕŔȓȒȑȐúÚùÙûÛȗȖȕȔệỆộỘẹẸọỌ",
			 to: "aAaAaAaAaAeEeEeEeEeEiIiIiIiIiIoOoOoOoOoOrRrRrRuUuUuUuUuUeEoOeEoO",
			 strip: "\u0301\u0300\u0302\u0311\u030f\u0323"}
	}; 
	//Returns true if the specified lang.wiktionary exists according to the meta list
	this.hasWiktionary = function(lang)
	{
		if (metadata[lang])
			return metadata[lang].hw;
	}
	
	this.hasAFI = function(lang)
	{
		if (afi[lang])
			return afi[lang];
	}
 
	//Given a language code return a default script code.
	this.guessScript = function(lang)
	{
		if (metadata[lang]) {
			// enwikt language template? (ur-Arab, polytonic)
			if (metadata[lang].wsc) {
				return metadata[lang].wsc;
			}
			// ISO script code? (Arab, Grek)
			if (metadata[lang].sc) {
				if (typeof metadata[lang].sc == 'object')
					return metadata[lang].sc[0];
				else
					return metadata[lang].sc;
			}
		}
 
		return false;
	}
 
	// In a given language, would we expect a translation of the title to have the capitalisation
	// of word?
	this.expectedCase = function (lang, title, word) {
		if (lang == 'de' || lang == 'lb')
			return true;
 
		if (title.substr(0, 1).toLowerCase() != title.substr(0, 1))
			return true;
 
		return word.substr(0, 1).toLowerCase() == word.substr(0, 1)
	}
 
	//Returns a string of standard gender letters (mfnc) or an empty string
	this.getGenders = function(lang)
	{
		if (metadata[lang])
			return metadata[lang].g;
	}
 
	//Returns true if the specified lang has the concept of plural nouns
	this.hasPlural = function(lang)
	{
		if (metadata[lang])
			return metadata[lang].p;
	}
 
	//Returns true if the specified lang uses optional vowels or diacritics
	this.needsAlt = function(lang)
	{
		if (metadata[lang])
			return metadata[lang].alt && (!altForm[lang]);
	}
 
	// Generates a form of the page name without any diacritics (for Latin, etc.)
	this.generateAltForm = function (lang, word)
	{
		if (altForm[lang])
		{
			var alt = altForm[lang];
 
			var map = {};
 
			if (alt.from && alt.to)
			{
				for (var i = 0; i < alt.from.length; i++)
				{
					map[alt.from.charAt(i)] = alt.to.charAt(i);
				}
			}
			if (alt.strip)
			{
				for (var i = 0; i < alt.strip.length; i++)
				{
					map[alt.strip.charAt(i)] = "";
				}
			}
 
			var input = word.split("");
			var output = "";
 
			for (var i = 0; i < input.length; i++)
			{
				var repl = map[input[i]];
				output += (repl == null) ? input[i] : repl;
			}
			return output;
		}
	}
 
	//Given user input, return a language code. Normalises ISO 639-1 codes to 639-3.
	this.cleanLangCode = function(lang)
	{
		var key = lang.toLowerCase().replace(' ','');
		if (clean[key])
			return clean[key];
		else
			return lang;
	}
 
	//Given user input, return a language code. Normalises ISO 639-3 codes to 639-1.
	this.iso6391LangCode = function(lang)
	{
		var key = lang.toLowerCase().replace(' ','');
		if (iso6391[key])
			return iso6391[key];
		else
			return lang;
	}
 
	// Get the nesting for a given sub-language
	this.getNested = function (lang)
	{
		if (nesting[lang])
			return nesting[lang];
		else
			return "";
	}
 
	function temporalSortKey(langname)
	{
		return langname.replace(/^(Ancient|Classical|Old|Middle|Early Modern|Modern) (.*)/, function(m, modifier, name)
			{
				return ({Ancient: 0, Old: 1, Middle: 2, "Early Modern": 3, Modern: 4})[modifier] + name;
			});
	}
	// For enforcing an ordering on nested languages.
	this.nestsBefore = function (a, b)
	{
		return  temporalSortKey(a) < temporalSortKey(b);
	}
 
	this.getScripts = function(lang)
	{
		var script = metadata[lang]?metadata[lang].wsc || metadata[lang].sc:[];
		return (typeof script === 'string' ? [script] : script) || [];
	}
}
 
$(function () {
 
	// Check if we are on a sensible page
	var actions = window.location.toString().replace(/.*\?/, '&');
	if (wgAction != 'view' || actions.indexOf('&printable=yes') > -1 || actions.indexOf('&diff=') > -1 || actions.indexOf('&oldid=') > -1)
		return;
 
	// Check that we have not been disabled
	var prefs = new CookiePreferences('EditorJs');
	if (prefs.get('enabled', 'true') == 'true')
	{
		if (! window.loadedEditor)
		{
			prefs.setDefault('labeller', wgUserName ? 'true' : 'false' );
			window.loadedEditor = true;
			var editor = new Editor();
			TranslationAdders(editor);
			PronunciationAdders(editor);
		}
	}
 
	// The enable-disable button on WT:EDIT
	var node = document.getElementById('editor-js-disable-button');
 
	if (node)
	{
		node.innerHTML = "";
		var toggle = newNode('span', {click: function ()
		{
			if (prefs.get('enabled', 'true') == 'true')
			{
				toggle.innerHTML = "Enable";
				prefs.set('enabled', 'false');
			}
			else
			{
				toggle.innerHTML = "Disable";
				prefs.set('enabled', 'true');
			}
 
		} }, (prefs.get('enabled', 'true') == 'true' ? 'Disable' : 'Enable'))
 
		node.appendChild(toggle);
	}
 
	var node = document.getElementById("editor-js-labeller-button");
	if (node)
	{
		node.innerHTML = "";
		var toggle2 = newNode('span', {click: function ()
		{
			if (prefs.get('labeller') == 'true')
			{
				toggle2.innerHTML = "Enable";
				prefs.set('labeller', 'false');
			}
			else
			{
				toggle2.innerHTML = "Disable";
				prefs.set('labeller', 'true');
			}
 
		} }, (prefs.get('labeller') == 'true' ? 'Disable' : 'Enable'))
 
		node.appendChild(toggle2);
 
	}
})
function newNode(tagname){
	var node = document.createElement(tagname);
	for(var i=1; i<arguments.length; i++)
	{
		if (typeof arguments[i]=='string')
		{
			node.appendChild(document.createTextNode(arguments[i]));
		} 
		else if (typeof arguments[i]=='object')
		{
			if (arguments[i].nodeName)
			{
				node.appendChild(arguments[i]);
			}
			else
			{
				for (var j in arguments[i])
				{
					if (j=='class')
					{
						node.className=arguments[i][j];
					}
					else if (j=='style')
					{
						node.style.cssText=arguments[i][j];
					}
					else if (typeof arguments[i][j]=='function')
					{
						try
						{
							node.addEventListener(j,arguments[i][j],false);
						}
						catch (e)
						{
							try
							{
								node.attachEvent('on'+j,arguments[i][j],"Language");
							}
							catch (e)
							{
								node['on'+j]=arguments[i][j];
							}
						};
					}
					else
					{
						node.setAttribute(j,arguments[i][j]);
					}
				}
			}
		}
	}
return node;
}