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.ModelListCity.value;
	arrChildren = strChildKieuList.split("|")	;
	
	var x = 0;
	list_kieu.options[x] = new Option("Tỉnh/ Thành phố", "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 RefreshModelsDistrict(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.ModelListDistrict.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 RefreshModelsWards(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.ModelListWards.value;	
	arrChildren = strChildKieuList.split("|")	;	
	var x = 0;
	list_kieu.options[x] = new Option("Phường/ Xã", "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++;
		}
	}
}

