<!--

// Å¬¶óÀÌ¾ðÆ®¿¡ ¼³Ä¡µÈ ActiveX ÄÁÆ®·ÑÀ» ÀÌ¿ëÇØ¼­ ÅäÅ« À¯¹«¸¦ Ã¼Å©ÇÑ´Ù.
//   - ÅäÅ«ÀÌ ÀÖÀ» °æ¿ì ·Î±×ÀÎ ¾×¼Ç ÆäÀÌÁö·Î ÀÌµ¿ÇÑ´Ù.
//   - ÅäÅ«ÀÌ ¾øÀ» °æ¿ì ÀÎÁõÀ» ÇÒ ÇÊ¿ä°¡ ¾øÀ¸¹Ç·Î »çÀÌÆ® ¸ÞÀÎÆäÀÌÁö·Î ÀÌµ¿ÇÑ´Ù.
function js_check_token() {
	// ActiveX¸ðµâÀ» Ã¼Å©ÇÏ¿© ¾øÀ» °æ¿ì ¼³Ä¡¾È³» ÆäÀÌÁö·Î ÀÌµ¿ÇÕ´Ï´Ù
	if (document.KISTI_CLIENT.object == null) {
		if(confirm("º¸¾È¸ðµâÀÌ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù\n¼³Ä¡ ¾È³»ÆäÀÌÁö·Î ÀÌµ¿ÇÏ°Ú½À´Ï±î?"))
			location.href = '/sso/info_activex.html';
		else
			return false
	} else return true
}

function get_ret() {

	if(js_check_token())
		return document.KISTI_CLIENT.TokenExistenceCheck(); 
	else
		return 0
}

function trim(s) { //blank »èÁ¦ ÇÔ¼ö
	var is=0, ie=s.length;
	for(;s.charAt(is)==' ' && is<ie;is++);
	for(;s.charAt(ie-1)==' ' && ie>is;ie--);
	return s.substring(is,ie);
}

function winopen(url, x, y, sc, rs, target){
	var url = url;
	var x = parseInt(x,10)+20;
	var y = parseInt(y,10)+20;
/*	if (sc.toLowerCase() == "yes") {
		x = x + parseInt(20)
		y = y + parseInt(20)
	}
*/
	var topwidth=screen.height-y;
	var leftwidth=screen.width-x;
	window.open(url, target, "width="+ x +", height="+ y +", top="+topwidth/2+", left="+leftwidth/2+", scrollbars="+sc+", resizable="+rs+", toolbar=0, menubar= 0, location=0, directories=0, status=0");
}


// ÀÌ¹ÌÁö ºä¾î
function LA_openImgView(url){
/*	ÇÑ±ÛÆÄÀÏ ½ÇÇà ¾ÈµÈ´Ù
	var tag;

	tag	=	"<html><head><meta http-equiv='content-type' content='text/html; charset=euc-kr'>\n";
	tag +=	"<title>ÀÌ¹ÌÁöº¸±â</title>\n";
	tag +=	"<script language='javascript' src='http://nature.jeju.go.kr/js/script_function.js'></script>\n";
//	tag +=	"<script language='javascript' src='/sumok/inc/script_function.js'></script>\n";	// ³ªÁß¿¡ ¹Ù²ãÁÖÀÚ
	tag +=	"</head>\n";
	tag +=	"<body leftmargin=0 topmargin=0 onload='LA_resizeWin();'>\n";
	tag +=	"<TABLE width=100% cellpadding=2 cellspacing=1 border=0 bgcolor='#CCCCCC'><tr><td align=center bgcolor='#FFFFFF'>";
	tag +=	"<img src='"+url+"' border=0 onclick='self.close();' style='cursor:hand'>";
	tag +=	"</td></tr></table>\n";
	tag +=	"</body></html>\n";

	win=window.open("","imgWin",'width=100,height=100,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,left=100,top=100');
	win.document.open();
	win.document.write (tag);
	win.document.close();
*/
	window.open("http://nature.jeju.go.kr/common/imgview.asp?url="+url,"imgWin",'width=100,height=100,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,left=100,top=100');
}

// µ¿¿µ»ó ºä¾î
function LA_openVodView(url){
	
	var tag;

	tag	=	"<html><head><meta http-equiv='content-type' content='text/html; charset=euc-kr'>\n";
	tag +=	"<title>µ¿¿µ»óº¸±â</title>\n";
	tag +=	"<script language='javascript' src='http://nature.jeju.go.kr/js/script_function.js'></script>\n";
//	tag +=	"<script language='javascript' src='/sumok/inc/script_function.js'></script>\n";	// ³ªÁß¿¡ ¹Ù²ãÁÖÀÚ
	tag +=	"</head>\n";
	tag +=	"<body leftmargin=0 topmargin=0 onload='LA_resizeWin();'>\n";
	tag +=	"<TABLE width=100% cellpadding=2 cellspacing=1 border=0 bgcolor='#CCCCCC'><tr><td align=center bgcolor='#FFFFFF'>";
	tag +=	"<embed src='"+url+"'>";
	tag +=	"</td></tr></table>";
	tag +=	"<TABLE width=100% cellpadding=5 cellspacing= border=0><TR><TD align=center><A HREF='javascript:self.close();' style='font-family:\"±¼¸²,±¼¸²Ã¼\";font-size:11px; color:#3C3C3C;text-decoration: none;'>[Ã¢´Ý±â]</A></TD></TR></table>\n";
	tag +=	"<BR><BR></body></html>\n";

	win=window.open("","imgWin",'width=100,height=100,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,left=100,top=100');
	win.document.open();
	win.document.write (tag);
	win.document.close();

}


function LA_openVRView(url){
	window.open(url,"imgWin",'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,left=100,top=100, width=550, height=450');
}

//À©µµ¿ìÃ¢ ¸®»çÀÌÁî
function LA_resizeWin(){

	var obj = document.body;
	
	var bodyWidth	=	obj.scrollWidth + (obj.offsetWidth - obj.clientWidth)+7;
	var bodyHeight	=	obj.scrollHeight + (obj.offsetHeight - obj.clientHeight)+45;

	//alert(obj.scrollHeight +'/'+obj.offsetHeight+'/'+obj.clientHeight);
	var maxHeight	=	screen.height;

	if(bodyHeight>maxHeight){	
		bodyHeight	= maxHeight;
		bodyWidth	+= 18;
		obj.scroll = 'yes';
	}

	window.resizeTo(bodyWidth,bodyHeight);
	
}

// »ýÅÂÀÚ·á ÀÌ¹ÌÁö ºä¾î	()
function LA_viewImg(m_code,code1,code2,code3,tn){
	var	url = _naturePath + "/common/popupimg.asp?m_code=" + m_code + "&code1=" + code1 + "&code2=" + code2 + "&code3=" + code3 + "&tn=" +tn;
	window.open(url ,"viewImg" ,"toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width=320,height=300,top=100,left=100"); 
}

function resize_frm(){
	var selfBody = document.body;
	var objBody = frm_board.document.body;
	var objFrame = document.getElementById("frm_board");
							
	ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
	objFrame.setExpression('height', ifrmHeight+20);
/*	// ±Û¾²±â ÀÏ°æ¿ì ¾ÆÀÌÇÁ·¹ÀÓ ³ôÀÌ¸¦ ´õ ´Ã·ÁÁÖÀÚ...
	if(pattern.test(arrTmp))	objFrame.setExpression('height', ifrmHeight+300);
	else						objFrame.setExpression('height', ifrmHeight+50);
*/
}


function MM_preloadImages(){}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//-->