
/* ---------------------   Ä«Å×°í¸® ¼¿·ºÆ® ·¹ÀÌ¾î  ---------------------- */
var selectCate1 = '';
var selectCate2 = '';
function ToggleCateList(objList, depth, h)
{
	if(depth == 2)
	{
		if(objList == '')
		{
			HideLayer(selectCate1);
			HideLayer(selectCate2);
			selectCate1 = '';
			selectCate2 = '';
		}
		else
		{
			if(selectCate1 != objList)
			{
				HideLayer(selectCate1);
				ShowLayer(objList);
				selectCate1 = objList;
			}
			else
			{
				//ToggleCateLayer(objList, depth);
			}
			HideLayer(selectCate2);
			selectCate2 = '';
			objList.style.top = h;
		}
	}
	else if(depth == 3)
	{
		if(objList == '')
		{
			HideLayer(selectCate2);
			selectCate2 = '';
		}
		else
		{
			if(selectCate2 != objList)
			{
				ToggleCateLayer(selectCate2, depth);
				ToggleCateLayer(objList, depth);
			}
			else
			{
				//ToggleCateLayer(objList, depth);
			}
			objList.style.top = parseInt(selectCate1.style.top) + h;
		}
	}
}

function ShowLayer(obj)
{
	if(obj != '')
	{
		obj.style.visibility = 'visible';
	}
}

function HideLayer(obj)
{
	if(obj != '')
	{
		obj.style.visibility = 'hidden';
	}
}

function ToggleCateLayer(objList, depth)
{
	if(objList != '')
	{
		obj = objList;

		if(obj.style.visibility == 'visible')
		{
			obj.style.visibility = 'hidden';
			if(depth == 2)
				selectCate1 = '';
			else if(depth == 3)
				selectCate2 = '';
			if(obj.id == 'categoryList')
			{
				HideLayer(selectCate1);
				HideLayer(selectCate2);
				selectCate1 = '';
				selectCate2 = '';
			}
		}
		else
		{
			obj.style.visibility = 'visible';
			if(depth == 2)
				selectCate1 = objList;
			else if(depth == 3)
				selectCate2 = objList;
		}
	}
}

function ShowCateList(obj)
{
	ToggleCateLayer(categoryList, 1);
	//ToggleCateListImg(obj);
}

function ToggleCateListImg(obj)
{
	if(categoryList.style.visibility != 'visible')
		obj.src = '../image/category_tab_1.gif';
	else
		obj.src = '../image/category_tab_1_over.gif';
}

function SwapCateListImg(obj, flag)
{
	if(categoryList.style.visibility != 'visible')
	{
		if(flag == 1)
			obj.src = '../image/category_tab_1_over.gif';
		else
			obj.src = '../image/category_tab_1.gif';
	}
}
/* ---------------------   Ä«Å×°í¸® ¼¿·ºÆ® ·¹ÀÌ¾î  ---------------------- */

function ChangeSort(sort)
{
	//__doPostBack('btnSortChange', sort);
}

function ToggleLayer(obj)
{
	if(obj != '')
	{
		if(obj.style.visibility == 'visible')
		{
			obj.style.visibility = 'hidden';
		}
		else
		{
			obj.style.visibility = 'visible';
		}
	}
}

function ToggleStyle(objId, tglVal)
{
	obj = eval(objId);
	if(tglVal == 1)
	{
		obj.style.background = '';
		obj.style.color = '#666';
		obj.style.fontWeight = '';
		obj.style.fontSize = '12px';
	}
	else
	{
		obj.style.background = '#ffeef1';
		obj.style.color = '#ff6666';
		obj.style.fontWeight = 'bold';
		obj.style.fontSize = '11px';
	}
}

function OpenCashLayer()
{
	window.frmCash.location.href = "../cash/cash_agree.aspx";
	black.style.zIndex = '80';
	black.style.visibility = 'visible';
	cash.style.visibility = 'visible';
}

function CloseCashLayer()
{
	window.frmCash.location.href = "about:blank";
	black.style.zIndex = '40';
	black.style.visibility = 'hidden';
	cash.style.visibility = 'hidden';
}

