function RefreshModelsCity(nhasanxuatSelectBox , kieu_SelectBox)
{
	var list_nhasanxuat = eval("theform." + nhasanxuatSelectBox);
	var list_kieu = eval("theform." + kieu_SelectBox);	
	var nhasanxuat_id = list_nhasanxuat.options[list_nhasanxuat.selectedIndex].value;
	var arrChildren;
	var arrTemp	;
	var i;
		
	list_kieu.length = 0 ;				
	var strChildKieuList = theform.ModelList.value;
	arrChildren = strChildKieuList.split("|")	;	
	var x = 0;
	list_kieu.options[x] = new Option("Quận/Huyện", "0");
	x++;
	
	for (i = 0; i< arrChildren.length; i++)
	{
		arrTemp = arrChildren[i].split("~");
		if (nhasanxuat_id == arrTemp[0]) 
		{
			list_kieu.options[x] = new Option(arrTemp[2], arrTemp[1]);
			x++;
		}
	}
}

function RefreshModelsPromiseCity(nhasanxuatSelectBox , kieu_SelectBox)
{	
	var list_nhasanxuat = eval("theform." + nhasanxuatSelectBox);
	
	var list_kieu = eval("theform." + kieu_SelectBox);	
	var nhasanxuat_id = list_nhasanxuat.options[list_nhasanxuat.selectedIndex].value;
	var arrChildren;
	var arrTemp	;
	var i;
		
	list_kieu.length = 0 ;				
	var strChildKieuList = theform.ModelList.value;
	arrChildren = strChildKieuList.split("|")	;	
	var x = 0;
	list_kieu.options[x] = new Option("Quận/Huyện", "0");
	x++;
	
	for (i = 0; i< arrChildren.length; i++)
	{
		arrTemp = arrChildren[i].split("~");
		if (nhasanxuat_id == arrTemp[0]) 
		{
			list_kieu.options[x] = new Option(arrTemp[2], arrTemp[1]);
			x++;
		}
	}
}

function RefreshModelsCityHospital(nhasanxuatSelectBox , kieu_SelectBox)
{
	var list_nhasanxuat = eval("theforms." + nhasanxuatSelectBox);
	var list_kieu = eval("theforms." + kieu_SelectBox);	
	var nhasanxuat_id = list_nhasanxuat.options[list_nhasanxuat.selectedIndex].value;
	var arrChildren;
	var arrTemp	;
	var i;
		
	list_kieu.length = 0 ;				
	var strChildKieuList = theforms.ModelListHospital.value;
	arrChildren = strChildKieuList.split("|")	;
	
	var x = 0;
	list_kieu.options[x] = new Option("Quận/Huyện", "0");
	x++;
	
	for (i = 0; i< arrChildren.length; i++)
	{
		arrTemp = arrChildren[i].split("~");
		if (nhasanxuat_id == arrTemp[0]) 
		{
			list_kieu.options[x] = new Option(arrTemp[2], arrTemp[1]);
			x++;
		}
	}
}

function RefreshModelsHospital(nhasanxuatSelectBox , kieu_SelectBox)
{
	var list_nhasanxuat = eval("theform." + nhasanxuatSelectBox);
	var list_kieu = eval("theform." + kieu_SelectBox);	
	var nhasanxuat_id = list_nhasanxuat.options[list_nhasanxuat.selectedIndex].value;
	var arrChildren;
	var arrTemp	;
	var i;
		
	list_kieu.length = 0 ;				
	var strChildKieuList = theform.ModelList.value;	
	arrChildren = strChildKieuList.split("|")	;
	
	var x = 0;
	list_kieu.options[x] = new Option("Lựa chọn ---------------------------------------------", "0");
	x++;
	
	for (i = 0; i< arrChildren.length; i++)
	{
		arrTemp = arrChildren[i].split("~");
		if (nhasanxuat_id == arrTemp[0]) 
		{
			list_kieu.options[x] = new Option(arrTemp[2], arrTemp[1]);
			x++;
		}
	}
}

function RefreshModelsDate(nhasanxuatSelectBox , kieu_SelectBox)
{
	var list_nhasanxuat = eval("theform." + nhasanxuatSelectBox);
	var list_kieu = eval("theform." + kieu_SelectBox);	
	var nhasanxuat_id = list_nhasanxuat.options[list_nhasanxuat.selectedIndex].value;
	var arrChildren;
	var arrTemp	;
	var i;
		
	list_kieu.length = 0 ;				
	var strChildKieuList = theform.ModelListDate.value;	
	arrChildren = strChildKieuList.split("|")	;
	
	var x = 0;
	list_kieu.options[x] = new Option("Chọn giờ", "0");
	x++;
	
	for (i = 0; i< arrChildren.length; i++)
	{
		arrTemp = arrChildren[i].split("~");
		if (nhasanxuat_id == arrTemp[0]) 
		{
			list_kieu.options[x] = new Option(arrTemp[2], arrTemp[1]);
			x++;
		}
	}
}

