	function checkForm(nBBSno){
		var form = document.WriteFrm;
	
		if (strMemberId == ""){
			alert("±Ûµî·Ï½Ã¿¡ ·Î±×ÀÎÀÌ ÇÊ¿äÇÕ´Ï´Ù.");
			LoginPop();
			return;
		}
		if (nBBSno == 6){					
			if ($F('CategoryCode') == ""){
				alert("Á¾·ù ±¸ºÐÀ» ¼±ÅÃÇØÁÖ¼¼¿ä");
				Field.focus('CategoryCode');
				return;
			}			
			if ($F('Title') == ""){
				alert("µî·ÏÇÏ½Ç Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('Title');
				return;
			}
			if (UTIL_lenChar($F('Title')) > 80) {
				alert("µî·ÏÇÏ½Ç Á¦¸ñÀ» ÇÑ±Û 40ÀÚ/¿µ¹®80ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('Title');
				return;
			}
			if ($F('SURL') == ""){
				alert("ÁÁÀº Á¤º¸°¡ ÀÖ´Â »çÀÌÆ® URLÀ» ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('SURL');
				return;
			}
			if (UTIL_lenChar($F('SURL')) > 280) {
				alert("µî·ÏÇÏ½Ç URLÀ» ÇÑ±Û 140ÀÚ/¿µ¹®280ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('SURL');
				return;
			}
		}else if (nBBSno == 8){
			if ($F('KindType') == "042002" && $F('SPlay') == "")
			{
				alert("ÇØ´ç °ø¿¬À» ¼±ÅÃÇÏ¼¼¿ä");
				Field.focus('SPlay');
				return;
			}
			if ($F('content') == ""){
				alert("µî·ÏÇÏ½Ç ³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('content');
				return;
			}
		}else if(nBBSno == 2){
				if ($F('Title') == ""){
					alert("µî·ÏÇÏ½Ç Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä");
					Field.focus('Title');
					return;
				}
				if (UTIL_lenChar($F('Title')) > 80) {
					alert("µî·ÏÇÏ½Ç Á¦¸ñÀ» ÇÑ±Û 40ÀÚ/¿µ¹®80ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇÏ¼¼¿ä");
					Field.focus('Title');
					return;
				}
				var sContent= FCKeditorAPI.GetInstance("content");
				if(sContent.length = 0)
				{
					alert("³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä");					
					return;
				}

				if ($F('Rating1') == "0"){
					alert("°ø¿¬ ¸¸Á·µµ¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä");					
					return;
				}

				if ($F('Rating2') == "0"){
					alert("¹è¿ì ¸¸Á·µµ¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä");					
					return;
				}

				if ($F('Rating3') == "0"){
					alert("°ø¿¬Àå ¸¸Á·µµ¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä");					
					return;
				}


				form.content.value = sContent.GetXHTML();

		}else{
			if (nBBSno == 7 ){
				if ($F('CategoryCode') == ""){
				alert("Á¾·ù ±¸ºÐÀ» ¼±ÅÃÇØÁÖ¼¼¿ä");
				Field.focus('CategoryCode');
				return;
				}
			}else if(nBBSno != 3){
				if ($F('StarPoint') == ""){
				alert("ÆòÁ¡À» ¼±ÅÃÇØÁÖ¼¼¿ä");
				Field.focus('StarPoint');
				return;
				}
			}

			if ($F('Title') == ""){
				alert("µî·ÏÇÏ½Ç Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('Title');
				return;
			}
			if (UTIL_lenChar($F('Title')) > 80) {
				alert("µî·ÏÇÏ½Ç Á¦¸ñÀ» ÇÑ±Û 40ÀÚ/¿µ¹®80ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('Title');
				return;
			}
			if ($F('content') == ""){
				alert("µî·ÏÇÏ½Ç ³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
				Field.focus('content');
				return;
			}
		}

		form.action = "/Community/Community_Work.asp";
		form.submit();
	}

	function CheckMemoForm(nIndex, strNo)
	{
		if (strMemberId == ""){
			alert("±Ûµî·Ï½Ã¿¡ ·Î±×ÀÎÀÌ ÇÊ¿äÇÕ´Ï´Ù.");
			LoginPop();
			return;
		}
		if ($F('memotext'+ nIndex) == "") {
			alert("´ñ±ÛÀ» ÀÔ·Â ÇÏ¼¼¿ä");
			Field.focus('memotext'+ nIndex);
			return;
		}
		if (UTIL_lenChar($F('memotext'+ nIndex)) > 500) {
			alert("µî·ÏÇÏ½Ç ´ñ±ÛÀ» ÇÑ±Û 250ÀÚ/¿µ¹®500ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇÏ¼¼¿ä");
			Field.focus('memotext'+ nIndex);
			return;
		}

		document.memoform.no.value = strNo;
		document.memoform.memotext.value = document.all["memotext" + nIndex].value;
		document.memoform.submit();
	}
	
	function MemoDelete(strNo, strMemoNo)
	{
		if (confirm("Á¤¸» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?") == true){
			document.memoform.no.value = strNo;
			document.memoform.memono.value = strMemoNo;
			document.memoform.jflag.value = "D";
			memoform.submit();
		}
	}
	
	function PostScriptCount(lname, nNo, nBBSNo, sGubun)
	{
		var PopUrl = "http://www.playdb.co.kr/Community/Community_CountPlus.asp?BBSNo="+ nBBSNo +"&No=" + nNo + "&index=" + lname + "&Gubun=" + sGubun;
		$('UseScriptPlus').src = PopUrl;
	}

	function LoginPop()
	{
		window.open("http://www.playdb.co.kr/member/login_pop.asp", "login", "width=400, height=280");	
	}

	function GuidePop()
	{
		window.open("http://www.playdb.co.kr/html/artistdb/guide_popup.html", "guide", "width=340, height=280");	
	}

	function CheckSortForm(sSort){
		document.forms[0].Sort.value=sSort;
		document.forms[0].action = "Community_Common.asp"
		document.forms[0].submit();
	}

	function HotFocus(lname, nNo, nBBSNo)
	{
		//var hotyn = eval("document.all.hotyn" + lname + ".value");
		//if (hotyn == ""){			
			PostScriptCount(lname, nNo, nBBSNo, "H");
			//eval("document.all.hotyn" + lname + ".value='Y'");
			return;
		//}
	}


	function fCheckLogin(){		
		if (strMemberId == ""){
			alert("±Ûµî·Ï½Ã¿¡ ·Î±×ÀÎÀÌ ÇÊ¿äÇÕ´Ï´Ù.");
			LoginPop();
			return false;
		}
	}

	function ComplaintPop(nNo)
	{
		window.open('', 'comp', 'width=340, height=220');
		with (document.memoform) {
			method = "post";
			target = "comp";
			no.value = nNo;
			action = "/Community/Community_Complain.asp";
			submit();
		}
		target = "";		
	}

	function UTIL_lenChar(s) {
		if (!s) return false;
		var len = 0;
		for(var i=0; i<s.length; i++){
			if(s.charCodeAt(i) > 255) len += 2;
			else len++;
		}
		return len;
	}


	function fCheckUserDel(strNo)
	{
		if (confirm("ÀÛ¼ºÇÏ½Å ±ÛÀ» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?") == true){
			document.memoform.no.value = strNo;
			document.memoform.action = "/Community/Community_Work.asp?JobFlag=D";
			memoform.submit();
		}
	}


	function fCheckUserDelBBS(strNo)
	{
		if (confirm("ÀÛ¼ºÇÏ½Å ±ÛÀ» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?"))
		{
			document.WriteFrm.no.value = strNo;
			document.WriteFrm.action = "/Community/Community_Work.asp?JobFlag=D";
			WriteFrm.submit();
		}
	}


//bbs °ü·Ã Á¶±Ýº¸±â(°´Ã¼¸í¹Þ¾Æ¿À±â)
function ListViewContent(ContentName,TitleName,cnt_)
{
	for ( var vi=0; vi<26; vi++ )
	{		
		if (vi != parseInt(cnt_) )
		{
			if ($(ContentName + vi) != null )
			{
				$(ContentName + vi).style.display = "none";
				$(TitleName + vi).style.fontWeight = "";
			}
		}
		else
		{			
			if($(ContentName + cnt_).style.display == "")
			{
				$(ContentName + cnt_).style.display = "none";
				$(TitleName + cnt_).style.fontWeight = "";
			}
			else
			{
				$(ContentName + cnt_).style.display = "";
				$(TitleName + cnt_).style.fontWeight = "bold";		
			}
		}
	}
}
