function parseHash(arg)
{
	arg = arg.charAt(0) == "#" ? arg.substr(1) : arg;
	
	var result = {}, ends = arg.split("&");
	
	for(var i = 0 ;i < ends.length ;i++)
	{
		var divided = ends[i].split("=");
		if(divided[0])
			result[divided[0]] = divided[1];
	}
	
	return result;
};

function init(arg)
{
	var s = parseHash(arg);
	
	onLoadHistory(s);
	if(s.state == "view")
	{
		if(s.item_id == 4820)		//리다이렉션 by saint
		{
			window.location = "http://kma.or.kr/leadership/leadership01.htm ";
			return;
		}
		KMAView.loadView(s.item_id, true);
		window.scrollTo(0, 0);
		onLoadView(s);
	}
	else
	{
		if(s.state != "list")
		{
			if(window._DEFAULT_OBJ)
				s = window._DEFAULT_OBJ;
			else
			{
				s.state = "list";
				s.page = 1;
			}
		}
		
		if(s.board_id)
			KMAList.boardID = s.board_id;
		if(s.board_type)
			KMAList.boardType = s.board_type;
		if(s.time_point)
			KMAList.timePoint = s.time_point;
		if(s.range)
			KMAList.range = s.range;
		if(s.order)
			KMAList.order = s.order;
		if(s.dir)
			KMAList.dir = s.dir;
		if(s.cate)
			KMAList.cate = parseInt(s.cate) || 0;
		if(s.tab)
			KMAList.tab = s.tab;
		if(s.keyword)
			KMAList.keyword = s.keyword;
		
		KMAList.loadList(s.page);
		window.scrollTo(0, 0);
		onLoadList(s);
	}
	
	document.title = "KMA 한국능률협회";
};

function onLoadList(data)
{
};

function onLoadView(data)
{
};

function onLoadHistory(data)
{
};
