<!--

function onLoadBody()
{
	loadServiceList();
}

function onChangeService(lstService)
{
	var serviceID = getListItemID(lstService);

	if (serviceID == 0)
	{
		clearFeatureList();
	}
	else
	{
		syncFeatureList(serviceID);
	}
	
	clearSvcTypeList();
}

function onChangeFeature(lstFeature)
{
	var featureID = getListItemID(lstFeature);

	if (featureID == 0)
	{
		clearSvcTypeList();
	}
	else
	{
		syncSvcTypeList(featureID);
	}
}

function loadServiceList()
{
	lstService = getServiceList();

	loadList(lstService, g_arrService);
}

function loadList(list, listData)
{
	for (var i = 0; i < listData.length; ++i)
	{
		list.options[list.length] = new Option(listData[i][1], listData[i][0]);
	}
}

function syncFeatureList(serviceID)
{
	var lstFeature = getFeatureList();

	clearList(lstFeature);

	syncList(serviceID, lstFeature, g_arrFeature);
}

function syncSvcTypeList(featureID)
{
	var lstSvcType = getSvcTypeList();

	clearList(lstSvcType);

	syncList(featureID, lstSvcType, g_arrSvcType);
}

function syncList(id, list, listData)
{
	for (var i = 0; i < listData.length; ++i)
	{
		if (id == listData[i][0])
		{
			list.options[list.length] = new Option(listData[i][2], listData[i][1]);
		}
	}
}

function getListItemID(list)
{
	return list.options[list.selectedIndex].value;
}

function clearFeatureList()
{
	var lstFeature = getFeatureList();

	clearList(lstFeature);
}

function clearSvcTypeList()
{
	var lstSvcType = getSvcTypeList();

	clearList(lstSvcType);
}

function getServiceList()
{
	return document.Basic.SService;
}

function getFeatureList()
{
	return document.Basic.SFeature;
}

function getSvcTypeList()
{
	return document.Basic.SType;
}

function clearList(list)
{
	list.length = 1;
	
	list.selectedIndex = 0;
}

//-->
