		function member() {
			w = 717;
			h = 580;
			if (screen.width < 1025)
			{
				LeftPosition=0;
				TopPosition=0;
			}
				else
				{
				LeftPosition=(screen.width)?(screen.width-w)/2:100;
				TopPosition=(screen.heigh)?(screen.heigh-h)/2:100;
			}
				window.open("/member/regist.asp", "bommain", "width="+w+",height="+h+",top="+TopPosition+",left="+LeftPosition+", scrollbars=yes");
		}


		function form_submit()
		{
			if(document.mem_form.mem_id.value=="")
			{
				alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
				document.mem_form.mem_id.focus();
				return false;
			}
			if(document.mem_form.mem_passwd.value=="")
			{
				alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
				document.mem_form.mem_passwd.focus();
				return false;
			}
			document.mem_form.action = "https://www.cankids.com:444/member/login_process.asp";
			document.mem_form.method="post";
			document.mem_form.submit();
		}

		 function go_regist() {
			w = 717;
			h = 580;
			if (screen.width < 1025)
			{
				LeftPosition=0;
				TopPosition=0;
			}
				else
				{
				LeftPosition=(screen.width)?(screen.width-w)/2:100;
				TopPosition=(screen.heigh)?(screen.heigh-h)/2:100;
			}
				window.open('/member/regist.asp', 'member', "width="+w+",height="+h+",top="+TopPosition+",left="+LeftPosition+", scrollbars=yes");
		}


function lostID()
	{
		window.open('/member/find_idpass.asp?tp=id','id','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=251,height=176,left=0, top=0');
	}
	
function lostPW()
	{
		window.open('/member/find_idpass.asp?tp=pass','pw','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=251,height=176,left=0, top=0');
	}
	
function out()
	{
		window.open('/member/find_idpass.asp?tp=withdrawal','withdrawal','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=251,height=176,left=0, top=0');
	}

function openWin(url, name, w, h)
{
	window.open(url, name, 'width='+w+',height='+h+',resizable=yes,scrollbars=yes');
}

function openWinFixed(url, name, w, h)
{
	window.open(url, name, 'width='+w+',height='+h+',resizable=no,scrollbars=no');
}

function openWinFixedScroll(url, name, w, h)
{
	window.open(url, name, 'width='+w+',height='+h+',resizable=no,scrollbars=yes');
}

function act(imgName)
{
	document[imgName].src = eval(imgName + "on.src");
}

function unact(imgName)
{
	document[imgName].src = eval(imgName + "off.src");
}

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 );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function trim(st)
{
	while(st)
	{
		if (st.indexOf(" ")==0) st = st.substring(1);
		else if (st.indexOf("\n")==1) st = st.substring(2);
		else break;
	}
	while(st)
	{
		if (st.lastIndexOf(" ")==st.length-1) st = st.substring(0, st.length-1);
		else if (st.lastIndexOf("\n")==st.length-1) st = st.substring(0, st.length-2);
		else break;
	}
	return st;
}

function trim_all(checkform)
{
	var i=0;
	while (i < checkform.length)
	{
		if (checkform.elements[i].name != 'uploadfile' && checkform.elements[i].name != 'icon')
			checkform.elements[i].value = trim(checkform.elements[i].value);
		i++;
	}
	return true;
}

function isNull(field, message)
{
	//if (field.value.length==0)
	if (!field.value)
	{
		alert(message + '\t');
		field.focus();
		return true;
	}
	return false;
}

