<!--
var sendit;
var win;


//=================================================================================================================================
// Æ÷ÅÍ½º ÀÚµ¿ ÀÌµ¿
//=================================================================================================================================

function moveFocus(num,fromform,toform)
{
	var str = fromform.value.length;
	if(str >= num)
		toform.focus();
}

//=================================================================================================================================
// Á¦Ç° ÀÌ¹ÌÁö Å©°Ô º¸±â ÆË¾÷
//=================================================================================================================================

function pop_prodBimg(prod_cate,sub_cate)
{
	win = window.open ("/product/prod_pic_pop.asp?cate1=" + prod_cate + "&cate2=" + sub_cate,'prod_pic_pop','width=450,height=550,scrollbars=no,status=no')
	win.focus();

}

//=================================================================================================================================
// ¸ðµç ÀÌ¹ÌÁö Å©°Ô º¸±â ÆË¾÷
//=================================================================================================================================

function pop_Viewimg(imgName)
{
	win = window.open ("/include/pop_Viewimg.asp?viewImg=" + imgName,"pop_Viewbimg","width=100,height=100,left=10000,top=10000");
	win.focus();
}

//=================================================================================================================================
// Lay Display Ã³¸® Ã¼Å©
//=================================================================================================================================

function infoView(obj){
	obj.style.display = "";
}

function infoHidden(obj){
	obj.style.display = "none";
}

//=================================================================================================================================
// ³»¿ë Á¤º¸ ·¹ÀÌ¾î Ãâ·Â
//=================================================================================================================================

function InfoFaqView(obj){
	infoHidden2();
	document.all.popLayer[obj].style.display = "";
}

function infoHidden2(obj){
	for(k=0;k<document.all.popLayer.length;k++)
	{
		document.all.popLayer[k].style.display = "none";
	}
}

function infoshow(obj){
	if(obj.style.display == 'none')
		obj.style.display = "";
	else
		obj.style.display = "none";
}
function infomove(obj){
	obj.style.posLeft = event.clientX - 15;
	obj.style.posTop = event.clientY + 20 + document.body.scrollTop;
} 
//=================================================================================================================================
// ¸ðµç ¸µÅ©¿¡ ¸µÅ© Å×µÎ¸® ¾ø¾Ö±â
//=================================================================================================================================
function allblur() {
	for (i = 0; i < document.links.length; i++)
		document.links[i].onfocus = document.links[i].blur;
}


//=================================================================================================================================
// ÄíÅ° »ý¼º
//=================================================================================================================================

function SetCookie( name, value, expiredays ){
	var todayDate = new Date();
	todayDate.setTime(todayDate.getTime() + 3600000*24*expiredays);
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}


//=================================================================================================================================
// ÄíÅ° °¡Á®¿À±â
//=================================================================================================================================
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 PopCloseLink(linkPage){
	var linkPage
	opener.location.href = linkPage;
   	self.close();
}

//=================================================================================================================================
// ÀÔ·Â¹®ÀÚ¿­ ¹ÙÀÌÆ® Ã¼Å©
//=================================================================================================================================
function CheckLen(obj) { 
	var t;
	var msglen;
	msglen = 0;
	l = obj.length;
	for( k = 0; k < l; k++ ) {
		t = obj.charAt( k );
		if ( escape( t ).length > 4 ) {
		msglen += 2;
		}
		else {
			msglen++;
		}
	} 
	return msglen; 
}

//=================================================================================================================================
// ÅØ½ºÆ®ÀÇ ¹ÙÀÌÆ®¼ö ÀÚµ¿Ã¼Å©
//=================================================================================================================================
function byte_check(obj,length_limit){
	var length = calculate_msglen(obj.value);
	if (length > length_limit) {
		alert("ÃÖ´ë " + length_limit + "byteÀÌ¹Ç·Î ÃÊ°úµÈ ±ÛÀÚ¼ö´Â ÀÚµ¿À¸·Î »èÁ¦µË´Ï´Ù.");
		obj.value = obj.value.replace(/\r\n$/, "");
		obj.value = assert_msglen(obj.value, length_limit);
		document.all.viewcount.innerHTML = calculate_msglen(obj.value);
		obj.focus();
	}
}

function calculate_msglen(message){
	var nbytes = 0;
	for (i=0; i<message.length; i++) {
		var ch = message.charAt(i);
		if(escape(ch).length > 4) {
			nbytes += 2;
		} else if (ch == '\n') {
			if (message.charAt(i-1) != '\r') {
				nbytes += 1;
			}
		} else if (ch == '<' || ch == '>') {
			nbytes += 4;
		} else {
			nbytes += 1;
		}
	}
	document.all.viewcount.innerHTML = nbytes;
	return nbytes;
}

function assert_msglen(message, maximum){
	var inc = 0;
	var nbytes = 0;
	var msg = "";
	var msglen = message.length;

	for (i=0; i<msglen; i++) {
		var ch = message.charAt(i);
		if (escape(ch).length > 4) {
			inc = 2;
		} else if (ch == '\n') {
			if (message.charAt(i-1) != '\r') {
				inc = 1;
			}
		} else if (ch == '<' || ch == '>') {
			inc = 4;
		} else {
			inc = 1;
		}
		if ((nbytes + inc) > maximum) {
			break;
		}
		nbytes += inc;
		msg += ch;
	}
	return msg;
}


//=================================================================================================================================
// ÆË¾÷À¸·Î Post¹æ½Ä °ª Àü´Þ
//=================================================================================================================================
function postpopup(url,wWidth,wHeight){
	var wLeft = (screen.width - wWidth) / 2;
	var wTop = (screen.height - wheight) / 2;
	win = window.open ('', 'postpopup','scrollbars=yes,resizable=no,width='+wWidth+',height='+wHeight+',top='+wTop+',left='+wLeft);
	document.EntryForm.method = "post";
	document.EntryForm.action = url;
	document.EntryForm.submit();
	win.focus();
}





//=================================================================================================================================
// µ¥ÀÌÅ¸ Àü¼ÛÁß ¸Þ¼¼Áö
//=================================================================================================================================
function connecting(){
	alert("µ¥ÀÌÅ¸¸¦ Àü¼ÛÁß ÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä");
}


//=================================================================================================================================
// °Ë»ö Ã¼Å©
//=================================================================================================================================
function search_check(EntryForm){
	if(sendit)
	{
		connecting();
		return false;
	}
	if(!EntryForm.keyword.value)
	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
		EntryForm.keyword.focus();
		return false;
	}
	sendit = true;
	return true;
}


//=================================================================================================================================
// ÀÌ¹ÌÁö Resize
//=================================================================================================================================
function imgResize(img_id,maxWidth,maxHeight)
{
	var w=document.getElementById(img_id).width;
	var h=document.getElementById(img_id).height;
	if (w<=0) 
		time_id = window.setTimeout("controlImage('"+img_id+"')",10);
	else 
	{
		if (w > maxWidth)
			document.getElementById(img_id).width = maxWidth;
		if(h > maxHeight)
			document.getElementById(img_id).height = maxHeight;
	}
}

//=================================================================================================================================
// ÆË¾÷ ¸®»çÀÌÁî ¹× °¡¿îµ¥ Á¤·Ä
//=================================================================================================================================
function imgPopResize(img_id)
{
	var w=document.getElementById(img_id).width;
	var h=document.getElementById(img_id).height;
	if (w<=0) 
		time_id = window.setTimeout("imgPopResize('"+img_id+"')",10);
	w += 10;
	h += 30;
	var wl = (screen.width - w) / 2;
	var wt = (screen.height - h) / 2;
	window.resizeTo (w,h);
	if(w > 1024)
		wl = 0;
	if(h > 768)
		wt = 0;
	window.moveTo(wl,wt);
}

//=================================================================================================================================
// µ¥ÀÌÅ¸ Àü¼ÛÁß ¸Þ¼¼Áö
//=================================================================================================================================

function connecting(){
	alert("µ¥ÀÌÅ¸¸¦ Àü¼ÛÁß ÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä");
}

//=================================================================================================================================
// ¿ìÆí¹øÈ£ Ã£±â
//=================================================================================================================================
function zipcode()
{
	var wl = (screen.width - 400) / 2;
	var wh = (screen.height - 300) / 2;
	win = window.open ("/member/zip.asp","zipcode","width=400,toolbar=no,resizable=no,scrollbars=yes,location=no,resize=no,menubar=no,directories=no,copyhistory=0,height=300,left=" + wl + ",top=" + wh);
	win.focus();
}

//=================================================================================================================================
// ÇÊ¼ö Ç×¸ñ NULL Ã¼Å©
//=================================================================================================================================
function f_nul_chk(obj,lbl)
{
	if( obj.value == '' )
	{
		alert('ÇÊ¼öÇ×¸ñ ' + lbl + ' ÀÔ·ÂÇÏ½Ê½Ã¿À.');
		obj.focus(); 
		return true;   
	}
	else if (obj.value == 'null')
	{
		alert('ÇÊ¼öÇ×¸ñ ' + lbl + ' ÀÔ·ÂÇÏ½Ê½Ã¿À.');
		return true;   
	}
	//else if( obj.checked == false )
	//{
		////alert('ÇÊ¼öÇ×¸ñ ' + lbl + ' ÀÔ·ÂÇÏ½Ê½Ã¿À.');
		//obj.focus(); 
		//return true;   
	//}
	return false; 
}

//=================================================================================================================================
// ¼ýÀÚ¸¸ ÀÔ·Â °¡´É
//=================================================================================================================================
function f_is_num(obj,lbl)
{
	var nLen = obj.value.length; 
	for( i = 0 ; i < nLen ; i++)
	{
		temp = obj.value.substring(i,i+1);
		if( temp < '0' || temp > '9' )
		{
			alert(lbl + ' ¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.');
			obj.select();
			return true;
		}     
	}
	return false;
}



//=================================================================================================================================
// ID Ã¼Å© (¼ýÀÚ ¹× ¿µ¹®ÀÚ¸¸ ÀÔ·Â °¡´É)
//=================================================================================================================================

function f_is_id(obj)
{
   var sTemp;

	for(var i = 0; i < obj.value.length; i++)
	{
	   sTemp = obj.value.substring(i, i+1);   
		if((sTemp <= '9') && (sTemp >= '0'))
		   continue;
		if((sTemp <= 'z') && (sTemp >= 'a'))
		   continue;
		if((sTemp <= 'Z') && (sTemp >= 'A'))
		   continue;
	   return true;
	}
   return false;
}


//=================================================================================================================================
// ¹®ÀÚ ±æÀÌ Ã¼Å© (X¹®ÀÚ ÀÌ»ó ÀÔ·Â °¡´É)
//=================================================================================================================================
function f_len_date_chk(obj,lbl, num)
{
	if( obj.value.length != num)
	{
		alert(lbl + ' ³¯Â¥ Çü½ÄÀ» ¸ÂÃç ÀÔ·ÂÇÏ½Ê½Ã¿À.');
		obj.focus(); 
		return true;   
	}
	return false; 
}

//=================================================================================================================================
// ¹®ÀÚ ±æÀÌ Ã¼Å© (X¹®ÀÚ ÀÌ»ó ÀÔ·Â °¡´É)
//=================================================================================================================================
function f_len_s_chk(obj,lbl, num)
{
	if( obj.value.length < num)
	{
		alert(lbl + ' '  + num + '¹®ÀÚ ÀÌ»ó ÀÔ·ÂÇÏ½Ê½Ã¿À.');
		obj.focus(); 
		return true;   
	}
	return false; 
}

//=================================================================================================================================
// ¹®ÀÚ ±æÀÌ Ã¼Å© (X¹®ÀÚ ÀÌÇÏ ÀÔ·Â °¡´É)
//=================================================================================================================================
function f_len_l_chk(obj,lbl, num)
{
	if( obj.value.length > num)
	{
		alert(lbl + ' '  + num + '¹®ÀÚ ÀÌÇÏ ÀÔ·ÂÇÏ½Ê½Ã¿À.');
		obj.focus(); 
		return true;   
	}
	return false; 
}

//=================================================================================================================================
// ID Áßº¹ Ã¼Å©
//=================================================================================================================================
function f_popup_id() 
{

	var w_id_chk;
	if (f_nul_chk(document.EntryForm.user_id, '[¾ÆÀÌµð]¸¦'))			return; 
	if (f_len_s_chk(document.EntryForm.user_id, '[¾ÆÀÌµð]´Â',4))		return;
	if (f_len_l_chk(document.EntryForm.user_id, '[¾ÆÀÌµð]´Â',16))		return;
	if (f_is_id(document.EntryForm.user_id))
	{
	   alert("¾ÆÀÌµð´Â ¿µ¹®/¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");
		EntryForm.user_id.focus();
		return;
	}
	
	//window.open('/member/idcheck.asp?id=' + document.EntryForm.id.value,'w_id_chk', 
	window.open('/member/idcheck.asp?user_id=' + document.EntryForm.user_id.value,'idchk', 
			'resizable=no,scrollbars=0,x=100,y=200,width=400,height=300');
	

}
		
//=================================================================================================================================
// ÁÖ¹Îµî·Ï ¹øÈ£ Ã¼Å©
//=================================================================================================================================
function f_peop_no_chk(s) {
	if( s.charAt(6) == 1 || s.charAt(6) == 2 || s.charAt(6) == 3 || s.charAt(6) == 4)
	{
		if( s.charAt(12) == 
			(( 11 - ((s.charAt(0)*2+s.charAt(1)*3+s.charAt(2)*4
						+s.charAt(3)*5+s.charAt(4)*6+s.charAt(5)*7
						+s.charAt(6)*8+s.charAt(7)*9+s.charAt(8)*2
						+s.charAt(9)*3+s.charAt(10)*4+s.charAt(11)*5)
						% 11)))%10)
			return true; 
	} 
	return false; 
}

//=================================================================================================================================
// ¸¸ 14¼¼ ÀÌ»ó Ã¼Å©
//=================================================================================================================================
function f_ManAge(obj1,obj2)
{
	today			= new Date();
	var obj1YMD		= parseInt(obj1);
	var obj2YMD		= parseInt(obj2);
	var nowYear		= parseInt(today.getYear());
	var nowMonth	= today.getMonth()+1;
	var nowDate		= today.getDate();
	
	if (nowMonth < 10)
	{
		nowMonth = "0" + nowMonth;
	}

	if (nowDate < 10)
	{
		nowDate	= "0" + nowDate;
	}

	tmpYear	= nowYear - 1914;
	tmpYMD  = parseInt("" + tmpYear + nowMonth + nowDate);

	if (obj2YMD >= 1000000 && obj2YMD <= 2999999)
	{
		if (obj1YMD > tmpYMD)
		{
			infoView(agree14);
		}
	}
	else
	{
		infoHidden(agree14);
	}
}

//=================================================================================================================================
// ÀÌ¸ÞÀÏ ÀÚµ¿ ¼ÂÆÃ
//=================================================================================================================================
function email_set() 
{
	EntryForm.email2.value = EntryForm.email3.value;
}

function pemail_set() 
{
	EntryForm.email2.value = EntryForm.email3.value;
}

function email1_set() 
{
	EntryForm.email1_02.value = EntryForm.email1_03.value;
}

function email2_set() 
{
	EntryForm.email2_02.value = EntryForm.email2_03.value;
}

function email3_set() 
{
	EntryForm.email3_02.value = EntryForm.email3_03.value;
}

function email4_set() 
{
	EntryForm.email4_02.value = EntryForm.email4_03.value;
}

function email5_set() 
{
	EntryForm.email5_02.value = EntryForm.email5_03.value;
}

//=================================================================================================================================
// Checkbox ¼±ÅÃ Ã¼Å©
//=================================================================================================================================

function f_chknul_chk(obj,obj2,lbl)
{
	var chklen = 0;
	for(i=0;i<obj.length;i++)
	{
		if(obj[i].checked == true)
			chklen++;
	}
	if(chklen == 0)
	{
		if( obj2.value == '' )
		{
			alert("ÇÊ¼öÇ×¸ñ " + lbl + " Ç×¸ñÀ» Ã¼Å©ÇÏ½Ê½Ã¿À.");
			return true;   
		}
		
	}

	return false; 
}



//=================================================================================================================================
// Checkbox ¼±ÅÃ Á¦ÇÑ
//=================================================================================================================================

function chkBox(obj,cnt)
{
	var cnt;
	var chklen = 0;
	objlen = eval("document.EntryForm." + obj).length;
	for(i=0;i<objlen;i++)
	{
		if(eval("document.EntryForm." + obj + "[" + i + "]").checked == true)
		{
			chklen++;
			if(chklen > cnt)
			{
				alert("Ç×¸ñÀº " + cnt + "°³±îÁö ¼±ÅÃÀÌ °¡´ÉÇÕ´Ï´Ù.");
				eval("document.EntryForm." + obj + "[" + i + "]").checked = false;
			}
		}
	}
}

//=================================================================================================================================
// »ý³â¿ùÀÏ ÀÚµ¿ ¼ÂÆÃ
//=================================================================================================================================
function birth_set() 
{
	var tmpbirth1;
	var tmpbirth2;
	var tmpbirth_y;
	var tmpbirth_m;
	var tmpbirth_d;
	var tmpbirth_x;
	
	tmpbirth1 = EntryForm.ss_id1.value;
	tmpbirth2 = EntryForm.ss_id2.value;
	tmpbirth_x = tmpbirth2.substring(0,1);
	
	if (tmpbirth_x >= 3)
		tmpbirth_y = "20"
	else
		tmpbirth_y = "19"
	tmpbirth_y = tmpbirth_y + tmpbirth1.substring(0, 2);
	tmpbirth_m = tmpbirth1.substring(2, 4);
	tmpbirth_d = tmpbirth1.substring(4, 6);

	if (tmpbirth2.length == 7)
	{
		EntryForm.birth_y.value = tmpbirth_y;
		EntryForm.birth_m.value = tmpbirth_m;
		EntryForm.birth_d.value = tmpbirth_d;
//		f_ManAge(tmpbirth1,tmpbirth2);
	}

}


//=================================================================================================================================
// °Ô½ÃÆÇ ÄÚ¸àÆ® »èÁ¦
//=================================================================================================================================
function cmtdel(val) {
	if(confirm("ÄÚ¸àÆ®¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n\"È®ÀÎ\"À» ´©¸£½Ã¸é »èÁ¦µË´Ï´Ù.") == true){
		document.EntryForm.mode.value = "COMDEL";
		document.EntryForm.cmtnum.value = val;
		document.EntryForm.submit();

	}
}

//=================================================================================================================================
// ÆÄÀÏ »èÁ¦
//=================================================================================================================================
function filedel(val) {
	if(confirm("ÆÄÀÏÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n\"È®ÀÎ\"À» ´©¸£½Ã¸é »èÁ¦µË´Ï´Ù.") == true)
	{
		document.EntryForm.mode.value = "FILEDEL";
		document.EntryForm.recordname.value = val;
		document.EntryForm.submit();
	}
}
//=================================================================================================================================
// Doctor Activity ÆË¾÷
//=================================================================================================================================
function activity_pop(dep,idx)
{
	var dep;
	var idx;
	window.open('/doctor/activity_pop.asp?dep=' + dep + '&idx=' + idx,'activity_pop','width=400, height=460')
}

//ÇÑ±Û¸¸ ÀÔ·Â °¡´ÉÇÏ°Ô 

 function chk_Hangul() {

    if ((event.keyCode >= 32)||(event.keyCode <= 126)) {
      alert("ÇÑ±Û¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.");
        event.returnValue=false;
     }

 }
 

//=================================================================================================================================
// ¸¶¿ì½º·Ñ¿À¹ö
//=================================================================================================================================
  

function MM_swapImgRestore() { //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 MM_preloadImages() { //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=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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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 MM_showHLayers() { //v3.0
	var i,p,v,obj,args=MM_showHLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
		obj.visibility=v; }
}


//=================================================================================================================================
// ÇÃ·¡½Ã ¼±¾ð
//=================================================================================================================================
// id: flash id
// url: source url
// w: source width
// h: source height
// t: wmode (none/transparent/opaque)
function Flash(id,url,w,h){
document.write("\
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width="+w+" height="+h+" id="+id+">\
<param name='movie' value="+url+">\
<param name='quality' value='high'>\
<param name='wmode' value='transparent' / >\
<embed src="+url+" name="+id+" quality='high' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width="+w+" height="+h+"></embed>\
</object>\
");
}


// -->