function SetAreaItem(MainObj,SubObj,u)
{


	SubObj.length = 0;

	var MainObjValue=MainObj.options[MainObj.selectedIndex].value;    
	var MainObjtext=MainObj.options[MainObj.selectedIndex].text;    
	if (MainObjValue >0)
		{
		if (u == 1)
		{
				var opt=document.createElement("OPTION");
				opt.text="--" + MainObjtext + "--";
				opt.value=0;					
				SubObj.add(opt);
		}
		}

	for (i=0;i<AreaCount; i++)
		{
		if ((Areas[i][1]).substring(0,2) == MainObjValue.substring(0,2))
			{ 
				var opt=document.createElement("OPTION");
				opt.text=Areas[i][0];
				opt.value=Areas[i][1];					
				SubObj.add(opt);
			} 
		}

}

function SetAreaItem02(MainObj,SubObj,MainObj_h,SubObj_h,u)
{
	SubObj.length = 0;

	var MainObjValue=MainObj.options[MainObj.selectedIndex].value;    
	var MainObjtext=MainObj.options[MainObj.selectedIndex].text;    
	if (MainObjValue >0)
		{
		if (u == 1)
		{
				var opt=document.createElement("OPTION");
				opt.text="--" + MainObjtext + "--";
				opt.value=0;					
				SubObj.add(opt);
		}
		}

	for (i=0;i<AreaCount; i++)
		{
		if ((Areas[i][1]).substring(0,2) == MainObjValue.substring(0,2)) 
			{ 
				var opt=document.createElement("OPTION");
				opt.text=Areas[i][0];
				opt.value=Areas[i][1];					
				SubObj.add(opt);
			} 
		}
		
	MainObj_h.value=MainObj.value
	SubObj_h.value=SubObj.value
}


function SetJobNeedItem(MainObj,SubObj,u)
{
	SubObj.length = 0;

	var MainObjValue=MainObj.options[MainObj.selectedIndex].value;    
	var MainObjtext=MainObj.options[MainObj.selectedIndex].text;    
	if (MainObjValue >0)
		{
		if (u == 1)
		{
				var opt=document.createElement("OPTION");
				opt.text="--" + MainObjtext + "--";
				opt.value=0;					
				SubObj.add(opt);
		}
		}

	for (i=0;i<JobNeedCount; i++)
		{
		if ((JobNeeds[i][1]).substring(0,2) == MainObjValue.substring(0,2))
			{ 
				var opt=document.createElement("OPTION");
				opt.text=JobNeeds[i][0];
				opt.value=JobNeeds[i][1];					
				SubObj.add(opt);
			} 
		}

}

function SetJobNeedItem02(MainObj,SubObj,MainObj_h,SubObj_h,u)
{
	SubObj.length = 0;

	var MainObjValue=MainObj.options[MainObj.selectedIndex].value;    
	var MainObjtext=MainObj.options[MainObj.selectedIndex].text;    
	if (MainObjValue >0)
		{
		if (u == 1)
		{
				var opt=document.createElement("OPTION");
				opt.text="--" + MainObjtext + "--";
				opt.value=0;					
				SubObj.add(opt);
		}
		}

	for (i=0;i<JobNeedCount; i++)
		{
		if ((JobNeeds[i][1]).substring(0,2) == MainObjValue.substring(0,2))
			{ 
				var opt=document.createElement("OPTION");
				opt.text=JobNeeds[i][0];
				opt.value=JobNeeds[i][1];					
				SubObj.add(opt);
			} 
		}

	MainObj_h.value=MainObj.value
	SubObj_h.value=SubObj.value
}

function SetWorkNeedItem(MainObj,SubObj,u)
{
	SubObj.length = 0;

	var MainObjValue=MainObj.options[MainObj.selectedIndex].value;    
	var MainObjtext=MainObj.options[MainObj.selectedIndex].text;    
	if (MainObjValue >0)
		{
		if (u == 1)
		{
				var opt=document.createElement("OPTION");
				opt.text="--" + MainObjtext + "--";
				opt.value=0;					
				SubObj.add(opt);
		}
		}

	for (i=0;i<WorkNeedCount; i++)
		{
		if ((WorkNeeds[i][1]).substring(0,2) == MainObjValue.substring(0,2))
			{ 
				var opt=document.createElement("OPTION");
				opt.text=WorkNeeds[i][0];
				opt.value=WorkNeeds[i][1];					
				SubObj.add(opt);
			} 
		}

}

function SetWorkNeedItem02(MainObj,SubObj,MainObj_h,SubObj_h,u)
{
	SubObj.length = 0;

	var MainObjValue=MainObj.options[MainObj.selectedIndex].value;    
	var MainObjtext=MainObj.options[MainObj.selectedIndex].text;    
	if (MainObjValue >0)
		{
		if (u == 1)
		{
				var opt=document.createElement("OPTION");
				opt.text="--" + MainObjtext + "--";
				opt.value=0;					
				SubObj.add(opt);
		}
		}

	for (i=0;i<WorkNeedCount; i++)
		{
		if ((WorkNeeds[i][1]).substring(0,2) == MainObjValue.substring(0,2))
			{ 
				var opt=document.createElement("OPTION");
				opt.text=WorkNeeds[i][0];
				opt.value=WorkNeeds[i][1];					
				SubObj.add(opt);
			} 
		}

	MainObj_h.value=MainObj.value
	SubObj_h.value=SubObj.value
}

function AreaHtoV(u)
{
	h_obj1.style.display="none";
	h_obj2.style.display="none";

	if (h_obj1.value == -1)
		v_obj1.value=h_obj1.value;
	else
		{
		    v_obj1.value=h_obj1.value;
			SetAreaItem(v_obj1,v_obj2,u);
		    v_obj2.value=h_obj2.value;
		}

}

function JobNeedHtoV(u)
{
	h_obj1.style.display="none";
	h_obj2.style.display="none";

	if (h_obj1.value == -1)
		v_obj1.value=h_obj1.value;
	else
		{
		    v_obj1.value=h_obj1.value;
			SetJobNeedItem(v_obj1,v_obj2,u);
		    v_obj2.value=h_obj2.value;
		}

}



function WorkNeedHtoV(u)
{
	h_obj1.style.display="none";
	h_obj2.style.display="none";

	if (h_obj1.value == -1)
		v_obj1.value=h_obj1.value;
	else
		{
		    v_obj1.value=h_obj1.value;
			SetWorkNeedItem(v_obj1,v_obj2,u);
		    v_obj2.value=h_obj2.value;
		}

}


