//======================================================
// ºê¶ó¿ìÁ® ¹öÀüÈ®ÀÎ
//======================================================

// Á¦·ÎÀÎ ±âº» ÇÃ·¡½¬
function zeroin_top_default(){
	document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'  codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'  WIDTH='505' HEIGHT='60' id='funddoctor_main' ALIGN=''>  ");
	document.write("<PARAM NAME=movie VALUE='http://img.funddoctor.co.kr/images/banner/zeroin/funddoctor_main.swf'>   ");
	document.write("<PARAM NAME=quality VALUE=high>   ");
	document.write("<PARAM NAME=bgcolor VALUE=#FFFFFF>   ");
	document.write("<EMBED src='http://img.funddoctor.co.kr/images/banner/zeroin/funddoctor_main.swf' quality=high bgcolor=#FFFFFF  WIDTH='505' HEIGHT='60' NAME='funddoctor_main' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='https://www.macromedia.com/go/getflashplayer'></EMBED>  ");
	document.write("</OBJECT>  ");
}

function help_dictionnary()
{
	x = screen.width;
	y = screen.height;
	 s_width = 445;
	 s_height = 515;

	 wid = (x / 2) - (s_width / 2);
	 hei = (y / 2) - (s_height / 2);

	window.open("/fund/dictionary/dictionary.jsp","dictionary", "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,width=" + s_width + ",height=" + s_height  + ",top=" + hei + ",left=" + wid + ",scrollbars=no");
}



var NS4 = (document.layers) ? 1 : 0;
var IE4 = (document.all) ? 1 : 0;
var ver4 = (document.layers || document.all) ? 1 : 0;
var timerSubMenu;

function show_msg(msg)
{
		alert(msg) ;
		history.go(-1);
}

function openWindow(pUrl, pWidth , pHeight)
{
	var par;
	par="toolbar=no,directories=no,status=yes,scrollbars=yes,resizable=no,menubar=no,location=no,width=" + pWidth+ ",height="+ pHeight;
   open_window = window.open(pUrl,'open_window',par);
}

function openWindow_pdf(pUrl, pWidth , pHeight)
{
	var par;
	par="toolbar=no,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no,location=no,width=" + pWidth+ ",height="+ pHeight;
   	open_window = window.open(pUrl,'open_window',par);
}


function openWindow_html(pUrl, pWidth , pHeight)
{
	var par;
	par="toolbar=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,width=" + pWidth+ ",height="+ pHeight;
   	open_window = window.open(pUrl,'open_window',par);
}

function new_win(filename,p_name,s_width,s_height,s_scrol)
{
	x = screen.width;
	y = screen.height;
	wid = (x / 2) - (s_width / 2);
	hei = (y / 2) - (s_height / 2);

   window.open(filename, p_name, "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=" + s_scrol + ",width=" + s_width + ",height=" + s_height + ",top=" + hei + ",left=" + wid + ",scrolbar=no");
}

function onlynum(objtext1){
	var inText = objtext1.value;
	var ret;

	for (var i = 0; i < inText.length; i++) {
	    ret = inText.charCodeAt(i);
		if (!((ret > 47) && (ret < 58)))  {
			alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
			objtext1.value = "";
			objtext1.focus();
			return false;
		}
	}
	return true;
}


function MoveFocus() {  document.form2.txtmemid.focus(); }


//±Û ÀÐ±â ÆäÀÌÁö, ÆùÆ® »çÀÌÁî ¼öÁ¤

/*
function scaleFont(val) {
var content, lineHeight; content = document.getElementById("content"); if (val > 0) { if (fontSize <= 18) { fontSize = fontSize + val; lineHeight = fontSize+Math.round(1.1*fontSize); content.style.fontSize = fontSize + "px"; } } else { if (fontSize > 12) { fontSize = fontSize + val; lineHeight = fontSize+Math.round(1.1*fontSize); content.style.fontSize = fontSize + "px"; } } var mydate = new Date; mydate.setDate(mydate.getDate()+1000); setCookie("font_size", fontSize, mydate); }
var fontSize = parseInt(getFontCookie());

function getFontCookie() { var cookie = getCookie("font_size"); if ( cookie == null ) return 16; if ( cookie.length ) return cookie; else return 16; }
function scaleFont(val) {
var content, lineHeight; content = document.getElementById("content"); if (val > 0) { if (fontSize <= 18) { fontSize = fontSize + val; lineHeight = fontSize+Math.round(1.1*fontSize); content.style.fontSize = fontSize + "px"; } } else { if (fontSize > 12) { fontSize = fontSize + val; lineHeight = fontSize+Math.round(1.1*fontSize); content.style.fontSize = fontSize + "px"; } } var mydate = new Date; mydate.setDate(mydate.getDate()+1000); setCookie("font_size", fontSize, mydate); }
var fontSize = parseInt(getFontCookie());
*/

//±Û ÀÐ±â ÆäÀÌÁö, ÆùÆ® »çÀÌÁî ¼öÁ¤
function scaleFont(val) {

	var fontSize = parseInt(getFontCookie());

	var content, lineHeight;
	content = document.getElementById("content");

	if (val > 0)
	{
		if (fontSize <= 18)
		{
			fontSize = fontSize + val;
			lineHeight = fontSize+Math.round(1.1*fontSize);
			content.style.fontSize = fontSize + "px";
		}
	}
	else
	{
		if (fontSize > 12)
		{
			fontSize = fontSize + val;
			lineHeight = fontSize+Math.round(1.1*fontSize);
			content.style.fontSize = fontSize + "px";
		}
	}

	var mydate = new Date;
	mydate.setDate(mydate.getDate()+1000);
	setFCookie("font_size", fontSize, mydate);

}

function getFontCookie()
{
	var cookie = getFCookie("font_size");
	if ( cookie == null ) return 16;
	if ( cookie.length ) return cookie;
	else return 16;
}


//¸¶ÀÌÆÝµå ´Þ·Â È£Ãâ - yy, mm, dd
function myfund_cal(form_nm,tag1,tag2,tag3,inputname1,inputname2,inputname3,formname,tag4)
{
	x = screen.width;
	y = screen.height;

	s_width =  195;
	s_height = 195;

	wid = (x / 2) - (s_width / 2);
	hei = (y / 2) - (s_height / 2);

	window.open("/common/calendar_zeroin.jsp?day_year=" + tag1 + "&day_month=" + tag2 + "&day_date=" + tag3+"&input_name1=" + inputname1 +"&input_name2=" + inputname2 +"&input_name3=" + inputname3 +"&form_name=" + formname+"&fund_flag=" + tag4 , "myfund_cal", "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,width=" + s_width + ",height=" + s_height  + ",top=" + hei + ",left=" + wid + ",scrolbar=no");
}


// shary - 070425 -----------------------------------------------------------------------------------------------
// Display
function MM_reloadPage(init) {
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_preloadImages() {
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.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 MM_swapImgRestore() {
	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 MM_findObj(n, d) {
	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=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//----------------------------------------------------------------------------------------------------------------


function DICTION_WIN()
{
	diction_window = window.open("/fund/dictionary/dictionary.jsp",'dictionary','toolbar=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,width=445,height=515');

}


// ¸ÞÀÎÈ­¸é ÅëÇÕ °Ë»ö
function fund_validate_main(form) {
	// ÆÝµå¸í °Ë»ö
	if (form.fund_nm.value=="") {
		alert("\n°Ë»ö´Ü¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä      ");
		form.fund_nm.focus();
		return false;
	}

	if (form.fund_nm.value=="%") {
		alert("\n°Ë»ö¿¡ ÀûÇÕÇÑ ´Ü¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä    ");
		form.fund_nm.value='';
		form.fund_nm.focus();
		return false;
	}

}

// ÇØ¿ÜÁÖ½ÄÇü À¯ÇüÀ» »ç¿ëÇÏ°í ÀÖ´Â È­¸é¿¡¼­ ¼¼ºÎÀ¯Çü ¼±ÅÃ½Ã (Æ¯Á¤Áö¿ªÇü, ´ÜÀÏ±¹°¡Çü,¼½ÅÍÇü) ¼±ÅÃ½Ã ¶ç¿ï ¸Þ½ÃÁö
function topfund_1_validate(form) {
	if (form.selFundType2.value=="99991" || form.selFundType2.value=="99992" || form.selFundType2.value=="99993" ) {
		alert("\n¼ÒÀ¯ÇüÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä       ");
		form.selFundType2.focus();
		return false;
	}
}

// Å¸ÀÌÆ² Âï±â
function common_title(title_use_gb, title_img_nm){
	if (title_use_gb=="Y") {
		document.write ("<table width='100%' border='0' cellspacing='0' cellpadding='0' style='word-break:break-all'>");
		document.write ("	<tr><td align=left><img src='/images/title/" + title_img_nm + "'></td></tr>");
		document.write ("</table>");
	}
}

//---------------------------------------------------------------------------------------------
