window.onload = function() {
	cForm = new CForm(document.frm);

	var aImgs = document.getElementsByName("mainTab");

	cTab = new CImageGroup(aImgs);
	cTab.createTab(clickTab, updateTab);
}

function updateTab() {
	cTab.updateTab(this);
	this.onmouseout = null;

	changeTab(cTab.getPointer(this));
}

function changeTab(nIndex) {
	var aNodes = document.getElementsByName("divTab");
	var oNode = aNodes[nIndex];

	for(var i = 0; i < aNodes.length; i++) {
		aNodes[i].style.display = "none";
	}

	oNode.style.display = "";
}

function clickTab() {
	var nIndex = cTab.getPointer(this);

	if(nIndex == 0) {
		getURL(infoURL + "introDept.jsp", new Array(new Array("pMenuCD", strInfoMenuCD), new Array("pDeptMenuCD", strMenuCD)));
	} else if(nIndex == 1) {
		getURL(noticeURL + "mctNoticeList.jsp", new Array(new Array("pMenuCD", strNoticeMenuCD), new Array("pType", strNoticeType)));
	} else {
		getURL(openURL + "openDataList.jsp", new Array("pMenuCD", strOpenMenuCD));
	}
}

function noticeView(strSeq) {
	var aData = new Array(new Array("pMenuCD", strNoticeMenuCD), new Array("pSeq", strSeq), new Array("pType", strNoticeType), new Array("nMenuCD", "0301000000"));

	getURL(noticeURL + "mctNoticeView.jsp", aData);
}

function openView(strSeq) {
	var aData = new Array(new Array("pMenuCD", strOpenMenuCD), new Array("pSeq", strSeq));

	getURL(openURL + "openDataView.jsp", aData);
}

function infoView(strData, strDataCD) {
	if(strDataCD != null) {
		strMenuCD = strDataCD;
	}

	getURL(infoURL + "introDept.jsp", new Array(new Array("pMenuCD", strInfoMenuCD), new Array("pDeptMenuCD", strMenuCD), new Array("pTeamCD", strData)));
}