<!--

function resetSearch()
{
	hide("divSCountryListBody");

	hide("divSServiceListBody");

	hide("divSTypeListBody");
}

function hide(strID)
{
	var objEl = document.getElementById(strID);

	objEl.style.visibility = "hidden";
}

function onClickSearchListBody(strListBodyID, lstSearch, txtString, evt)
{
	hideShow(strListBodyID, evt);

	var intSelectedIndex = lstSearch.selectedIndex;

	txtString.value = lstSearch.options[intSelectedIndex].text;
}

function hideShow(strID, evt)
{
	evt.cancelBubble = true;

	var objStyle = document.getElementById(strID).style;

	objStyle.visibility == "hidden" ? objStyle.visibility = "visible" : objStyle.visibility = "hidden";
}

function onChangeService(lstService)
{
	var serviceID = getListItemID(lstService);

	if (serviceID == 0)
	{
		clearFeatureText();
	}
	else
	{
		syncFeatureText(serviceID);
	}

	var featureID = getFeatureID();

	if (featureID == 0)
	{
		clearSvcTypeList();
	}
	else
	{
		syncSvcTypeList(featureID);
	}
}

function syncFeatureText(serviceID)
{
	var txtFeature = getFeatureText();

	syncText(serviceID, txtFeature, g_arrFeature);
}

function syncText(id, text, listData)
{
	for (var i = 0; i < listData.length; ++i)
	{
		if (id == listData[i][0])
		{
			text.value = listData[i][1];

			break;
		}
	}
}

function syncSvcTypeList(featureID)
{
	clearSvcTypeList();

	syncList(featureID, getSvcTypeList(), 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 clearFeatureText()
{
	document.Basic.SFeature.value = "0";
}

function clearSvcTypeList()
{
	var lstSvcType = getSvcTypeList();

	clearList(lstSvcType);

	document.Basic.txtSType.value = "";
}

function getFeatureText()
{
	return document.Basic.SFeature;
}

function getSvcTypeList()
{
	return document.Basic.SType;
}

function getFeatureID()
{
	return document.Basic.SFeature.value;
}

function clearList(list)
{
	list.length = 1;

	list.selectedIndex = 0;
}

//-->