var wx;
var wy;

function dragIt()
{
	if(event)
	{
		wx = event.x;
		wy = event.y;
	}
}

document.onmousemove = dragIt;

function hideDel()
{
	document.all.div_del.style.display = "none";
	return false;
}

function showDel(idno, readIdx)
{
	document.deleteMessage.idx.value = idno;
	document.deleteMessage.midx.value = readIdx;
	div_del.style.pixelLeft = wx + 10;
	div_del.style.pixelTop  = wy - 10;
	div_del.style.pixelLeft += document.body.scrollLeft;
	div_del.style.pixelTop  += document.body.scrollTop;
	div_del.style.display = '';
	document.deleteMessage.msgPasswd.focus();
	return false;
}

function checkSubmit()
{
	if (document.deleteMessage.msgPasswd.value == "")
	{
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.');
		document.deleteMessage.msgPasswd.focus();
	}
	else
		deleteMessage.submit();
}

function view()
{
	var chck = 0;

	for (var i = 1; i <= tot_cnt; i++)
	{
		check = eval('document.multiForm.multi'+i+'.checked');
		if (check == true)
			chck++;
	}

	if (chck == 0)
		return;

	document.multiForm.type.value = "view";
	document.multiForm.s.value = start;
	document.multiForm.submit();
}

function is_del()
{
	var chck = 0;

	for (var i = 1; i <= tot_cnt; i++)
	{
		check = eval('document.multiForm.multi'+i+'.checked');
		if (check == true)
			chck++;
	}

	if (chck == 0)
		return;
	if (!confirm('Á¤¸»·Î ¼±ÅÃÇÑ °Ô½Ã¹°µéÀ» ¸ðµÎ »èÁ¦ ½ÃÅ°°Ú½À´Ï±î?'))
		return;

	document.multiForm.type.value = "del";
	document.multiForm.s.value = start;
	document.multiForm.submit();
}

function goto_byselect(sel, targetstr)
{
	var index = sel.selectedIndex;
	if (sel.options[index].value != '')
	{
		if (targetstr == 'blank')
		{
			window.open(sel.options[index].value, 'win1');
		}
		else
		{
			var frameobj;

			if ((frameobj = eval(targetstr)) != null)
			frameobj.location = sel.options[index].value;
		}
	}
}

function Mmail(email, opt) 
{
	window.open('mMail.cgi?mail='+ email +'&opt='+ opt, 'mailOpen', 'left=0,top=0,width=420,height=350,scrollbars=no');
}

function imgOpenWin(url)
{
	window.open(url, 'imgWinPop', 'left=0, top=0, width=1, height=1, toolbar=no, menubar=no, status=no, scrollbars=no, resizable=no');
}
