// ÀÔ·Â±ÛÀÚ Áß ¼ýÀÚ¸¸ ÀÔ·Â °¡´É
function handlerNum(obj)
{
	var e = window.event;

	if( ( e.keyCode >=  48 && e.keyCode <=  57 ) || (e.keyCode == 8) || (e.keyCode == 9) || (e.keyCode >= 96 && e.keyCode <= 105) )
	{
		return;
	}
	else
	{
		e.returnValue=false;
	}
}

function GoPage(pno)
{
	document.form1.page.value = pno;
	document.form1.submit();
}

function goTwitter(msg,Url)
{
	var tUrl = encodeURIComponent(Url)
	var tMsg = encodeURIComponent(msg)
	window.open("http://twitter.com/share?url="+tUrl+"&text="+tMsg,"Twitter","");
}


function goFacebook(Url,title,summary,img)
{
	var url = ""
	url += "http://www.facebook.com/sharer.php?s=100&p[url]="+encodeURIComponent(Url);
	url += "&p[title]="+encodeURIComponent(title);
	url += "&p[summary]="+encodeURIComponent(summary);
	url += "&p[images][0]="+encodeURIComponent(img);

	window.open(url,"FaceBook","menubar=no,toolbar=no,location=no,status=no,scrollbars=no,width=600,height=350,top=100,left=100,resizable=no");
}

function goMe2Day(msg,url)
{
	mMsg = encodeURI('"'+msg+'"');
	
	var mUrl = escape(url);
	var tags = encodeURI('origins');
	window.open("http://me2day.net/posts/new?new_post[body]="+mMsg+":"+mUrl+"&new_post[tags]="+ tags,"Me2Day","");
}

//»ó´Ü³×ºñÅõµª½º
var t1,t2,t3,t4,t5,t6,t7;
	 
function changeto(mn,list,num)	{
	document.getElementById("topmn"+mn+"_"+list+num).src="/mod/images/nav/topmn"+mn+"_"+list+num+"_on.gif";
}

function changeback(mn,list,num)	{
	document.getElementById("topmn"+mn+"_"+list+num).src="/mod/images/nav/topmn"+mn+"_"+list+num+"_on.gif";
}

function make_visible(num)	{

	document.getElementById('submenu'+num).style.display="block";
}

function make_hidden(num,time) {
	if (num == 1) t1=setTimeout("document.getElementById('submenu1').style.display='none'",time)
	if (num == 2) t2=setTimeout("document.getElementById('submenu2').style.display='none'",time)	
	if (num == 4) t4=setTimeout("document.getElementById('submenu4').style.display='none'",time)
	if (num == 5) t5=setTimeout("document.getElementById('submenu5').style.display='none'",time)
	if (num == 6) t6=setTimeout("document.getElementById('submenu6').style.display='none'",time)
	if (num == 7) t7=setTimeout("document.getElementById('submenu7').style.display='none'",time)
	if (num == 3) t3=setTimeout("document.getElementById('submenu3').style.display='none'",time)

}

// TEXTAREA ±ÛÀÚ¼ö Ã¼Å©ÇÏ±â
function textarea_length_chk(limitLength,conName) {
	textAreaObj = document.getElementById(conName)
	if (textAreaObj == undefined || limitLength < 0) {
		return;
	}

	if (textAreaObj.value.length > limitLength) {
		alert("ÀÔ·ÂÀº ÃÖ´ë" + limitLength + "ÀÚ ±îÁö ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
		textAreaObj.value = textAreaObj.value.substring(0, (limitLength - 1));
		textAreaObj.focus();
		return
	}

	return
}
