function i18n_add(inputid, n, type ,help, fullwidth, langiconurl) {
	parentdiv = document.getElementById(inputid + "_i18n_new");
	langselect = document.getElementById(inputid + "_i18n_langselect");
	if (langselect.length > 0) {
		option = langselect.options[langselect.selectedIndex];
		lang = option.value;
		langname = option.text;	
		langselect.options[langselect.selectedIndex] = null;

		//we can't directly modify the parentdiv's innerHTML cause that would erase all input values. Using a partial DOM solution instead:
		newchild = document.createElement('div');
		newchild.setAttribute('class','item');
		if (fullwidth) {
			style = 'full';
		} else {
			style = 'half';
		}

		newchild.innerHTML =  '<div class="' + style + 'desc"><img src="'+langiconurl+'/' + lang + '.jpg" alt="'+lang+'" /> <b>' + n + ' ('+langname+')</b><div class="helpline">' + help + '</div></div>';
		newchild.innerHTML += '<div class="' + style + 'input"><input name="'+inputid +'_' + lang +'" /></div>';
		newchild.innerHTML += '<div class="itembottom"></div>';
		parentdiv.appendChild(newchild);
	}
}
