//-------------------------------------------------------------------------------------------------------------------------
/**
*	ÈÞ´ëÆù ¹øÈ£º¸È£¼­ºñ½º(°¡ÀÔÈ­¸é³ëÃâ)
*	/bill/ ÇÏ´Ü¿¡ ÆäÀÌÁö¿¡¼­ Ã¢À» ´ÝÀ»°æ¿ì °¡ÀÔÈ­¸é ³ëÃâ
*	¼­Á¤È¯ 09.12.29
*/
var isBillClick = false;
window.onunload = function()
{
	var _url = location.href;
	var _readyState =  document.readyState;
	if(_url.indexOf('thinkpool.com/bill/') != -1)
	{
		 if(_readyState != 'loading')
		 {
		 	if(!isBillClick)
		 	{
				window.open('http://m-ng.kr/CellService.do?method=service&siteCode=21746300&pid=A1&ctg=2&subNo=2','cellService','scrollbars=no,titlebar=no,status=no,resize=no,width=500,height=350');
			}
		}
	}
}
//-------------------------------------------------------------------------------------------------------------------------

var recomm_msg = "ÀÌ±Û¿¡ ´ëÇØ ÀÌ¹Ì ÀÇ°ßÀ» ÁÖ¼Ì½À´Ï´Ù.";
var recomm_expires_date = 1;
var imgUrl = "http://img.thinkpool.com";
var isXp = navigator.userAgent.indexOf('windows NT 5.1') > 0;
var isIE70 = navigator.userAgent.indexOf('MSIE 7.0') > 0;
var gethtml_str = "";

function getHtml(p_url,p_method,p_param) {

 var ret = "";
 var AjaxObj = new Ajax.Request(p_url,{method: p_method,parameters: p_param,asynchronous:false,onSuccess:getHtmlRet});

 return gethtml_str;

}


function getFlashInstance(flashID)
{
	if(navigator.appName.indexOf("Microsoft") != -1)
	{
		return window[flashID];
	}
	else
	{
		return document[flashID];
	}
}


function checkBytes(lim)
{ //¹ÙÀÌÆ® Á¦ÇÑ ¼ýÀÚ¸¦ ¸Å°³º¯¼ö·Î ¹ÞÀ½
	frm = document.f; //Æû°´Ã¼
	v = frm.memo.value; //ÀÔ·Â°ª
	re0=/[a-z]|[0-9]/gi; //¿µ¼ýÀÚ ÆÐÅÏ
	re1=/[¤¡-ÆR]/g; //ÇÑ±ÛÆÐÅÏ
	v0=v.match(re0); //¸ÅÄ¡È®ÀÎ
	v1=v.match(re1); //¸ÅÄ¡È®ÀÎ
	if(v0 != null) v0 = v0.length; //¹ÙÀÌÆ® ±¸ÇÔ
	if(v1 != null) v1 = v1.length; //¹ÙÀÌÆ® ±¸ÇÔ
	tot = v0 + (v1 * 2); //ÇÕÀ» ±¸ÇÔ
	if(tot <= lim)
	{ //ÇÑ°è¼öÄ¡ÀÌ³»ÀÎ°æ¿ì ¹ÙÀÌÆ®Ç¥½Ã
		//f.t1.value=tot;
		$('viewByte').innerText = tot;
	}
	else
	{ //ÇÑ°è¸¦ ÃÊ°úÇÏ¸é °æ°í¹® Ãâ·Â
		alert('ÇÑ±ÛÀº 500ÀÚ ¿µ¹®Àº 1000ÀÚ±îÁö °¡´ÉÇÕ´Ï´Ù.');
		frm.memo.select(); //ÀÔ·Â°ªÀ» ¼±ÅÃ
	}
}

function getHtmlRet (request) {

	gethtml_str = request.responseText;
}

function getLoginFlag() {

 	var loginFlag = getHtml("http://www.thinkpool.com/login/LoginAuthFlag.jsp","get","");

 	if (loginFlag.indexOf("N") > -1) {
		return "N";
	} else {
		return "Y";
	}
}

function TM_preloadImg() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=TM_preloadImg.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function TM_imgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function TM_findImg(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=TM_findImg(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function TM_imgView() { //v3.0
  var i,j=0,x,a=TM_imgView.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=TM_findImg(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function goUrl(combo) {

	if (combo.value != "")
		location.href = combo.value;

}

function setItemCode(code){

	var itemcode = "";
	var str = "";

	itemcode = getCookie("thinkpoolcode");

	itemcode = Replace(itemcode,code,'');

	str = code + itemcode;

	if (str.length > 42) {
		str = str.substring(0,42);
	}

	setCookie("thinkpoolcode",str,30);

}

function delItemCode(code){

	var itemcode = "";

	itemcode = getCookie("thinkpoolcode");

	itemcode = Replace(itemcode,code,'');

	setCookie("thinkpoolcode",itemcode,30);

}

function goItemAnal(f) {



	if (f.code.value == '' || f.code.value == 'Á¾¸ñ¸í/ÄÚµå') {
		alert('Á¾¸ñ or ÄÚµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä!');
		f.code.focus();
		return false;
	}else {

		f.submit();
	}



}


function realTimeService(f) {
	if (f.code.value == '' || f.code.value == '**Á¾¸ñ¸í/ÄÚµå**') {
		alert('Á¾¸ñ¸íÀÌ³ª ÄÚµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä!');
		f.code.focus();
		return;
	}
	var code = f.code.value;
	if (f.whr[0].checked) {
		window.open("/itemanal/item119/connect.jsp?code=" + code,"item_119","width=240,height=400,resizable=no,scrollbars=auto");
	} else if (f.whr[1].checked) {
		quick_srch_iframe_side.location.replace("/itemanal/quick/quick_item_srch.jsp?code=" + code);
	} else if (f.whr[2].checked) {
		document.location.href = "/itemanal/connect.jsp?menu=/i/signal&code=" + code;
		window.close();
	}
}
function realTimeServiceN(f){
	if (f.code.value == '' || f.code.value == '**Á¾¸ñ¸í/ÄÚµå**') {
		alert('Á¾¸ñ¸íÀÌ³ª ÄÚµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä!');
		f.code.focus();
		return;
	}
	var code = f.code.value;
	if (f.whr[0].checked) {
		document.location.replace("/itemanal/item119/connect.jsp?code=" + code);
	} else if (f.whr[1].checked) {
		quick_srch_iframe.location.replace("/itemanal/quick/quick_item_srch.jsp?code=" + code);
	} else if (f.whr[2].checked) {
		opener.location.href = "/itemanal/connect.jsp?menu=/i/signal&code=" + code;
		window.close();
	}
}
function quick_anal_pop(code,name) {
	window.open('/itemanal/quick/quick_item_anal.jsp?code=' + code + '&name=' + name,'quick_item_anal','scrollbars=no,titlebar=no,status=no,resize=no,width=660,height=620')
	document.searchForm.code.value = "";
}
function signalFocus2(obj) {
	if (obj.value == '**Á¾¸ñ¸í/ÄÚµå**') {
		obj.value = "";
	}
}
function signalBlur2(obj) {
	if (obj.value == '') {
		obj.value = "**Á¾¸ñ¸í/ÄÚµå**";
	}
}
function iscoreSrch(url) {
	quick_srch_iframe_side.location.replace("");
	document.location.href = url;
}



function open_medical_room(room_no,f)
{
	var url = "/medical/attend/room.jsp?room_no=" + room_no +"&flag=" + f;
	window.open( url, "medical_room_pop", "width=300,height=200,scrollbars=no,resizable=yes");
}

function open_flive(gb,seqno)
{
	var url = "/live/sms/mylist_form.jsp?gb=" + gb +"&seqno=" + seqno + "&authpos=" +smsAuthPosNum() ;
	window.open( url, "flive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_flive_ex(gb,seqno,gate)
{
	var url = "/live/view/f_live.jsp?gate=" + gate + "&gb=" + gb +"&seqno=" + seqno;
	window.open( url, "flive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_flive_mode(gb,seqno,mode)
{
	var url = "/live/view/f_live.jsp?gb=" + gb +"&seqno=" + seqno +"&mode=" + mode;
	window.open( url, "flive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_flive_free(gb,seqno,mode,pos)
{
	var url = "/live/sms/mylist_form.jsp?gb=" + gb +"&seqno=" + seqno +"&mode=free&pos="+pos+"&authpos=" +smsAuthPosNum();
	window.open( url, "flive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_flive_free_log(gb,seqno,mode,pos,gcode)
{
	var url = "/live/sms/mylist_form.jsp?Gcode="+gcode+"&gb=" + gb +"&seqno=" + seqno +"&mode=free&pos="+pos+"&authpos=" +smsAuthPosNum();
	window.open( url, "flive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_flive_miraeasset(gb,seqno)
{
	var url = "/live/view/f_live.jsp?gb=" + gb +"&seqno=" + seqno + "&mode=miraeasset";
	window.open( url, "flive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_flive_sign(gb,seqno)
{
	var url = "/live/view/f_live.jsp?gb=" + gb +"&seqno=" + seqno + "&mode=sign";
	window.open( url, "flive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_flive_settle_mem(penid)
{
	var url = "/live/settle/f_settle_mem.jsp?penid=" + penid;
	window.open( url, "f_settle_mem", "width=326,height=270,scrollbars=no,resizable=no");
}

function open_mlive(gb,seqno)
{
	var url = "/live/sms/mylist_form.jsp?gb=" + gb +"&seqno=" + seqno + "&authpos=" +smsAuthPosNum() ;
	window.open( url, "mlive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_mlive_mode(gb,seqno,mode)
{
	var url = "/live/view/m_live.jsp?gb=" + gb +"&seqno=" + seqno +"&mode=" + mode;
	window.open( url, "mlive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_mlive_free(gb,seqno,mode,pos)
{
	var url = "/live/sms/mylist_form.jsp?gb=" + gb +"&seqno=" + seqno +"&mode=free&pos="+pos;
	window.open( url, "mlive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_live_free(gb,seqno,mode,pos)
{
	var url = "/live/sms/mylist_form.jsp?gb=" + gb +"&seqno=" + seqno +"&mode=free&pos="+pos+"&authpos=" +smsAuthPosNum();
	window.open( url, "live_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_live_settle_mem(penid)
{
	var url = "/live/settle/live_settle_mem.jsp?penid=" + penid;
	window.open( url, "settle_mem", "width=326,height=270,scrollbars=no,resizable=no");
}

function open_mlive_miraeasset(gb,seqno)
{
	var url = "/live/view/m_live.jsp?gb=" + gb +"&seqno=" + seqno + "&mode=miraeasset";
	window.open( url, "mlive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_mlive_sign(gb,seqno)
{
	var url = "/live/view/m_live.jsp?gb=" + gb +"&seqno=" + seqno + "&mode=sign";
	window.open( url, "mlive_room", "width=230,height=130,scrollbars=no,resizable=yes");
}

function open_medical_settle_mem(grp_gb,penid)
{
	var url = "/medical/settle/settle_mem.jsp?grp_gb=" + grp_gb + "&penid=" + penid;
	window.open( url, "medical_settle_mem", "width=326,height=270,scrollbars=no,resizable=no");
}

function open_msvc_settle_mem(penid)
{
	var url = "/Club/msvc/settle_mem.jsp?penid=" + penid;
	window.open( url, "msvc_settle_mem", "width=326,height=270,scrollbars=no,resizable=no");
}

function open_mship_settle_mem(penid,srvtype,term)
{
	var url = "/live/memsvc/settle/settle_mem.jsp?penid=" + penid + "&srvtype=" + srvtype +"&term=" + term;
	window.open( url, "memsvc_settle_mem", "width=326,height=270,scrollbars=no,resizable=no");
}

function open_sponcircle(dbName, sn, penid, nextUrl)
{
	var url = "/itemanal/invest/sponcircle/popup.jsp?number=" + sn + "&name=" + dbName+"&penid="+penid;
	if(nextUrl != undefined)
	{
		url+= '&nextUrl='+nextUrl;
	}
	return window.open( url, "sponcircle", "width=350,height=270,scrollbars=no,resizable=no");
}


function open_clinic_settle_mem(dbName, sn)
{
	var url = "/itemanal/invest/clinic_settle_pre.jsp?number=" + sn + "&name=" + dbName;
	window.open( url, "invest_bill", "width=350,height=270,scrollbars=no,resizable=no");
}

function open_arsmship_settle_mem(penid,srvtype,term)
{
	var urlstr;

	if(srvtype=="F"){
		urlstr = "/spcenter/mship/settle/settle_mem.jsp?penid=" + penid + "&srvtype=" + srvtype +"&term=" + term;
	}else{
		urlstr = "/future/arsmship/settle/settle_mem.jsp?penid=" + penid + "&srvtype=" + srvtype +"&term=" + term;
	}
	window.open( urlstr, "memsvc_settle_mem", "width=326,height=386,scrollbars=no,resizable=no");
}

function open_clubbiz_settle_mem(cname,userid,term)
{
	var url = "/club/biz/settle/settle_mem.jsp?cname=" + cname + "&userid=" + userid +"&term=" + term;
	window.open( url, "memsvc_settle_mem", "width=326,height=390,scrollbars=no,resizable=no");
}

function open_clubbiz_settle_mem_aca(cname,userid,term)
{
	var url = "/club/biz/settle/settle_mem_aca.jsp?cname=" + cname + "&userid=" + userid +"&term=" + term;
	window.open( url, "memsvc_settle_mem_aca", "width=326,height=390,scrollbars=no,resizable=no");
}

function open_dseeker_settle_mem(penid)
{
	var url = "/dseeker/settle/dseeker_settle_mem.jsp?penid=" + penid;
	window.open( url, "dseeker_settle_mem", "width=326,height=270,scrollbars=no,resizable=no");
}
function open_dseeker_settle_mem_close()
{
	alert("ÇöÀç ÂÊÁý°Ô ¼­ºñ½º¸¦ °¡ÀÔÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
}

function open_luxc_settle_mem(penid)
{
	var url = "/luxc/settle/luxc_settle_mem.jsp?term=1&penid=" + penid;
	window.open( url, "luxc_settle_mem", "width=320,height=355,scrollbars=no,resizable=no");
}

function open_rummor_settle_mem(mtype,num,code,page)
{
	var url = "/newsnnews/rummor/settle_mem.jsp?mtype=" + mtype + "&num=" + num + "&code=" + code + "&page=" + page;
	window.open(url, "rummor_settle_mem", "width=350,height=270,scrollbars=no,resizable=no");
}

function global_serch()
{
	window.open("http://concert.thinkpool.com/gsearch/globalSearch_pop.asp", "g_serch", "width=650,height=700,scrollbars=yes,resizable=no");
}

function OnlyNumber()
{
	if((event.keyCode<48)||(event.keyCode>57))
	event.returnValue=false;
}

function checkCode(v)
{
  for(i=0;i<v.length;i++) {
    if (v.substring(0,1) < '0' || v.substring(0,1) > '9')
       return false;
  }
  return true;
}

function itemFocus(obj) {

	if (obj.value == 'Á¾¸ñÁ¤º¸') {

		obj.value = "";
	}

}

function itemBlur(obj) {

	if (obj.value == '') {

		obj.value = "Á¾¸ñÁ¤º¸";
	}

}

function formchk(f) {

	if (f.code.value == 'Á¾¸ñÁ¤º¸') {
		top.location.href = 'http://www.thinkpool.com/analysis/main_anal.jsp?m=m1&name=m1s1&menu=item_anal&sub=m1s1';
		return;
	}
	if (f.code.value == '') {

		alert('Á¾¸ñ or ÄÚµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä!');
		f.code.focus();
		return false;

	} else {

		window.location.href="http://www.thinkpool.com/analysis/searchCode.jsp?code="+f.code.value.toUpperCase();
	}
}

function formchk2(f) {

	if (f.code.value == 'Á¾¸ñÁ¤º¸') {
		top.location.href = 'http://www.thinkpool.com/analysis/main_anal.jsp?m=m1&name=m1s1&menu=item_anal&sub=m1s1';
		return;
	}

	if (f.code.value == '') {

		alert('Á¾¸ñ or ÄÚµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä!');
		f.code.focus();
		return false;

	} else {

		parent.location.href="http://www.thinkpool.com/analysis/searchCode.jsp?code="+f.code.value.toUpperCase();
	}
}

function formchk_www(f) {

	if (f.code.value == 'Á¾¸ñÁ¤º¸') {
		top.location.href = 'http://www.thinkpool.com/analysis/main_anal.jsp?m=m1&name=m1s1&menu=item_anal&sub=m1s1';
		return;
	}

	if (f.code.value == '') {

		alert('Á¾¸ñ or ÄÚµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä!');
		f.code.focus();
		return false;

	} else {

		parent.location.href="http://www.thinkpool.com/analysis/searchCode.jsp?code="+f.code.value.toUpperCase();
	}
}

function OpenRealName(menu) {
   	window.open("http://www.thinkpool.com/customer/usermenu/real_name_input.jsp?menu="+menu,"realname",'width=335,height=230,resizable=no,scrollbars=no');
   	return;
}

function OpenWindow(url) {
   	window.open(url,"home",'width=700,height=500,resizable=yes,scrollbars=yes,top=100,left=100');
   	return;
}

function OpenDel(url) {
   	window.open(url,"del",'width=298,height=188,resizable=no,scrollbars=no,top=300,left=300');
   	return;
}

function OpenPrint(url) {
   	window.open(url,"print",'width=700,height=600,resizable=yes,toolbar=yes, menubar=yes, scrollbars=yes,top=100,left=300');
   	return;
}

function LogPop(url) {
   	window.open(url,"logpop",'width=300,height=190,resizable=no,scrollbars=no,top=300,left=300');
   	return;
}

function OpenConf(url) {
	    window.open(url,"recomm",'width=300,height=150,resizable=no,scrollbars=no,top=300,left=300');
		return;
}

function OpenChildS(s_url) {
   //window.open(s_url, "siseWin", "height=600,width=960,resizable=1,status=1,menubar=0,toolbar=1,screenX=20,screenY=10,scrollbars=1");
   window.open("http://stock.koscom.co.kr/kse_sise/kse_totalsise.html", "siseWin", "");
   return;
}

function OpenChat() {
	window.open('http://www.thinkpool.com/etc/chat/chat.jsp','chat','toolbar=no,status=no,width=800,height=600,directories=no,scrollbars=no,location=no,resizable=yes,menubar=no');
	return;
}

function OpenChatWeb() {
	window.open("http://www.thinkpool.com/chat/webchat.jsp","chatweb","toolbar=no,width=260,height=200,directories=no,status=no,scrollbars=no,resize=no,menubar=no")
	return;
}

function OpenChatWebClub(userid,type,code,name) {
	window.open('http://www.thinkpool.com/chat/webchat.jsp?type=' + type + '&code=' + code + '&name=' + Replace(name,'+','%2B'),'chat','toolbar=no,width=260,height=200,directories=no,status=no,scrollbars=no,resize=no,menubar=no')
	return;
}

function OpenChatBroad() {
	var width_ = 440;
	var height_ = 135;
	var left_ = screen.width-10;
	var top_ = screen.height-63;
	left_ = left_/2 - (width_/2);
	top_ = top_/2 - (height_/2);
	window.open('http://www.thinkpool.com/chat/anchor_chat.jsp','anchor_chat','toolbar=no,width='+width_+',height='+height_+',left='+left_+',top='+top_+',directories=no,status=no,scrollbars=no,resize=no,menubar=no')
	return;
}

function OpenChatBroadClub(userid,type,code,name) {
	var width_ = 440;
	var height_ = 135;
	var left_ = screen.width-10;
	var top_ = screen.height-63;
	left_ = left_/2 - (width_/2);
	top_ = top_/2 - (height_/2);
	window.open('http://www.thinkpool.com/chat/anchor_chat.jsp?type=' + type + '&code=' + code + '&name=' + Replace(Replace(name,'+','%2B'),'&','%26'),'anchor_chat','toolbar=no,width='+width_+',height='+height_+',left='+left_+',top='+top_+',directories=no,status=no,scrollbars=no,resize=no,menubar=no')
	return;
}

function OpenChatBroadClub2(sn,type,code,name) {
	var width_ = 440;
	var height_ = 135;
	var left_ = screen.width-10;
	var top_ = screen.height-63;
	left_ = left_/2 - (width_/2);
	top_ = top_/2 - (height_/2);
	window.open('http://www.thinkpool.com/chat/anchor_chat.jsp?roomnum=' + sn + '&type=' + type + '&code=' + code + '&name=' + Replace(Replace(name,'+','%2B'),'&','%26'),'anchor_chat','toolbar=no,width='+width_+',height='+height_+',left='+left_+',top='+top_+',directories=no,status=no,scrollbars=no,resize=no,menubar=no')
	return;
}

function OpenChatWebClub_G(userid,type,code,name) {
	window.open('http://www.thinkpool.com/chat/webchat_club.jsp?type=' + type + '&code=' + code + '&name=' + Replace(name,'+','%2B'),'chat','toolbar=no,width=260,height=200,directories=no,status=no,scrollbars=no,resize=no,menubar=no')
	return;
}

function OpenChatBroadClub_G(userid,type,code,name) {
	var width_ = 440;
	var height_ = 135;
	var left_ = screen.width-10;
	var top_ = screen.height-63;
	left_ = left_/2 - (width_/2);
	top_ = top_/2 - (height_/2);
	window.open('http://www.thinkpool.com/chat/anchor_chat_club.jsp?type=' + type + '&code=' + code + '&name=' + Replace(Replace(name,'+','%2B'),'&','%26'),'anchor_chat','toolbar=no,width='+width_+',height='+height_+',left='+left_+',top='+top_+',directories=no,status=no,scrollbars=no,resize=no,menubar=no')
	return;
}

function openPop(url){
	window.open(url,'open','width=400,height=400,resizable=no,scrollbars=no,top=100,left=100');
	return;
}

function openFuture(linkurl){
	window.open(linkurl+'&authpos='+smsAuthPosNum(),'open','width=350,height=360,resizable=no,scrollbars=no,top=100,left=100');
	return;
}

function profileView(penid, menu){
	if(menu == "ftrade"){
		window.open('/profile/ftrade_read.jsp?penid=' + penid + '&menu=' + menu,'profile','width=456,height=492,resizable=no,scrollbars=yes');
	} else if(menu == "spcenter"){
		window.open('/profile/read.jsp?penid=' + penid,'profile','width=456,height=492,resizable=no,scrollbars=yes');
	} else {
		window.open('/profile/read.jsp?penid=' + penid,'profile','width=456,height=492,resizable=no,scrollbars=yes');
	}
}

function smsPop(url) {
	    window.open(url,'sms','toolbar=no,status=no,width=300,height=219,resizable=no,scrollbars=no,top=100,left=100');
		return;
}

function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie )
		{
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}


function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );

	if (expiredays == 0)
		document.cookie = name + "=" + escape( value ) + "; path=/;"
	else
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function setCookie_today( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	todayDate.setHours(0,0,0,0);

	if (expiredays == 0)
		document.cookie = name + "=" + escape( value ) + "; path=/;"
	else
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function setCookie_yoo( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setHours( todayDate.getHours() + 5 );

	if (expiredays == 0)
		document.cookie = name + "=" + escape( value ) + "; path=/;"
	else
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function setCookie_hour( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setHours( todayDate.getHours() + 1 );

	if (expiredays == 0)
		document.cookie = name + "=" + escape( value ) + "; path=/;"
	else
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function setRecomm(url,DbName,sn) {

    if (getCookie(DbName + sn) != "R") {
    	setCookie(DbName + sn,'R',recomm_expires_date);
    	document.location.href = url;
    } else {
    	alert(recomm_msg);
    }
   	return;
}



function setOpp(add,DbName,sn) {

    if (getCookie(DbName + sn) != "R") {
		OpenPublic('/bbs/oppInput.jsp?name=' + DbName + "&number=" + sn + add,'bbs', 610, 550,'no','no')

    } else {
    	alert(recomm_msg);
    }
   	return;
}

function imageViewer(filePath)
{
	OpenPublic('http://www.thinkpool.com/bbs/imageView.html?filepath='+filePath,'bbsImage', 100, 100,'no','no');
}

function OpenPublic(url,winname,width,height,resize,scroll) {
   	window.open(url,winname,"width=" + width + ",height=" + height + ",resizable=" + resize + ",scrollbars=" + scroll + "");
   	return;
}


function OpenPopup(url,winname,top,left,width,height,resize,scroll) {
   	window.open(url,winname,"top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",resizable=" + resize + ",scrollbars=" + scroll + "");
   	return;
}


function hideA(url) {
	window.open(url,'hideA','width=298,height=188,resizable=no,scrollbars=no');
	return;
}


function banner206x45(pos) {


	document.writeln("<IFRAME WIDTH=206 HEIGHT=45 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 name=frm_banner206x45 SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Middle1 onLoad=setTimeout(\"banner206x245_replace('" + pos + "')\",120000);>");
	document.writeln("<A HREF=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Middle1>");
	document.writeln("<IMG SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Middle1></a>");
	document.writeln("</IFRAME>");

}

function banner206x45_replace(pos) {

	frm_banner206x45.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Middle1");

}

function banner220x45() {

	document.writeln("<IFRAME WIDTH=220 HEIGHT=56 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 name=frm_banner220x45 SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/logo@TopLeft onLoad=setTimeout(\"banner220x45_replace()\",120000);>");
	document.writeln("<A HREF=http://ad.thinkpool.com/RealMedia/ads/click_nx.ads/www.thinkpool.com/logo@TopLeft>");
	document.writeln("<IMG SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_nx.ads/www.thinkpool.com/logo@TopLeft></a>");
	document.writeln("</IFRAME>");

}

function banner220x45_replace() {

	frm_banner220x45.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_nx.ads/www.thinkpool.com/logo@TopLeft");

}

function banner220x45_fund() {

	document.writeln("<IFRAME WIDTH=220 HEIGHT=56 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 name=frm_banner220x45_fund SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/finance@TopLeft onLoad=setTimeout(\"banner220x45_fund_replace()\",120000);>");
	document.writeln("<A HREF=http://ad.thinkpool.com/RealMedia/ads/click_nx.ads/www.thinkpool.com/finance@TopLeft>");
	document.writeln("<IMG SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_nx.ads/www.thinkpool.com/finance@TopLeft></a>");
	document.writeln("</IFRAME>");
}

function banner220x45_fund_replace() {

	frm_banner220x45_fund.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_nx.ads/www.thinkpool.com/finance@TopLeft");

}



function banner240x200(pos) {


	document.writeln("<IFRAME WIDTH=240 HEIGHT=200 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 name=frm_banner240x200 SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Top1 onLoad=setTimeout(\"banner240x200_replace('" + pos + "')\",120000);>");
	document.writeln("<A HREF=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Top1>");
	document.writeln("<IMG SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Top1></a>");
	document.writeln("</IFRAME>");

}

function banner240x200_replace(pos) {

	frm_banner240x200.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Top1");

}




function banner468x60(pos) {

	document.writeln("<IFRAME WIDTH=468 HEIGHT=60 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 name=frm_banner468x60 SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Frame1 onLoad=setTimeout(\"banner468x60_replace('" + pos + "')\",120000);>");
	document.writeln("<A HREF=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Frame1>");
	document.writeln("<IMG SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Frame1></a>");
	document.writeln("</IFRAME>");

}

function banner468x60_replace(pos) {

	var curl = document.location.href;

	if (curl.indexOf('pdsInput.jsp') == -1)
		frm_banner468x60.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Frame1");

}


function banner170x400(pos) {

	document.writeln("<IFRAME WIDTH=170 HEIGHT=400 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 name=frm_banner170x400 SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Position3 onLoad=setTimeout(\"banner170x400_replace('" + pos + "')\",120000);>");
	document.writeln("<A HREF=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Position3>");
	document.writeln("<IMG SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Position3></a>");
	document.writeln("</IFRAME>");

}

function banner170x230(pos) {

	if(pos=="futures")
		banner = "futures";
	else
		banner = "skyscraper";

	document.writeln("<IFRAME WIDTH=170 HEIGHT=230 name=frm_banner170x230  NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC=\"http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + banner + "@Position3\" onLoad=setTimeout(\"banner170x230_replace('" + pos + "')\",120000);><!-- -->");
	document.writeln("<A HREF=\"http://ad.thinkpool.com/RealMedia/ads/click_nx.ads/www.thinkpool.com/" + banner + "@Position3\">  ");
	document.writeln("<IMG SRC=\"http://ad.thinkpool.com/RealMedia/ads/adstream_nx.ads/www.thinkpool.com/" + banner + "@Position3\"></a>");
	document.writeln("</IFRAME>");

}

function banner170x230_stockloan() {

	document.writeln("<IFRAME WIDTH=170 HEIGHT=230 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC=\"http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/stockloan@Position3\"><!-- -->");
	document.writeln("<A HREF=\"http://ad.thinkpool.com/RealMedia/ads/click_nx.ads/www.thinkpool.com/stockloan@Position3\">");
	document.writeln("<IMG SRC=\"http://ad.thinkpool.com/RealMedia/ads/adstream_nx.ads/www.thinkpool.com/stockloan@Position3\"></a>");
	document.writeln("</IFRAME>");

}


function banner170x230_replace(pos) {

	var curl = document.location.href;

	if (curl.indexOf('pdsInput.jsp') == -1)
		frm_banner170x230.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/skyscraper@Position3");

}



function banner170x400_replace(pos) {

	var curl = document.location.href;

	if (curl.indexOf('pdsInput.jsp') == -1)
		frm_banner170x400.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Position3");

}



function banner120x400(pos) {

	document.writeln("<IFRAME WIDTH=120 HEIGHT=400 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 name=frm_banner170x400 SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Right2 onLoad=setTimeout(\"banner120x400_replace('" + pos + "')\",120000);>");
	document.writeln("<A HREF=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Right2>");
	document.writeln("<IMG SRC=http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Right2></a>");
	document.writeln("</IFRAME>");

}



function banner120x400_replace(pos) {

	var curl = document.location.href;

	if (curl.indexOf('pdsInput.jsp') == -1)
		frm_banner120x400.location.replace("http://ad.thinkpool.com/RealMedia/ads/adstream_sx.ads/www.thinkpool.com/" + pos + "@Right2");

}


 function SignLogin(nexturl,pop_layer) {


	ifrm_signlogin.location.href='/login/signlogin.jsp?nexturl=' + nexturl + '&layer=' + pop_layer;

 }

 function SignLoginReg(nexturl,pop_layer) {


	ifrm_signlogin.location.href='/login/signloginreg.jsp?nexturl=' + nexturl + '&layer=' + pop_layer;

 }

 function Login() {

   var layer_str = '';
   nexturl = top.location.href

   if (nexturl.indexOf('prelog.jsp') != -1) {
   	nexturl = top.login.nexturl.value;
   }

   while (nexturl.indexOf('&') != -1) {
 	nexturl = nexturl.replace('&','%26');
   }

   try {

   	var popflag = window.name;
   	var hd;
   	var wd;
   	var istop = 'N';

   	if (popflag != '') {

   		try {

   			if (document.top_login.istop.value == 'Y')
   				istop = 'Y';

   		} catch (eee) {
   		}

   		if (istop == 'N') {

	   		try {
	   			hd = document.body.clientHeight;
	   			wd = document.body.clientWidth;
	   		} catch (ee) {
	   			document.write("<body>");
	   			hd = document.body.clientHeight;
	   			wd = document.body.clientWidth;
	   		}

	   		wd += 10;
	   		if (isIE70)
	   			hd += 79;
	   		else if (isXp)
	   			hd += 58;
	   		else
	   			hd += 29;

	   		window.resizeTo(700,650);
	   		layer_str = "&layer=2&height=" + hd + "&width=" + wd;

   		}

	}

   } catch (e) {}


   top.location.href = "http://www.thinkpool.com/login/prelog.jsp?nexturl=" + nexturl + layer_str;
 }

 function Login_log(f) {

   var layer_str = '';
   nexturl = top.location.href

   if (nexturl.indexOf('prelog.jsp') != -1) {
   	nexturl = top.login.nexturl.value;
   }

   while (nexturl.indexOf('&') != -1) {
 	nexturl = nexturl.replace('&','%26');
   }

   try {

   	var popflag = window.name;
   	var hd;
   	var wd;
   	var istop = 'N';

   	if (popflag != '') {

   		try {

   			if (document.top_login.istop.value == 'Y')
   				istop = 'Y';

   		} catch (eee) {
   		}

   		if (istop == 'N') {

	   		try {
	   			hd = document.body.clientHeight;
	   			wd = document.body.clientWidth;
	   		} catch (ee) {
	   			document.write("<body>");
	   			hd = document.body.clientHeight;
	   			wd = document.body.clientWidth;
	   		}

	   		wd += 10;
	   		if (isIE70)
	   			hd += 79;
	   		else if (isXp)
	   			hd += 58;
	   		else
	   			hd += 29;

	   		window.resizeTo(700,650);
	   		layer_str = "&layer=2&height=" + hd + "&width=" + wd;

   		}

	}

   } catch (e) {}


   top.location.href = "http://www.thinkpool.com/login/prelog.jsp?Gcode="+f+"&nexturl=" + nexturl + layer_str;
 }

 function Logout() {

   nexturl = document.location.href
   while (nexturl.indexOf('&') != -1) {
 	nexturl = nexturl.replace('&','%26');
   }
   document.location.replace("http://www.thinkpool.com/login/logout.jsp?nexturl=" + nexturl);
 }

 function Logout_log(f) {

   nexturl = document.location.href
   while (nexturl.indexOf('&') != -1) {
 	nexturl = nexturl.replace('&','%26');
   }
   document.location.replace("http://www.thinkpool.com/login/logout.jsp?Gcode="+f+"&nexturl=" + nexturl);
 }

function LoginSignReg() {

   var layer_str = '';
   nexturl = top.location.href

   if (nexturl.indexOf('prelog.jsp') != -1) {
   	nexturl = top.login.nexturl.value;
   }

   while (nexturl.indexOf('&') != -1) {
 	nexturl = nexturl.replace('&','%26');
   }

   try {

   	var popflag = window.name;
   	var hd;
   	var wd;
   	var istop = 'N';

   	if (popflag != '') {

   		try {

   			if (document.top_login.istop.value == 'Y')
   				istop = 'Y';

   		} catch (eee) {
   		}

   		if (istop == 'N') {

	   		try {
	   			hd = document.body.clientHeight;
	   			wd = document.body.clientWidth;
	   		} catch (ee) {
	   			document.write("<body>");
	   			hd = document.body.clientHeight;
	   			wd = document.body.clientWidth;
	   		}

	   		wd += 10;
	   		if (isIE70)
	   			hd += 79;
	   		else if (isXp)
	   			hd += 58;
	   		else
	   			hd += 29;

	   		window.resizeTo(700,650);
	   		layer_str = "&layer=2&height=" + hd + "&width=" + wd;

   		}

	}

   } catch (e) {}


   top.location.href = "http://www.thinkpool.com/login/prelog.jsp?pos=sign&nexturl=" + nexturl + layer_str;
 }

 function OpenReal(url) {
 	window.open(url,'home','width=650,height=550,resizable=yes,scrollbars=yes');
 	return;
 }

 function LogoutFrame() {

   nexturl = top.location.href
   while (nexturl.indexOf('&') != -1) {
 	nexturl = nexturl.replace('&','%26');
   }
   top.location.replace("http://www.thinkpool.com/login/logout.jsp?nexturl=" + nexturl);
 }

 function OpenNewsV(url) {
	window.open(url,'home','width=500,height=400,resizable=yes,scrollbars=yes');
	return;
 }

 function OpenAllItem() {

	window.open('http://www.thinkpool.com/itemanal/popall/pop_aobj.jsp','allItem','width=667,height=500,resizable=no,scrollbars=yes');
}

 function chkByte(obj,subject,bt)
{
	var tmpStr;
	var temp=0;
	var onechar;
	var tcount;
	tcount = 0;

	str = obj.value;

	tmpStr = new String(str);
	temp = tmpStr.length;

	for (k=0;k<temp;k++)
	{
		onechar = tmpStr.charAt(k);

		if (escape(onechar).length > 4) {
			tcount += 2;
		}
		else if (onechar!='\r') {
			tcount++;
		}
	}

	if(tcount>bt) {

		reserve = tcount-bt;
		alert("[" + subject + "]¶õÀº " + bt + "¹ÙÀÌÆ® ÀÌ»ó ÀÔ·ÂÇÒ¼ö ¾ø½À´Ï´Ù.");
		cut_str(obj,subject,bt);
		obj.focus();
		return;
	}
}

 function chkBytes(obj,subject,bt)
{
	var tmpStr;
	var temp=0;
	var onechar;
	var tcount;
	tcount = 0;

	str = obj.value;

	tmpStr = new String(str);
	temp = tmpStr.length;

	for (k=0;k<temp;k++)
	{
		onechar = tmpStr.charAt(k);

		if (escape(onechar).length > 4) {
			tcount += 2;
		}
		else if (onechar!='\r') {
			tcount++;
		}
	}

	if(tcount>bt)
	{

		reserve = tcount-bt;
		alert("[" + subject + "]¶õÀº " + bt + "¹ÙÀÌÆ® ÀÌ»ó ÀÔ·ÂÇÒ¼ö ¾ø½À´Ï´Ù.");
		cut_str(obj,subject,bt);
		obj.focus();
		return false;
	}
	else
	{
		return true;
	}
}



function Openportfolio(url) {
	window.open(url,'port','width=770,height=573,resizable=no,scrollbars=no,top=200,left=100');
	return;
}


function cut_str(obj,subject,bt)
{
	var tmpStr;
	var temp=0;
	var onechar;
	var tcount;
	tcount = 0;

	str = obj.value;
	tmpStr = new String(str);
	temp = tmpStr.length;

	for(k=0;k<temp;k++)
	{
		onechar = tmpStr.charAt(k);

		if(escape(onechar).length > 4) {
			tcount += 2;
		}
		else if(onechar!='\r') {
			tcount++;
		}
		if(tcount>bt) {
			tmpStr = tmpStr.substring(0,k);
			break;
		}
	}

	obj.value = tmpStr;
	chkByte(obj,subject,bt);
	return;
}


 function dateValid(src) {
	var year = 0;
	var month = 0;
	var day = 0;

	if (src.length != 8) return false;

	year = src.substring(0,4);
	month = src.substring(4,6);
	day = src.substring(6);


	var flag = false;

	if (year % 4 == 0) {
		flag = true;
		if (year % 100 == 0) {
			flag = false;
			if (year % 400 == 0) {
				flag = true;
			}
		}
	}

	var dayArray = new Array();

	dayArray[0] = 31;
	dayArray[1] = (flag) ? 29 : 28;
	dayArray[2] = 31;
	dayArray[3] = 30;
	dayArray[4] = 31;
	dayArray[5] = 30;
	dayArray[6] = 31;
	dayArray[7] = 31;
	dayArray[8] = 30;
	dayArray[9] = 31;
	dayArray[10] = 30;
	dayArray[11] = 31;

	if (month < 1 || month > 12)
		return false;

	if (day < 1 || day > dayArray[month-1])
		return false;

	return true;
 }


function Replace(str,ch1,ch2) {

	var ret = str;

	while (ret.indexOf(ch1) != -1) {
		ret = ret.replace(ch1,ch2);
	}

	return ret;
}

function wireless(){
	window.open('/etc/wireless/wireless.jsp','wireless','width=800,height=680,resizable=no,scrollbars=no,top=100,left=100');
	return;
}


// ¼±¹° Áø°Ë½ÂºÎ °ü·Ã ½ÃÀÛ
function OpenMatchUp(penid, nick, menu) {
	OpenPublic('http://fw.thinkpool.com/futures/index.asp?analID='+penid+'&analNick='+nick+'&menu='+menu,penid,'797','600','no','yes');
	return;

}

function open_future_settle_mem(penid)
{
	var url = "/future/settle/settle_mem.jsp?penid=" + penid;
	window.open( url, "settle_mem", "width=326,height=390,scrollbars=no,resizable=no");
}

function OpenFutureTool(penid) {
	//alert("Àá½Ã ½Ã¼¼¿À·ù·Î ºÒÆíÀ» µå·Á ÁË¼ÛÇÕ´Ï´Ù..Á¶±Ý ÈÄ¿¡ »ç¿ëÇÏ½Ê½Ã¿À.");
	var url = "/future/match_up/chkTool.jsp?penid=" + penid;
	document.future_frame.location.replace(url);

}
// ¼±¹°Áø°Ë½ÂºÎ °ü·Ã ³¡

// ¾ÆÄ«µ¥¹Ì °áÁ¦ ½ÃÀÛ

//±èµ¿Á¶¼ÒÀå°áÁ¦
function open_academy_power_public()
{
	var url = "/discuss/academy/power/billing.jsp?academy=power_public";
	window.open( url, "billing", "width=700,height=565,scrollbars=no,resizable=no");
}

//»õ°­ÀÚ°áÁ¦
function open_academy_center_public()
{
	var url = "/discuss/academy/power/billing.jsp?academy=center_public";
	window.open( url, "billing", "width=700,height=565,scrollbars=no,resizable=no");
}

function open_academy_power()
{
	var url = "/discuss/academy/power/billing.jsp";
	window.open( url, "power", "width=700,height=565,scrollbars=no,resizable=no");
}

function open_academy_mukeuk()
{
	var url = "/discuss/academy/course/course_billing.jsp?gubun=mukeuk";
	window.open( url, "mukeuk", "width=700,height=565,scrollbars=no,resizable=no");
}

function open_academy_elliott()
{
	var url = "/discuss/academy/elliott/billing.jsp";
	window.open( url, "elliott", "width=700,height=565,scrollbars=no,resizable=no");
}

function OpenTakeXfile(cpcode,lecture) {
	document.location.replace('/discuss/academy/take/take_xfile.jsp?cpcode=' + cpcode + '&lecture=' + lecture,'takecplecture');
	return;
}

// ¾ÆÄ«µ¥¹Ì °áÁ¦ ³¡

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function OpenAcademyTip() {
   	window.open("/discuss/academy/study_tip/study_tip.jsp","study_tip",'width=682,height=693,resizable=no,scrollbars=yes');
   	return;
}

function OpenPreview(gb_code,sn) {
   	/*
   	alert("³»ºÎ»çÁ¤À¸·Î ´çºÐ°£ ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
   	*/
   	window.open("/discuss/academy/player/preview.jsp?gb_code=" + gb_code + "&sn=" + sn,"lecture_room",'width=964,height=693,resizable=no,scrollbars=no');
   	return;

}
function OpenPreviewDW(gb_code,sn) {
   	window.open("/discuss/academy/gmdw/player/preview.jsp?gb_code=" + gb_code + "&sn=" + sn,"lecture_room",'width=964,height=693,resizable=no,scrollbars=no');
   	return;
}
function OpenViewDayLecture(userid,title,filename) {
	window.open('http://www.nanoomtrade.com/cyber/think_vod.asp?userid=' +userid+ '&title=' +title+ '&filename='+filename,'academy','width=667, height=625, scrollbars=no, resizable=no');
}

function OpenLectureRoom(gb_code,sn,mseq,seq) {
   	/*
   	alert("³»ºÎ»çÁ¤À¸·Î ´çºÐ°£ ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
   	*/
   	window.open("/discuss/academy/player/lecture_room.jsp?gb_code=" + gb_code + "&sn=" + sn + "&mseq=" + mseq + "&seq=" + seq,"lecture_room",'width=964,height=693,resizable=no,scrollbars=no');
   	return;

}

function OpenLectureRoomDW(gb_code,sn,mseq,seq) {
   	window.open("/discuss/academy/gmdw/player/lecture_room.jsp?gb_code=" + gb_code + "&sn=" + sn + "&mseq=" + mseq + "&seq=" + seq,"lecture_room",'width=964,height=693,resizable=no,scrollbars=no');
   	return;
}

function OpenMedicalLectureRoom(gb_code,sn,mseq,seq) {
   	window.open("/medical/clinic_program/research/lecture_room.jsp?gb_code=" + gb_code + "&sn=" + sn + "&mseq=" + mseq + "&seq=" + seq,"lecture_room",'width=964,height=693,resizable=no,scrollbars=no');
   	return;
}


function OpenDizzoLectureRoom(gb_code,sn,mseq,seq) {
   	window.open("/concert/dizzo/academy/player/lecture_room.jsp?gb_code=" + gb_code + "&sn=" + sn + "&mseq=" + mseq + "&seq=" + seq,"lecture_room",'width=964,height=693,resizable=no,scrollbars=no');
   	return;
}

function OpenMpplusLectureRoom(gb_code,sn,mseq,seq) {
   	window.open("/mpplus/academy/lecture_room.jsp?gb_code=" + gb_code + "&sn=" + sn + "&mseq=" + mseq + "&seq=" + seq,"lecture_room",'width=964,height=693,resizable=no,scrollbars=no');
   	return;
}

function OpenTakeRoom(gb_code,sn,mseq,seq) {
   	window.open("/discuss/academy/take/selectpay.jsp?gb_code=" + gb_code + "&sn=" + sn + "&mseq=" + mseq + "&seq=" + seq,"selectpay",'width=350,height=195,resizable=no,scrollbars=no');
   	return;
}

function OpenQna(lecturer) {
	window.open('/discuss/academy/lectureQna/pdsView.jsp?lid=' + lecturer,'lectureQna','width=665,height=600,resizable=no,scrollbars=yes,top=100,left=100');
	return;
}

function OpenDizzoQna(lecturer) {
	window.open('/concert/dizzo/academy/lectureQna/pdsView.jsp?lid=' + lecturer,'lectureQna','width=665,height=600,resizable=no,scrollbars=yes,top=100,left=100');
	return;
}

function OpenTakeLecture(ref,gb_code,sn,mseq,seq) {
	window.open('/discuss/academy/take/takelecture.jsp?ref=' + ref + '&gb_code=' + gb_code + '&sn=' + sn + '&mseq=' + mseq + '&seq=' + seq,'takelecture','width=350,height=255,resizable=no,scrollbars=no');
	return;
}

function OpenTakeCpLecture(cpcode,lecture) {
	window.open('/discuss/academy/take/takecplecture.jsp?cpcode=' + cpcode + '&lecture=' + lecture,'takecplecture','width=350,height=255,resizable=no,scrollbars=no');
	return;
}


function changeChart(gb,code) {

	if (gb == "1day") {
		eval("chart_img_" + code + ".src = 'http://webchart.thinkpool.com/stock1day/A" + code + ".gif'");
		eval("btn_1day_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_1_1.gif'");
		eval("btn_week_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_2.gif'");
		eval("btn_5min_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_3.gif'");
	} else if (gb == "week") {
		eval("chart_img_" + code + ".src = 'http://webchart.thinkpool.com/stockweek/A" + code + ".gif'");
		eval("btn_1day_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_1.gif'");
		eval("btn_week_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_2_1.gif'");
		eval("btn_5min_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_3.gif'");
	} else {
		eval("chart_img_" + code + ".src = 'http://webchart.thinkpool.com/stock5min/A" + code + ".gif'");
		eval("btn_1day_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_1.gif'");
		eval("btn_week_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_2.gif'");
		eval("btn_5min_" + code + ".src = 'http://img.thinkpool.com/itemanal/sub_chart_tab_3_1.gif'");
	}

}


function Tech_anal(code,market) {
	window.open("http://stock.koscom.co.kr/common_sise/hyun_chartX.jsp?code=A" + code + "&market=" + market,"Chart","width=700,height=550,resizable=no,scrollbars=no");
}

function open_edusite_mem(penid)
{
	var url = "/discuss/academy/edusite/edu_mem.jsp?penid=" + penid;
	window.open( url, "edusite_mem", "width=350,height=270,scrollbars=no,resizable=no");
}

// ½ÇÀü¸Å¸Å ½ÅÃ»
function open_atrade_proposal(code)
{
	//alert("ÇöÀç »ç¿ëÀÚ°¡ ¸¹¾Æ ¼­ºñ½º ½ÅÃ»À» ÇÒ ¼ö ¾ø½À´Ï´Ù.\n\nºü¸¥ ½Ã°£ ³»¿¡ Á¶Ä¡¸¦ ÃëÇÏ°Ú½À´Ï´Ù.\n\nÀÌ¿ë¿¡ ºÒÆíÀ» µå·Á ´ë´ÜÈ÷ ÁË¼ÛÇÕ´Ï´Ù.");
	var url = "/atrade/pop/proposal.jsp?pcode=" + code;
	window.open(url, "atrade_proposal", "width=350,height=270,scrollbars=no,resizable=no");
}

// ¸Þ½ÅÁ® ¼³Ä¡
function OpenMesg(f) {
	window.open('http://www.thinkpool.com/etc/thinke/thinke.jsp?Gcode='+f,'thinkm','width=618, height=500, toolbar=no, scrollbars=yes, resizable=no');
}

function OpenMsg() {
	window.open('http://www.thinkpool.com/etc/thinke/default.htm','thinke','width=250, height=100, toolbar=no, scrollbars=no, resizable=no');
}

//Áõ±Ç¿ë¾î»çÀü
function Opendic(url) {
	window.open(url,'dic','width=600,height=480,resizable=no,scrollbars=no,top=200,left=100');
	return;
}

//¾Ç¼ºÄÚµå
function OpenCleani() {
	window.open('http://www.thinkpool.com/etc/cleani','cleani','width=830,height=800,resizable=no,scrollbars=yes,top=200,left=100');
	return;
}

//½Å°íÇÔ
function OpenPolice() {
	window.open('/customer/tp_police.jsp','thinke','width=430, height=440, toolbar=no, scrollbars=no, resizable=no')
}

function bbsDel(p) {

   	if (confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {

   		document.location.href = "pdsDel.jsp?"+p;

   	}

}

function isEmail(email) {

	for (i=0; i<email.length; i++) {
		if (email.charCodeAt(i)>127)
			return "ÇÑ±ÛÀ» »ç¿ëÇÒ¼ö ¾ø½À´Ï´Ù.";
	}


	if (email.indexOf("@") < 3)
		return "ÀÌ¸ÞÀÏ Çü½ÄÀÌ Àß¸ø µÇ¾ú°Å³ª @°¡ ºüÁ³½À´Ï´Ù.";


	if ((email.indexOf(".com")<5)&&(email.indexOf(".org")<5)
		&&(email.indexOf(".gov")<5)&&(email.indexOf(".net")<5)
		&&(email.indexOf(".mil")<5)&&(email.indexOf(".edu")<5)
		&&(email.indexOf(".kr")<4)&&(email.indexOf(".st")<4)
		&&(email.indexOf(".tv")<4)&&(email.indexOf(".ro")<4)
		&&(email.indexOf(".arpa")<6)&&(email.indexOf(".biz")<5)
		&&(email.indexOf(".aero")<6)&&(email.indexOf(".name")<6)
		&&(email.indexOf(".coop")<6)&&(email.indexOf(".info")<6)
		&&(email.indexOf(".pro")<5)&&(email.indexOf(".museum")<7)
		)
	{
	return "ÀÌ¸ÞÀÏ Çü½ÄÀÇ ÃÖ»óÀ§ µµ¸ÞÀÎÇü½ÄÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.";
	}
	return "";
}


//Á¾¸ñ¸íÄÚµå°Ë»ö
function signalFocus(obj) {
	if (obj.value == 'Á¾¸ñ¸í/ÄÚµå') {
		obj.value = "";
	}
}
function signalBlur(obj) {
	if (obj.value == '') {
		obj.value = "Á¾¸ñ¸í/ÄÚµå";
	}
}

function favor(furl,subj) {
window.external.AddFavorite(furl,subj);
}

function OpenAllMiniHome() {

	OpenPublic('/mini/pop/all_list.jsp','all_list',644,392,'no','yes');

}

function open_mcall_settle_mem(f) {

	var url = "/consultant/mcall/m_settle_mem.jsp?term=" + f;
	window.open( url, "m_settle_mem", "width=350,height=295,scrollbars=no,resizable=no");

}

function OpenRepay() {
	window.open('/spcenter/mship/repay.htm','repay','width=550, height=495, scrollbars=no, resizable=no');
}

function mysetSRegist(penid){
	OpenPublic('/myset/pop/myset_form.jsp?penid='+penid+'&authpos='+smsAuthPosNum(),'myset','336','284','no','no');
	return;
}

function mysetCRegist(code){
		OpenPublic('/myset/pop/item_form.jsp?code='+code+'&authpos='+smsAuthPosNum(),'myset','336','284','no','no');
	return;
}

function mysetSaleRegist(valueKey){
		OpenPublic('/myset/pop/myset_sale_form.jsp?valueKey=' + valueKey,'myset1','336','284','no','no');
	return;
}

function click_onair(ars_num) {
	OpenPopup('/spcenter/livecall/pop_join.jsp?ars_num='+ars_num,'info','450','500','304','160','no','no');
}

//ºÒ·®±Û ½Å°í
function open_BadBbs(linkStr, Numb)
{
	var url = "/badbbs/badbbs_input.jsp?" + linkStr +"&number=" + Numb;
	window.open( url, "BADBBS_REPORT", "width=400,height=460,scrollbars=no,resizable=yes");
}

//ºÒ·®±Û ½Å°í
function Open_BadMail(email)
{
	var url = "/admin/badbbs_report/mailInput.jsp?email=" + email;
	window.open( url, "BADBBS_Mail", "width=320,height=255,scrollbars=no,resizable=yes");
}

//ÆÝµå ½Å°í
function open_FundBadBbs()
{
	var url = "/finance/badbbs/badbbs_input.jsp";
	window.open( url, "BADBBS_REPORT", "width=400,height=300,scrollbars=no,resizable=yes");
}


function ftradeView(penid,lg_gb,sn){
	OpenPublic('/future/ftrade/lg_trade_view.jsp?penid='+penid +'&ft_lg='+lg_gb+'&ft_sn='+sn,'ftradeView','642','400','yes','no');
	return;
}


function analTtradeView(penid,lg_gb,sn){
	OpenPublic('/future/ftrade/tool/chkConn.jsp?penid='+penid +'&lg_gb='+lg_gb+'&lg_sn='+sn,'analTtradeView','609','632','no','no');
	return;
}

function analTtradeViewR(){
	OpenPublic('/future/ftrade/tool/chkConnR.jsp','analTtradeView','609','632','no','no');
	return;
}

function open_ftrade_settle_mem(lg_gb, penid, lg_sn)
{
	var url = "/future/ftrade/settle/ftrade_settle_pre.jsp?lg_gb=" + lg_gb + "&penid=" + penid + "&lg_sn=" + lg_sn;
	window.open( url, "ftrade_bill", "width=350,height=270,scrollbars=no,resizable=no");
}

// ÅõÀÚÀü·« ÀÇ°ß Àü¹®°¡º¸±â
function sp_view(f) {
	window.open("/bbs/common/outlook_detail.jsp?choice="+f,"outlook","width=346,height=367,resizable=no,scrollbars=yes");
}

function writeHtml(str) {

document.writeln(str);

}

function fnfMiniHome(fnfid,spop_menu) {

	window.open('/finance/fnf/sdiary/spop_home.jsp?fnfid=' + fnfid+'&spop_menu='+spop_menu,'','width=500,height=700,resizable=no,scrollbars=no,status=yes');
}

function fnf_vod_player(sn){
	href = '/finance/fnf/fnf_picture/vod_player.jsp?number='+sn;
	option = 'toolbar=no,scrollbars=no,resizable=no,width=555,height=437,left=0,top=0';
	win_name = 'vod_player'

	window.open( href, win_name, option );
}

function exec_mirae_realtrade() {

		window.open('http://securities.miraeasset.co.kr/coop/think/down.jsp','','width=830,height=760');

}

function gcoin_question_event() {

	window.open('/CM/gcoin/gcoin_q_join.jsp','gcoin_question','width=360,height=310');

}

function gcoinlayer(layername,gb){

	if(gb=="C"){
		setCookie(layername+'_maindiv', 'done', 1);
		document.all[layername].style.visibility = "hidden";
	}else{
		if(layername != "popuplayer_j"){
			gcoin_question_event();
			document.getElementById(layername).style.display="none";

		}else{
			window.open('http://www.thinkpool.com/CM/gcoin/index.jsp','','');
		}
	}
}

function OpenKosWeb(code) {
	var KosWeb = window.open('http://www.thinkpool.com/concert/thinkpool/realtime/pay_check.jsp?code='+code,'kosweb_pop','toolbar=0,menubar=0,scrollbars=no,resizable=yes,width=680,height=730');
	KosWeb.focus();
}

function OpenKosWeb_log(code,gcode) {
	var KosWeb = window.open('http://www.thinkpool.com/concert/thinkpool/realtime/pay_check.jsp?Gcode='+gcode+'&code='+code,'kosweb_pop','toolbar=0,menubar=0,scrollbars=no,resizable=yes,width=680,height=730');
	KosWeb.focus();
}

//KTF¸Å¸Å½ÅÈ£ ¾Ë¸®¹Ì
function KtfPhone(){
    var _left = parseInt((document.body.clientWidth/2)-(350/2));
    var _top = parseInt((document.body.clientHeight/2)-(440/2));
    var _options = "'resizable=no,width=350,height=440,scrollbars=no,top="+_top+",left="+_left+"'";
    window.open('/itemanal/ktf/popup.jsp','ktf',_options);
}


function comm_replyView(sn) {
	window.open("/mypage/comm/replyRead.jsp?number=" + sn,"commReplytagview","");
}

function comm_tagViewPop(sn) {
	window.open('/mypage/comm/pop/tagViewPop.jsp?number='+sn,'commTagViewPop','toolbar=0,menubar=0,scrollbars=no,resizable=yes,width=400,height=500');
	parent.location.reload();
}

function comm_replyContl() {
	window.open('/mypage/comm/pop/tagViewPop.jsp?number='+sn,'commTagViewPop','toolbar=0,menubar=0,scrollbars=no,resizable=yes,width=400,height=500');
}

function comm_TagSend(receiveid) {
	window.open('/mypage/comm/pop/tagInput.jsp?receiveid='+receiveid,'commTagSend','toolbar=0,menubar=0,scrollbars=no,resizable=yes,width=400,height=430');
}

function comm_frdAdd(friendid) {
	window.open('/mypage/comm/pop/frdAdd.jsp?friendid=' + friendid,'commFrdAdd','scrollbars=no,titlebar=no,status=no,resize=no,width=400,height=270');
}

function comm_grpReName(grpsn) {
	window.open('/mypage/comm/pop/grpReName.jsp?grpsn=' + grpsn,'grpReName','scrollbars=no,titlebar=no,status=no,resize=no,width=400,height=230');
}

function comm_grpDelete(grpsn) {
	window.open('/mypage/comm/pop/grpDelete.jsp?grpsn=' + grpsn,'grpDelete','scrollbars=no,titlebar=no,status=no,resize=no,width=400,height=310');
}

function comm_frdDelete(friendid,nick){
	if(confirm(nick+"´ÔÀ» Ä£±¸¸ñ·Ï¿¡¼­ »èÁ¦ÇÕ´Ï´Ù")){
		window.open('/mypage/comm/pop/frdDelete_insert.jsp?friendid=' + friendid,'frdDelete','scrollbars=no,titlebar=no,status=no,resize=no,width=400,height=200');
	}
}

function comm_grpChange(friendid) {
	window.open('/mypage/comm/pop/grpChange.jsp?friendid=' + friendid,'grpDelete','scrollbars=no,titlebar=no,status=no,resize=no,width=400,height=250')
}

function comm_profileView(friendid) {
	window.open('/mypage/comm/pop/profileView.jsp?friendid=' + friendid,'commProfileView','scrollbars=no,titlebar=no,status=no,resize=no,width=400,height=523')
}

function discuss_conotice() {
	alert("¾ÅÅ©Ç®¿¡¼­ °Ô½Ã¹°À» »èÁ¦ÇÏ½Ã´Â °æ¿ì °øÀ¯ Á¦ÈÞ»ç¿¡¼­µµ °Ô½Ã¹°ÀÌ »èÁ¦ µË´Ï´Ù.\n´Ü, ÇØ´ç °Ô½Ã¹°¿¡ ´ñ±ÛÀÌ ´Þ·ÁÀÖ´Â °æ¿ì ´ñ±Û¿¡ ´ëÇÑ ¿øº»±Û º¸È£¸¦ À§ÇØ °øÀ¯ Á¦ÈÞ»ç¿¡¼­´Â »èÁ¦°¡ ÀÌ·ç¾îÁöÁö ¾Ê½À´Ï´Ù.\n»èÁ¦°¡ ÇÊ¿äÇÏ½Å °æ¿ì ÀüÈ­ ¶Ç´Â ÀÌ¸ÞÀÏ·Î ¿äÃ»À» ºÎÅ¹µå¸³´Ï´Ù.\n\n(¹®ÀÇ 02-2174-6300 ¾ÅÅ©Áö±â, thinkjigi@thinkpool.com)");
}

function realnews(f) {
	window.open('http://www.thinkpool.com/nnews/realtime/index.jsp?Gcode='+f,'realnews','resizable=yes,scrollbars=no');
	return;
}

function open_app_vcard() {
	window.open("http://www.thinkpool.com/etc/v_card/app_tel.jsp", "vcard", "width=623,height=371,scrollbars=no,resizable=no");
	return;
}

function TableChange12(objSub) {

	if (sub_11.style.display == "block" && objSub != sub_11) {
		sub_11.style.display = "none";
	}

	if (sub_12.style.display == "block" && objSub != sub_12) {
		sub_12.style.display = "none";
	}

	if(objSub.style.display == "none") {
		objSub.style.display = "block";
	} else {
		objSub.style.display = "none";
	}
}

function TableChange12(objSub) {

	if(objSub == "sub_11") {
		document.getElementById('sub_11').style.display = 'block';
		document.getElementById('sub_12').style.display = 'none';
	} else if(objSub == "sub_12") {
		document.getElementById('sub_11').style.display = 'none';
		document.getElementById('sub_12').style.display = 'block';
	} else if(objSub == "sub_21") {
		document.getElementById('sub_21').style.display = 'block';
		document.getElementById('sub_22').style.display = 'none';
	} else if(objSub == "sub_22") {
		document.getElementById('sub_21').style.display = 'none';
		document.getElementById('sub_22').style.display = 'block';
	}

}

function OpenPclubAcc(p_name,gb) {
	window.open('/pclub/settle/pclub_settle_mem.jsp?p_name='+p_name+'&gb='+gb, 'pclub', 'width=320, height=355, scrollbars=no, resizable=no');
}

function OpenPclubAccEvent(p_name, pos) {
	window.open('/pclub/settle/pclub_ev_settle_mem.jsp?p_name='+p_name + '&pos=' + pos, 'pclubev', 'width=320, height=355, scrollbars=no, resizable=no');
}

function OpenPclubEvent() {
	window.open('/pclub/settle/pclub_event_settle_mem.jsp', 'pclubev2', 'width=350,height=355, scrollbars=no, resizable=no');
}

function OpenPclubSms(p_name) {
	window.open('/pclub/smssend/sms_send.jsp?p_name='+p_name, 'pclub', 'width=640, height=460, scrollbars=no, resizable=no');
}

function OpenPclubTrade(p_name) {

	if(p_name == 'trsk')
		window.open('/pclub/trade/trade_list_trsk.jsp?p_name='+p_name, 'pclub_Trade', 'width=720, height=600, scrollbars=yes, resizable=no');
	else
   		window.open('/pclub/trade/trade_list.jsp?p_name='+p_name, 'pclub_Trade', 'width=720, height=600, scrollbars=yes, resizable=no');
}

function OpenPclubFTrade(p_name) {

	window.open('/pclub/trade/ftrade_list_trsk.jsp?p_name='+p_name, 'pclub_FTrade', 'width=720, height=600, scrollbars=yes, resizable=no');
}

function OpenVar(windowName,width,height) {
    newWindow = window.open(windowName, 'OpenVarWin','toolbar=no,menubar=no,width='+width+',height='+height+',scrollbars=yes,resizable=yes');
    newWindow.window.focus();
}


function resizeImage(obj, thumbWidth, thumbHeight)
{
	var Size = GetImageSize(obj);
	var thumbRatio = thumbWidth / thumbHeight;
	var imageWidth = Size.Width;
	var imageHeight = Size.Height;
	var imageRatio = imageWidth / imageHeight;

	if(thumbRatio < imageRatio)
	{
		thumbHeight = parseInt(thumbWidth / imageRatio);
		if(thumbHeight > imageHeight)//¿øº» ÀÌ¹ÌÁö°¡ ½æ³×ÀÏ »çÀÌÁîº¸´Ù ÀÛÀ»°æ¿ì ¿øº» Å©±â¸¦ Àû¿ë
		{
			thumbWidth = imageWidth;
			thumbHeight = imageHeight;
		}
	}
	else
	{
		thumbWidth = parseInt(thumbHeight * imageRatio);
		if(thumbWidth > imageWidth)//¿øº» ÀÌ¹ÌÁö°¡ ½æ³×ÀÏ »çÀÌÁîº¸´Ù ÀÛÀ»°æ¿ì ¿øº» Å©±â¸¦ Àû¿ë
		{
			thumbWidth = imageWidth;
			thumbHeight = imageHeight;
		}
	}

	obj.style.width =  (thumbWidth+'px');
	obj.style.height =  (thumbHeight+'px');
}


function GetImageSize(obj)
{
	with(tempImage = document.body.appendChild(document.createElement('img')))
	{
		src = obj.src;
		var Width = offsetWidth;
		var Height = offsetHeight;
	}

	document.body.removeChild(tempImage);

	return { Width : Width, Height : Height };
}

function Open_FundDic(f) {
	window.open('/finance/fund/pop_dic.jsp?dcode=' + f,'funddic','width=370,height=570,resizable=yes,scrollbars=yes,top=100,left=100');
	return;
}

function admCourseAcc(penid,jockey) {
	window.open('/etc/course/course_input.jsp?penid='+penid+'&jockey='+jockey,'admCourseAcc','width=360,height=405,resizable=no,scrollbars=auto,top=100,left=100');
	return;
}

function varoTrade(f) {
	window.open('/concert/koscom/varo/varo_trade.html?Gcode='+f,'varoTrade','width=653,height=796,resizable=no,scrollbars=auto,top=100,left=100');
	return;
}

function varoTradeMeritz() {
	window.open('/concert/koscom/varo/varo_event.html','varoTrade','width=653,height=796,resizable=no,scrollbars=auto,top=100,left=100');
	return;
}

function smsAuthPosNum() {
	var dt = new Date();
	var num = ""+parseInt(Math.random()*88+10) + parseInt(Math.random()*88+10) + parseInt(Math.random()*88+10);
	var ctime = ""+(dt.getMinutes()+10);
	return ctime+num
}


function checkSMSAuth(nexturl,source) {
	window.open('/myset/pop/smsauth_pass.jsp?authpos='+smsAuthPosNum()+"&nexturl="+nexturl+"&source="+source,'smsauth','toolbar=no,width=336,height=478,directories=no,status=no,scrollbars=no,resize=no');
	return;
}

function swf(src, w, h)
{
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="swliveconnect" value="true">';
	html += '<param name="allowScriptAccess" value="always" >';
	html += '<param name="wmode" value="transparent">';
	html += '<embed src="'+src+'" quality=high bgcolor="#FFFFFF" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" wmode="transparent" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

function admCourseAccContract(penid, jockey)
{
	window.open('/etc/course/contract.jsp?penid='+penid+'&jockey='+jockey,'admCourseAccContract','width=640,height=600,resizable=no,scrollbars=no,top=100,left=100');
}

function admCourseMovie(fileName)
{
	window.open('/etc/course/WMPlayer.jsp?filename='+fileName,'admCourseAccContract','width=622,height=490,resizable=no,scrollbars=no,top=100,left=100');
}
function pageView(args)
{
	n_click_logging('/common/pageview.jsp?Gcode=' + args);
}

function loanServiceGo()
{
	window.open("/stockloan/service/");
	window.close();
}

function pop_juso() {
	window.open('/CM/juso_modify/pop_juso.jsp','pop_juso','toolbar=no,width=360,height=210,directories=no,status=no,scrollbars=no,resize=no');
	return;
}

function pop_refund() {
	window.open('/CM/juso_modify/pop_refund.jsp','pop_refund','toolbar=no,width=360,height=210,directories=no,status=no,scrollbars=no,resize=no');
	return;
}

