function moveItem(selSource, selDestination, pstrAlert) 
{	SorSel = document.frmDataEntry[selSource].selectedIndex;	if(SorSel >= 0)	{
		SorSel = document.frmDataEntry[selSource].selectedIndex;		DesSel = document.frmDataEntry[selDestination].length;
		oValue = document.frmDataEntry[selSource].options[SorSel].value;
		if (!(oValue <= 0) && oValue > "" && oValue != "")		{
			oText = document.frmDataEntry[selSource].options[SorSel].text;			if (oText != '') 
			{				document.frmDataEntry[selSource].options[SorSel] = null;
				document.frmDataEntry[selDestination].options[DesSel] = new Option (oText, oValue, false, true);
				SetDataHasChanged();
			}		}		else		{
			alert(pstrAlert);
		}
	}	else
		alert(pstrAlert);}  

function orderModule(pintDirection, selSelect, pstrAlert)
{
	sl = document.frmDataEntry[selSelect].selectedIndex;
	if (sl != -1 && document.frmDataEntry[selSelect].options[sl].value > "")	{
		oText = document.frmDataEntry[selSelect].options[sl].text;
		oValue = document.frmDataEntry[selSelect].options[sl].value;
		if (document.frmDataEntry[selSelect].options[sl].value > "" && sl > 0 && pintDirection == 0)		{
			document.frmDataEntry[selSelect].options[sl].text = document.frmDataEntry[selSelect].options[sl-1].text;
			document.frmDataEntry[selSelect].options[sl].value = document.frmDataEntry[selSelect].options[sl-1].value;
			document.frmDataEntry[selSelect].options[sl-1].text = oText;
			document.frmDataEntry[selSelect].options[sl-1].value = oValue;
			document.frmDataEntry[selSelect].selectedIndex--;
		}		else if (sl < document.frmDataEntry[selSelect].length-1 && document.frmDataEntry[selSelect].options[sl+1].value > "" && pintDirection == 1)		{
			document.frmDataEntry[selSelect].options[sl].text = document.frmDataEntry[selSelect].options[sl+1].text;
			document.frmDataEntry[selSelect].options[sl].value = document.frmDataEntry[selSelect].options[sl+1].value;
			document.frmDataEntry[selSelect].options[sl+1].text = oText;
			document.frmDataEntry[selSelect].options[sl+1].value = oValue;
			document.frmDataEntry[selSelect].selectedIndex++;
		}		SetDataHasChanged();
	}
	else	{
		alert(pstrAlert);	}
}

function makeList(pselSelected)
{
	val = "";
	for (j=0; j<document.frmDataEntry[pselSelected].length; j++) {
		if (val > "") { val += ","; }
		if (document.frmDataEntry[pselSelected].options[j].value > "") val += document.frmDataEntry[pselSelected].options[j].value;
	}
	return val;
}

function addItemLanguage()
{
	strSelectedSel = "";
	strTextLanguage = "";
	strTextLanguage2Show = "";	intSelectedIndex = document.frmDataEntry.selSourceLanguage.selectedIndex;	if (intSelectedIndex != -1)
	{		strSelectedSel = document.frmDataEntry.selSourceLanguage.options[intSelectedIndex].value;	}
	if ( (strSelectedSel.toString() != "0") && (strSelectedSel.split('-').length > 1) )
	{		if ((intSelectedIndex == -1 || strSelectedSel == ""))
		{			alert(strAlert4);
		}
		else
		{			strTextLanguage = (strTextLanguage != "") ? strTextLanguage : strSelectedSel;
			strTextLanguage2Show = (strTextLanguage2Show != "") ? strTextLanguage2Show : strSelectedSel.split('-')[1];
			intSelLevel = document.frmDataEntry.selLangOverallLevel.selectedIndex;
			intDesSel = document.frmDataEntry.selSelectedLanguage.length;			strTextLanguage += ' - (' + document.frmDataEntry.selLangOverallLevel.options[intSelLevel].value + ')';			if (document.frmDataEntry.selLangOverallLevel.options[intSelLevel].value.split('-').length == 1)				strTextLanguage2Show += ' - (' + document.frmDataEntry.selLangOverallLevel.options[intSelLevel].value + ')';
			else if (document.frmDataEntry.selLangOverallLevel.options[intSelLevel].value.split('-').length > 1)				strTextLanguage2Show += ' - (' + document.frmDataEntry.selLangOverallLevel.options[intSelLevel].value.split('-')[1] + ')';
			document.frmDataEntry.selSelectedLanguage.options[intDesSel] = new Option (strTextLanguage2Show, strTextLanguage, false, true);			document.frmDataEntry.selLangOverallLevel.selectedIndex = 0;			deleteItemLanguage('selSourceLanguage','');
		}
	}}  
function deleteItemLanguage(selSource, pstrAlert) 
{	SorSel = document.frmDataEntry[selSource].selectedIndex;
	if (SorSel != -1 && document.frmDataEntry[selSource].options[SorSel].value != "")	{		if (selSource == 'selSelectedLanguage')		{
		strItem2SelLanguage = document.frmDataEntry.selSelectedLanguage[document.frmDataEntry.selSelectedLanguage.selectedIndex].value;		if (strItem2SelLanguage.split('-').length = 4)	//exp.: 9-English - (0-Native)
			strItem2SelLanguage = Trim(strItem2SelLanguage.split('-')[0]) + " - " + Trim(strItem2SelLanguage.split('-')[1]);
		else if (strItem2SelLanguage.split('-').length = 3)	//exp. 5-Chinees - (**)
			strItem2SelLanguage = Trim(strItem2SelLanguage.split('-')[0]) + " - " + Trim(strItem2SelLanguage.split('-')[1]);		intDesSel = document.frmDataEntry.selSourceLanguage.length;
		document.frmDataEntry.selSourceLanguage.options[intDesSel] = new Option (Trim(strItem2SelLanguage.split('-')[1]), strItem2SelLanguage, false, true);		}
		document.frmDataEntry[selSource].options[SorSel] = null;
	}	else
	{		if (!IsEmpty(pstrAlert))		{
			alert(pstrAlert);		}
	}}
