function syncheight1(obj){

	if(obj)
	{
		obj.style.height=obj.contentWindow.document.body.scrollHeight;
	}
	else
	{
		while(memobj.length>0)
		{
			memobj[0].style.height=memobj[0].contentWindow.document.body.scrollHeight;
			memobj.shift();
		}
	}
}

function show_recent(img,show_this,img_name){
	show_news.style.display="none";
	show_notice.style.display="none";

	document.all.button_news.src="HOM/button_news.gif";
	document.all.button_notice.src="HOM/button_notice.gif";

	show_this.style.display="block";
	img.src="HOM/"+img_name+"_on.gif";
}

/*ÄÚ¸àÆ® °¨Ãß±â*/
function emoticon(show_this){

	emoticon_button_p.style.display="none";
	emoticon_button_m.style.display="none";

	show_this.style.display="block";

	if(show_this==emoticon_button_p)
	{
		comment_body.style.display="none";
	}
	else
	{
		//alert("show_this!==emoticon_button_p : " + comment_body.style.display);
		comment_body.style.display="block";
		//alert("show_this!==emoticon_button_p : " + comment_body.style.display);
		//document.getElementById("viewReply").style.height = "500px";
		//alert(document.getElementById("viewReply").style.height);
		
	}
}
function emoticon1(show_this){

	emoticon_button_p.style.display="none";
	emoticon_button_m.style.display="none";

	show_this.style.display="block";

	if(show_this==emoticon_button_p)
	{
		comment_body.style.display="none";
	}
	else
	{
		//alert("show_this!==emoticon_button_p : " + comment_body.style.display);
		comment_body.style.display="block";
		document.getElementById("viewReply").style.height=viewReply.document.form1.scrollHeight;
		//alert("show_this!==emoticon_button_p : " + comment_body.style.display);
		//document.getElementById("viewReply").style.height = "500px";
		//alert(document.getElementById("viewReply").style.height);
		
	}
}

/*input ±Û¾ø¾Ö±â*/
function del_value(delect,memo,check){

	if(check=='no' && delect.value==memo)
	{
		delect.value="";
	}
	else
	{
		if(!delect.value) delect.value=memo;
	}
}


/*°øºÎ¹æ ·Ñ¿À¹ö*/
function over_button(img,over_img){

	img.src='/imgs/EDU/'+over_img;
}
function out_button_basic(img,out_img){

	img.src='/imgs/EDU/'+out_img;
}
function out_button(img,check,over_img,out_img){

	if(button_checknum.value==check)
	{
		img.src='HOM/'+over_img;
	}
	else
	{
		img.src='HOM/'+out_img;
	}
}
function show_button(img,check,over_img){

	button_checknum.value=check;
	button_1.src='HOM/button_edu01_02_1.gif';
	button_2.src='HOM/EDU/button_edu01_02_2.gif';
	button_3.src='HOM/EDU/button_edu01_02_3.gif';
	button_4.src='HOM/EDU/button_edu01_02_4.gif';

	img.src='HOM/'+over_img;

	contents_button_contents_1.style.display='none';
	contents_button_contents_2.style.display='none';
	contents_button_contents_3.style.display='none';
	contents_button_contents_4.style.display='none';

	if(check=='button_1')
	{
		contents_button_contents_1.style.display='';
	}
	if(check=='button_2')
	{
		contents_button_contents_2.style.display='';
	}
	if(check=='button_3')
	{
		contents_button_contents_3.style.display='';
	}
	if(check=='button_4')
	{
		contents_button_contents_4.style.display='';
	}
}


/*·Ñ¿À¹ö*/
function over_img(img,over_img,polder,check){

	if(check=='over')
	{
		img.src='/imgs/'+polder+'/'+over_img+'_on.gif';
	}
	if(check=='out')
	{
		img.src='/imgs/'+polder+'/'+over_img+'.gif';
	}
}




/*°í°´¼¾ÅÍ*/
function answer_view(link_color,view_td){

	if(view_td.style.display=='none')
	{
		no1.style.display='none';
		no2.style.display='none';
		no3.style.display='none';
		no4.style.display='none';
		no5.style.display='none';
		
		link_color1.style.color='#7c7b7b';
		link_color2.style.color='#7c7b7b';
		link_color3.style.color='#7c7b7b';
		link_color4.style.color='#7c7b7b';
		link_color5.style.color='#7c7b7b';
		
		view_td.style.display='block';
		link_color.style.color='#6fa704';
	}
	else
	{
		view_td.style.display='none';
		link_color.style.color='#7c7b7b';
	}
}

/*°í°´¼¾ÅÍ ÀÌ¸ÞÀÏ*/
function emailchange()
{
	if (document.form1.email3.value == "no")
	{
		document.form1.email2.value = "";
		document.form1.email2.readOnly = true;
	}
	else
	{
		if (document.form1.email3.value == "")
		{
			document.form1.email2.value = "";
			document.form1.email2.readOnly = false;
		}
		else
		{
			document.form1.email2.readOnly = true;
			document.form1.email2.value = document.form1.email3.value;
		}
	}
}

/*¼ýÀÚ Ã¼Å©*/
function ck_digit(target)
{
	var t = target.value;
	var Digit = '1234567890';
	
	if (Digit.length > 1)
	{
		for (i=0; i< t.length; i++)
		if(Digit.indexOf(t.substring(i,i+1))<0)
		{
			alert('¼ýÀÚ¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.');
			target.value='';
			target.select();
			return;
		}
	}
}

/*ÆË¾÷Ã¢*/
function open_win(url,width,height){

	open(url,'','width='+width+' height='+height+' resizable=no, scrollbars=no');
}

/*¾ÆÀÌÇÁ·¹ÀÓ Å©±âÁ¶Àý*/
function iframe_height(){

	parent.piframe_height();
}

/*ÇÃ·¡½Ã*/
function flash(flashfilename, flashwidth, flashheight)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ flashwidth +'" height="'+ flashheight +'">');
	document.write('<param name="movie" value="'+ flashfilename +'">');
	document.write('<param name="flashVars" value="swfUrl=/imgs/flash/">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed flashVars="swfUrl=/imgs/flash/" src="'+ flashfilename +'" width="'+ flashwidth +'" height="'+ flashheight +'" wmode=transparent ');
	document.write('  quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" >');
	document.write('</embed>');
	document.write('</object>');
}

/*family site*/
function familysite_color(color_object,color,check){

	color_object.style.background=color;

	if(check=='over')
	{
		color_object.style.color='#ff7200';
	}
	else
	{
		color_object.style.color='#77ca00';
	}
}
function familysite_open(url){

	open(url);
}

function family_site_show(check){

	if(check==1)
	{
		m_height = 177;
	}
	else if(check==2)
	{
		m_height = 173;
	}
	else if(check==3)
	{
		m_height = 184;
	}
	else
	{
		m_height = 180;
	}

	var t_height = t_site.offsetHeight;
	var view_height = t_height-m_height;

	family_site_value.style.top=view_height;
	family_site_value.style.display='block';
}

/*±¸µ¶Áö Á¤º¸ º¯°æ*/
function modify_data_check(submit_check){

	if(submit_check.checked)
	{
		modify_data.style.display='block';
	}
	else
	{
		modify_data.style.display='none';
	}
}

/*¸µÅ© Á¡¼± ¾ø¾Ö±â*/
function bluring(){
	
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;

function setWindowResizing(object){
		
	if(!object && typeof(tableMain)!='undefined') object=tableMain;
	window.resizeBy(object.clientWidth-document.body.clientWidth);
}
