function SuriOpen(theURL,winName,width,height)
{
		window.open(theURL,winName,"resizable=yes,width=" + width + ",height=" + height + ",left=" + ((window.screen.width - width)/2) + ",top=" + ((window.screen.height - height)/2))
}

function viewPopupMenu(num)
{
	var event = window.event;
	var body = window.document.body;
	
	var clientLeft = body.scrollLeft;
	var clientRight = body.scrollLeft + body.clientWidth;
	var clientTop = body.scrollTop;
	var clientBottom = body.scrollTop + body.clientHeight;
	var clientWidth = body.clientWidth;
	var clientHeight = body.clientHeight;
	
	var menuWidth = 100;
	var menuHeight = 92;
	
	var eventX = body.scrollLeft + event.clientX;
	var eventY = body.scrollTop + event.clientY;
	
	var xPos = 0, yPos = 0;
	
	if ( menuWidth > clientWidth )
	{
		xPos = clientLeft;
	}
	else if ( eventX + menuWidth > clientRight )
	{
		xPos = clientRight - menuWidth;
	}
	else
	{
		xPos = eventX;
	}
	
	if ( menuHeight > clientHeight )
	{
		yPos = clientTop;
	}
	else if ( eventY + menuHeight > clientBottom )
	{
		yPos = clientBottom - menuHeight;
	}
	else
	{
		yPos = eventY;
	}
	
	showMenu(xPos, yPos, num);
}

function showMenu(x, y, num)
{
	for(i=0;i<menu_parent.length;i++)
	{	menu_parent[i].style.display = "none";	}
	
	menu_parent[num].style.left = x;
	menu_parent[num].style.top = y;
	menu_parent[num].style.display = "block";
}

function hideAll(num)
{
	menu_parent[num].style.display = "none";
}


function viewOpPopupMenu()
{
	var event = window.event;
	var body = window.document.body;
	
	var clientLeft = body.scrollLeft;
	var clientRight = body.scrollLeft + body.clientWidth;
	var clientTop = body.scrollTop;
	var clientBottom = body.scrollTop + body.clientHeight;
	var clientWidth = body.clientWidth;
	var clientHeight = body.clientHeight;
	
	var menuWidth = 100;
	var menuHeight = 92;
	
	var eventX = body.scrollLeft + event.clientX;
	var eventY = body.scrollTop + event.clientY;
	
	var xPos = 0, yPos = 0;
	
	if ( menuWidth > clientWidth )
	{
		xPos = clientLeft;
	}
	else if ( eventX + menuWidth > clientRight )
	{
		xPos = clientRight - menuWidth;
	}
	else
	{
		xPos = eventX;
	}
	
	if ( menuHeight > clientHeight )
	{
		yPos = clientTop;
	}
	else if ( eventY + menuHeight > clientBottom )
	{
		yPos = clientBottom - menuHeight;
	}
	else
	{
		yPos = eventY;
	}
	
	showOpMenu(xPos, yPos);
}

function showOpMenu(x, y)
{
	menu_operator.style.left = x;
	menu_operator.style.top = y;
	menu_operator.style.display = "block";
}

function hideOperator()
{
	menu_operator.style.display = "none";
}

function formCheck()
{
	objID = document.frmForm.id;
	if(!objID.value)
	{
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		objID.focus();
		return false;
	}
	
	if(objID.value.length < 4 || objID.value.length > 12){
		alert('¾ÆÀÌµð´Â 4~12ÀÚ ÀÔ´Ï´Ù.');
		objID.select();objID.focus();	
		return false;
	}

	objPwd = document.frmForm.pass;
	if(!objPwd.value)
	{
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		objPwd.focus();
		return false;
	}

	if(objPwd.value.length < 4 || objPwd.value.length > 12){
		alert('ºñ¹Ð¹øÈ£´Â 4~12ÀÚ ÀÔ´Ï´Ù.');
		objPwd.select(); objPwd.focus();	
		return false;
	}
	// º¸¾ÈÁ¢¼Ó/ÀÏ¹ÝÁ¢¼Ó
	if(document.frmForm.connect[1].checked)
	{
	   document.frmForm.action = "https://www.funnuri.com/program/login/login2.asp";
	}
	else
	{
	   document.frmForm.action = "http://www.funnuri.com/program/login/login2.asp";
	}	
}

var boodschap = '¢Ñ ÇÏ·ç 15ÃÊ µ¿¾È ¿ôÀ¸¸é ¼ö¸íÀÌ ÀÌÆ² ´õ ¿¬ÀåµÇ´Â °ÍÀ¸·Î ³ªÅ¸³µ½À´Ï´Ù - ¹Ì±¹ ÀÎµð¿¡³ªÁÖ ºÒ ¸Þ¸ð¸®¾ó º´¿ø -'; 
function dgstatus()
{
    window.status = boodschap;
	timerID= setTimeout("dgstatus()", 30);
}
