/*******************************************************

bbs_common.js

DESC : 게시판 JSP에서 공통으로 사용하는 스크립트 함수 모음.

MODIFY :

******************************************************/

var posX;
var posY;

function ch_pos() {
	posX = event.x + document.body.scrollLeft - 5;
	posY = event.y + document.body.scrollTop - 5;
}

function view_layer() {
	var obj = document.all.layer_emoticon;
	obj.style.left = posX;
	obj.style.top  = posY;
	if (obj.style.visibility == "hidden"){
		obj.style.visibility = "visible";	
	} else {
		obj.style.visibility = "hidden";	
	}
}

function viewchg(view) {
    if (view == "1")
    {
      document.all.subview01.style.display = '';
	  document.all.subview02.style.display = 'none';
	  document.all.subview03.style.display = 'none';
	  document.all.subview04.style.display = 'none';
	 }
    else if (view == "2")
    {
      document.all.subview01.style.display = 'none';
	  document.all.subview02.style.display = '';
	  document.all.subview03.style.display = 'none';
	  document.all.subview04.style.display = 'none';
    }
	else if (view == "3")
    {
      document.all.subview01.style.display = 'none';
	  document.all.subview02.style.display = 'none';
	  document.all.subview03.style.display = '';
	  document.all.subview04.style.display = 'none';
    }
	else if (view == "4")
    {
      document.all.subview01.style.display = 'none';
	  document.all.subview02.style.display = 'none';
	  document.all.subview03.style.display = 'none';
	  document.all.subview04.style.display = '';
    }
}

function bgChange(row)
{
	row.style.backgroundColor = '#D9F3FF'
}

function bgRecover(row)
{
	row.style.backgroundColor = '#FFFFFF'
}
function change_emoticon(num) {
	var obj = document.bbs;
	var emoticon = "/club_img/netville/main/emoticon/emoticon_" + num + ".gif";
	//obj.src=emoticon;
	document.all["emoticon"].src=emoticon;
	document.bbs.p_imoti_id.value = num;
	//alert(document.bbs.p_imoti_id.value);
	//document.varform.emoticon.value="emoticon_" + num + ".gif";
	document.all.layer_emoticon.style.visibility = "hidden";
}

document.write ("<div id=\"layer_emoticon\" border=\"0\" style=\"left:-200;top:0;position:absolute;visibility:hidden\">")

<!------------------ 이모티콘1 시작 ------------------------->
document.write ("<table id=\"subview01\" width=\"151\" bgcolor=\"#FFFFFF\" border=\"0\" bordercolor=\"#A5B6DE\" cellpadding=\"3\" cellspacing=\"0\" style=\"border-collapse:collapse\" onmouseover=\"document.all.layer_emoticon.style.visibility='visible'\" onmouseout=\"document.all.layer_emoticon.style.visibility='hidden'\">")
document.write ("	<tr align=\"center\">")
document.write ("		<td id=\"emoticon_101\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('101')\"><img src=\"/club_img/netville/main/emoticon/emoticon_101.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_102\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('102')\"><img src=\"/club_img/netville/main/emoticon/emoticon_102.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_103\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('103')\"><img src=\"/club_img/netville/main/emoticon/emoticon_103.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_104\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('104')\"><img src=\"/club_img/netville/main/emoticon/emoticon_104.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_105\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('105')\"><img src=\"/club_img/netville/main/emoticon/emoticon_105.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_106\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('106')\"><img src=\"/club_img/netville/main/emoticon/emoticon_106.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_107\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('107')\"><img src=\"/club_img/netville/main/emoticon/emoticon_107.gif\" border=\"0\"></a></td>")
document.write ("	</tr>")
document.write ("	<tr align=\"center\">")
document.write ("		<td id=\"emoticon_108\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('108')\"><img src=\"/club_img/netville/main/emoticon/emoticon_108.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_109\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('109')\"><img src=\"/club_img/netville/main/emoticon/emoticon_109.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_110\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('110')\"><img src=\"/club_img/netville/main/emoticon/emoticon_110.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_111\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('111')\"><img src=\"/club_img/netville/main/emoticon/emoticon_111.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_112\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('112')\"><img src=\"/club_img/netville/main/emoticon/emoticon_112.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_113\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('113')\"><img src=\"/club_img/netville/main/emoticon/emoticon_113.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_114\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('114')\"><img src=\"/club_img/netville/main/emoticon/emoticon_114.gif\" border=\"0\"></a></td>")
document.write ("	</tr>")
document.write ("	<tr align=\"center\">")
document.write ("		<td id=\"emoticon_115\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('115')\"><img src=\"/club_img/netville/main/emoticon/emoticon_115.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_116\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('116')\"><img src=\"/club_img/netville/main/emoticon/emoticon_116.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_117\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('117')\"><img src=\"/club_img/netville/main/emoticon/emoticon_117.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_118\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('118')\"><img src=\"/club_img/netville/main/emoticon/emoticon_118.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_119\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('119')\"><img src=\"/club_img/netville/main/emoticon/emoticon_119.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_120\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('120')\"><img src=\"/club_img/netville/main/emoticon/emoticon_120.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_121\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('121')\"><img src=\"/club_img/netville/main/emoticon/emoticon_121.gif\" border=\"0\"></a></td>")
document.write ("	</tr>")
document.write ("	<tr align=\"center\">")
document.write ("		<td id=\"emoticon_122\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('122')\"><img src=\"/club_img/netville/main/emoticon/emoticon_122.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_123\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('123')\"><img src=\"/club_img/netville/main/emoticon/emoticon_123.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_124\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('124')\"><img src=\"/club_img/netville/main/emoticon/emoticon_124.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_125\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('125')\"><img src=\"/club_img/netville/main/emoticon/emoticon_125.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_126\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('126')\"><img src=\"/club_img/netville/main/emoticon/emoticon_126.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_127\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('127')\"><img src=\"/club_img/netville/main/emoticon/emoticon_127.gif\" border=\"0\"></a></td>")
document.write ("		<td id=\"emoticon_128\" onMouseOver=\"bgChange(this)\" onMouseOut=\"bgRecover(this)\"><a href=\"javascript:change_emoticon('128')\"><img src=\"/club_img/netville/main/emoticon/emoticon_128.gif\" border=\"0\"></a></td>")
document.write ("	</tr>")
document.write ("</table>")
<!------------------ 이모티콘1 끝 ------------------------->

document.write ("</div>")

