// ***************************************************************************************************************************************
// Add new option to the dropdown
function AddNewOption(strControlName, strDispOption, strOptionVal)
{
	var strNewOption = document.createElement('option');
	
	strNewOption.text = strDispOption;
	strNewOption.value = strOptionVal;
	
	var intLocation;
	intLocation= parseInt(strOptionVal);
	
//	alert(intLocation);
	
	document.getElementById(strControlName).options.add(strNewOption);
}
// ***************************************************************************************************************************************
// Add new option to the dropdown
function AddNewOptionIEM(strFormNControl, strDispOption, strOptionVal)
{
	var strNewOption = document.createElement('option');
	
	strNewOption.text = strDispOption;
	strNewOption.value = strOptionVal;
	
	strFormNControl.options.add(strNewOption);
}
// ***************************************************************************************************************************************
// Add new option to the dropdown
function AddNewOptionAtPos(strControlName, strDispOption, strOptionVal, intPosition)
{
	var strNewOption = document.createElement('option');
	
	strNewOption.text = strDispOption;
	strNewOption.value = strOptionVal;
	
	document.getElementById(strControlName).options.add(strNewOption, intPosition);
}
// ***************************************************************************************************************************************
// Remove selected option from the dropdown
function RemoveOption(strControlName, intOptionIndex)
{
	var strRemoveOption = document.getElementById(strControlName);
	strRemoveOption.remove(intOptionIndex);
}
// ***************************************************************************************************************************************
// Remove all options except the first one i.e. default one from the selected dropdown
function RemoveAllOptions(strControlName)
{
//	alert(strControlName);
	if (document.getElementById(strControlName).length > 1)
	{
		for (intCounter = document.getElementById(strControlName).length; intCounter > 1; intCounter--)
		{
			RemoveOption(strControlName, (intCounter - 1));
		}
	}
}
// ***************************************************************************************************************************************
// Remove selected option from the dropdown
function RemoveOptionIEM(strFormNControl, intOptionIndex)
{
	var strRemoveOption = strFormNControl;
	strRemoveOption.remove(intOptionIndex);
}
// ***************************************************************************************************************************************
// Remove all options except the first one i.e. default one from the selected dropdown
function RemoveAllOptionsIEM(strFormNControl)
{
	if (strFormNControl.length > 1)
	{
		for (intCounter = strFormNControl.length; intCounter > 1; intCounter--)
		{
			RemoveOptionIEM(strFormNControl, (intCounter - 1));
		}
	}
}
// ***************************************************************************************************************************************
