function restoreCate(ctno, ctpose)
{
	upButtonDisabled(ctpose);
	//changeCloseFolder(ctpose);

	var parent_length = ctpose.length;

	for(var i = 0; i < family_arr[ctno].length; i++)
	{
		if( ctpose == family_arr[ctno][i].substr(0, parent_length) &&
			family_arr[ctno][i].length > parent_length && 
			document.getElementById(family_arr[ctno][i]).style.display == "")
		{
			upButtonDisabled(family_arr[ctno][i]);
			//changeCloseFolder(family_arr[ctno][i]);
			document.getElementById(family_arr[ctno][i]).style.display = "none";
		}
	}
}

function upButtonAbled(ctpose)
{
	var up_bt_id = "up_bt_" + ctpose;
	document.getElementById(up_bt_id).style.display = "";

	var down_bt_id = "down_bt_" + ctpose;
	document.getElementById(down_bt_id).style.display = "none";
}

function upButtonDisabled(ctpose)
{
	var up_bt_id = "up_bt_" + ctpose;
	document.getElementById(up_bt_id).style.display = "none";

	var down_bt_id = "down_bt_" + ctpose;
	document.getElementById(down_bt_id).style.display = "";
}

function searchSubCate(ctno, ctpose)
{
	var parent_length = ctpose.length;

	for(var i = 0; i < family_arr[ctno].length; i++)
	{
		// alert(ctpose +"=="+ family_arr[ctno][i].substr(0, parent_length));
		if( ctpose == family_arr[ctno][i].substr(0, parent_length) )
		{
			if( family_arr[ctno][i].length == parent_length + 3 )
			{
				document.getElementById(family_arr[ctno][i]).style.display = "";
			}
		}
	}
}

//// display sub category - start ////
function displaySubCate(ctno, ctpose)
{
	upButtonAbled(ctpose);
	//changeOpenFolder(ctpose);
	searchSubCate(ctno, ctpose);
}
//// display sub category - end ////
