function sendemail(uid){
	
	var url = "/skin/new_sendmail.php?uid=" + uid;

	window.open(url, "newwin1", "width=520,height=480,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");


}

function printable(uid){

	var url = "/skin/news_print.php?uid=" + uid;
	window.open(url, "newwin2", "width=800,height=800,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");

}

function toggleView(target){
    var sTarget = target.href.split("#");
    var aTarget = document.getElementById(sTarget[sTarget.length-1]);
    if(aTarget.style.display == "none") aTarget.style.display = "block";
    else aTarget.style.display = "none";
}

function newstapm(n)
{
	for(var i = 1; i < 3; i++)
	{
		obj = document.getElementById('newstapm'+i);
		img = document.getElementById('newstapm_btn'+i);
		if ( n == i )
		{
			obj.style.display = "block";
			img.height = 27;
			img.src = "/img/main2/main_newstabone_on"+i+".gif";
		}
		else
		{
			obj.style.display = "none";
			img.height = 27;
			img.src = "/img/main2/main_newstabone_off"+i+".gif";
		}
	}
}

function newstapmtwo(n)
{
	for(var i = 1; i < 4; i++)
	{
		obj = document.getElementById('newstapmtwo'+i);
		img = document.getElementById('newstapmtwo_btn'+i);
		if ( n == i )
		{
			obj.style.display = "block";
			img.height = 29;
			img.src = "/img/main2/main_newstabmtwo_on"+i+".gif";
		}
		else
		{
			obj.style.display = "none";
			img.height = 29;
			img.src = "/img/main2/main_newstabmtwo_off"+i+".gif";
		}
	}
}

function newstapmthree(n)
{
	for(var i = 1; i < 6; i++)
	{
		obj = document.getElementById('newstapmthree'+i);
		if ( n == i )
		{
			obj.style.display = "block";
		}
		else
		{
			obj.style.display = "none";
		}
	}
}


function popWindow(url, w, h)
{
window.open(url, "newwin", "width="+w+",height="+h+",toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");
}

function closeWin()
{ 
	if ( document.notice_form.chkbox.checked )
	{ 
		setCookie( "ncookie", "done" , 12 ); 
	} 
	document.getElementById('ukopopup').style.display = "none";
}

// ¸µÅ© Å¬¸¯½Ã Å×µÎ¸®ÀÇ Á¡¼±¾ø¾Ö±â 
function bluring()
{
	if(event.srcElement.tagName=="A" || event.srcElement.tagName=="IMG")
	document.body.focus();
}
document.onfocusin=bluring;


function open_item(strItem) 
{
   if(document.getElementById(strItem)!=null)
		document.getElementById(strItem).style.display ="";

	if(strItem=="stock_columnview")
		stock_columnview_frame.location.href ="./app/stock2.php";
	else if(strItem=="exhange_columnview")
		exhange_columnview_frame.location.href ="http://ebank.keb.co.kr/exchange/CurEx2.html";	
}

function close_item(strItem) 
{
	if(document.getElementById(strItem)!=null)
		document.getElementById(strItem).style.display ="none";
}

function check_searchForm(item_id){
	
	var obj = document.getElementById(item_id);
	if(obj==null) return true;	

	if(!obj.value) {
		alert("°Ë»ö Å°¿öµå¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		obj.focus();
		return false;		
	}

	return true;
}