/*
 * Description		: script for site skin
 * Author			: Kim Dong-kyu (superkdk@tt.co.kr)
 * Last Modified	: 2006/01/26
 */

/* °Ô½Ã¹° °ü·Ã script */
function read_notice_article(db, idx, click, pwidth, pheight) {
	if(click==0) {
		location.href = "ttboard.cgi?act=read&db="+ db+"&idx=" + idx;
	} else if(click==1) {
		window.open("ttboard.cgi?act=popup&db="+ db+"&idx=" + idx, "", "width=" + pwidth + ", height=" + pheight + ", scrollbars=1, resizable=1");
	} else if(click==2) {
		window.open("ttboard.cgi?act=read&db="+ db+"&idx=" + idx, "", "width=" + pwidth + ", height=" + pheight + ", scrollbars=1, resizable=1");
	}
}

function view_notice_image(imgpath) {
	url = "ttsite.cgi?object=common/popupimage&imgpath=" + imgpath;
	viewWin = window.open(url,'', 'width=500, height=400, scrollbars=yes, resizable=yes');
}

function auto_notice_popup(db, idx, pwidth, pheight) {
	window.open("ttboard.cgi?act=popup&db=" + db + "&idx=" + idx + "&auto_popup=1", "", "width=" + pwidth + ", height=" + pheight + ", scrollbars=1, resizable=1");
}

function site_search() {
	if(site_search_form.s_key.value == "") {
		alert("°Ë»öÇÒ ´Ü¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		site_search_form.s_key.focus();
		return;
	}

	site_search_form.submit();
}

// Comment Show/Hide
function show_cmt_more() {
	obj = document.getElementById("recentlist")
	sobj = document.getElementById("cmtStat")
	if(obj.style.height=="100px") {
		obj.style.height = "100%";
		sobj.innerHTML = "Hide";
	} else {
		obj.style.height = "100px";
		sobj.innerHTML = "Show";
	}
}

// Tag Show/Hide
function show_tag_more() {
	obj = document.getElementById("taglist")
	sobj = document.getElementById("tagStat")
	if(obj.style.height=="100px") {
		obj.style.height = "100%";
		sobj.innerHTML = "Hide";
	} else {
		obj.style.height = "100px";
		sobj.innerHTML = "Show";
	}
}

