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.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=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 MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.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; }

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

}
//------------------ ·Î±×ÀÎ CHECK FORM --------------
function LoginFrm(theForm)
{
	//if (theForm.boan.checked) {  // º¸¿ÏÁ¢¼Ó¿©ºÎ Ã¼Å©(¾È°ú´Â »ç¿ë¾ÈÇÔ)
	//	var url = "https://www.ophthalmology.org/login.php";
	//	theForm.action = url;
	//}
	if (theForm.id.value == "") {
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.id.focus();
		return false;
	}
	if (theForm.pwd.value == "") {
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.pwd.focus();
		return false;
	}
}
function adminLoginFrm(theForm)
{
	if (theForm.id.value == "") {
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.id.focus();
		return false;
	}
	if (theForm.pwd.value == "") {
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.pwd.focus();
		return false;
	}
}

//----------------------- »õÃ¢ ¶ç¿ì±â(½ºÅ©·Ñ¹Ù À¯) ----------------------------
function Win_scroll2(theURL,wide,high,sform) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	theURL=theURL+"?grp="+sform.grp.value+"&sel1="+sform.sel1.value+"&sel2="+sform.sel2.value+"&sel3="+sform.sel3.value+"&sel4="+sform.sel4.value+"&sel5="+sform.sel5.value;
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');
}


//----------------------- »õÃ¢ ¶ç¿ì±â(½ºÅ©·Ñ¹Ù À¯) ----------------------------
function Win_scroll(theURL,wide,high) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');
}

function Win_p1(theURL,wide,high) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(theURL,"p1",'width='+wide+',height='+high+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');
}

//----------------------- »õÃ¢ ¶ç¿ì±â(½ºÅ©·Ñ¹Ù ¹«) ----------------------------
function Win_mu(theURL,wide,high) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=no,resizable=no,top=' + window_top + ',left=' + window_left + '');
}

//----------------------- »õÃ¢ ¶ç¿ì±â(½ºÅ©·Ñ¹Ù À¯) ----------------------------
function LabelWin(theURL,name,wide,high) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(theURL,name,'width='+wide+',height='+high+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');
}

//----------------------- °Ë»ö ----------------------------
function Search_send(theForm)
{
	if(theForm.keyword.value == ""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		theForm.keyword.focus();
		return false;
	}
}

//----------------------- °Ë»ö ÀÇ·á±â Àü½Ã½ÅÃ» °ü¸®ÀÚ ----------------------------
function Search_send_ent(theForm)
{
	if(theForm.Period.value == ""){
		if(theForm.keyword.value == ""){
			alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.keyword.focus();
			return false;
		}
	}
}


//------------------ ¶óµð¿À¹öÆ° CHECK --------------
function radioCheck(oN){
	for(i=0;i<oN.length;i++){
		if(oN[i].checked){ return true; }
	}
	return false;
}

//-----------------------E-mail ÁÖ¼ÒÈ®ÀÎ----------------------------
function isEmail(str) {

  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported)
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

//----------------------- ¼ýÀÚ È®ÀÎ ----------------------------
function Check_Num(theForm) {
	t = theForm.value ;
	for(i=0;i<t.length;i++) {
		if (t.charAt(i)<'0' || t.charAt(i)>'9') {
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.") ;
			theForm.value="";
			theForm.focus();
			return false ;
		}
	}
	return true;
}

//----------------------- ¼ýÀÚ È®ÀÎ(ÀÚ¸®¼ö Æ÷ÇÔ) ----------------------------
function Check_Tel(theForm,mm) {
	t = theForm.value;
	for(i=0;i<t.length;i++) {
		if (t.charAt(i)<'0' || t.charAt(i)>'9') {
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.") ;
			theForm.value="";
			theForm.focus() ;
			return false ;
		}
	}
	if (t.length < mm)
	{
		alert("¼ýÀÚÀÇ ±æÀÌ¸¦ È®ÀÎÇÏ½Ê½Ã¿ä.");
		theForm.focus();
		return false;
	}
	return true;
}

//------------------------ ¿ìÆí¹øÈ£°Ë»ö ----------------------------
function OpenZipcode(z,is_https){    //open zip code check win
	zName = "/zip_search.html?zip_gubun="+z
	if( is_https) zName += "&amp;is_https=" + is_https;
		window.open(zName,"ZipWin","width=419,height=203,scrollbars=yes");
}

//------------------------ º´¿ø°Ë»ö ----------------------------
function OpenHosp(z){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	murl = "/hosp_search.html?hosp_gubun="+z
	window.open(murl,"HosWin",'width=460,height=170,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ »çÁø ÀÔ·Â ----------------------------
function OpenPhoto(str){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	murl = "/photo_up.html?num="+str;
	window.open(murl,"PhoWin",'width=441,height=256,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ °øÁö»çÇ× PopUp ----------------------------
function OpenNotify(murl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(murl,"NoticeWin",'width=598,height=450,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ Çà»çÀÏÁ¤ PopUp ----------------------------
function OpenEvent(murl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(murl,"EventWin",'width=416,height=400,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ ±Ù¹«Ã³º¯°æ PopUp ----------------------------
function OpenOffice(str){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	murl = "/mypage/office.html?id="+str;
	window.open(murl,"EventWin",'width=600,height=520,scrollbars=no,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ »èÁ¦ ----------------------------
function delconf_comm(murl,name)
{
	if(confirm(name+"¸¦ Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\nÀ§¿øÈ¸¿¡ ¼ÓÇØÀÖ´Â È¸¿øµµ ¸ðµÎ À§¿øÈ¸¿¡¼­ »èÁ¦µË´Ï´Ù."))
	window.location = murl;
}

//------------------------ Á¦À§¿øÈ¸ »èÁ¦ ----------------------------
function delconf(murl)
{
	if(confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
	window.location = murl;
}

//------------------------ °áÁ¦ È®ÀÎ ----------------------------
function payconf(murl)
{
	if(confirm("°áÁ¦È®ÀÎÀÌ µÇ¾ú½À´Ï±î?"))
	window.location = murl;
}

//---------------------- ÂÊÁö popup -------------
function Memo_open(myurl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open (myurl, "memo", 'width=414, height=268,scrollbars=yes,top=' + window_top + ',left=' + window_left + '')
}

//---------------------- ÂÊÁö -------------
function Memo_wasteconf(murl){
	if(confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\nÈÞÁöÅë·Î ÀÌµ¿µË´Ï´Ù."))
	window.location = murl;
}

//---------------------- ÂÊÁö -------------
function Memo_delconf(murl){
	if(confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n¼±ÅÃÇÑ ÂÊÁö°¡ ¿ÏÀüÈ÷ »èÁ¦µË´Ï´Ù."))
	window.location = murl;
}

//---------------------- ÂÊÁö -------------
function Sender_delconf(murl){
	if(confirm("ÂÊÁö¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
	window.location = murl;
}

//----------------------- ¾ÆÀÌµð / ÆÐ½º¿öµå Ã£±â ----------------------------
function Find_Send(theForm)
{
	if (theForm.type.value == "id")
	{
		if (!theForm.name.value) {
			window.alert("¼º¸íÀ» ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
			theForm.name.focus();
			return false;
		}
		if (!theForm.doc_no.value) {
			window.alert("È¸¿ø°¡ÀÔ½Ã ÀÔ·ÂÇÏ¼Ì´ø ÀÇ»ç¸éÇã¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À.");
			theForm.doc_no.focus();
			return false;
		}
//		if (!theForm.jumin.value) {
//			window.alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
//			theForm.jumin.focus();
//			return false;
//		}
	}
	else
	{
		if (!theForm.id.value) {
			window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À.");
			theForm.id.focus();
			return false;
		}
		if (!theForm.doc_no.value) {
			window.alert("È¸¿ø°¡ÀÔ½Ã ÀÔ·ÂÇÏ¼Ì´ø ÀÇ»ç¸éÇã¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À.");
			theForm.doc_no.focus();
			return false;
		}
	}
}

//--------------------- ÆÄÀÏ Æ÷¸Ë CHECK -------------------------
function formatChk(theForm)
{
    var fname = theForm.value;
    sp_arry = fname.split(".");
    sp_einx = sp_arry.length - 1;
    sp_arry[sp_einx] = sp_arry[sp_einx].toLowerCase();

	return sp_arry[sp_einx];
}

//----------------------- Select Form Search ----------------------------
function Way_send()
{
	document.Way_Frm.submit();
}

//----------------------- Error Login ----------------------------
function Error_Login()
{
	alert("·Î±×ÀÎ ÈÄ »ç¿ë °¡´ÉÇÕ´Ï´Ù.");
	location.href = "/login.html";
}

//---------------------- ¼¼±Ý°è»ê¼­ -------------
function TaxPrint(murl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open (murl, "tax", 'width=750, height=550,scrollbars=yes,top=' + window_top + ',left=' + window_left + '')
}

//---------------------- ¼¼±Ý°è»ê¼­ Á¤º¸ÀÔ·Â -------------
function Tax_write(murl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open (murl, "tax", 'width=700, height=620,scrollbars=yes,top=' + window_top + ',left=' + window_left + '')
}

/*************************************************************************************** SMS °ü·Ã ***************/
/*************************************************************************************** SMS °ü·Ã ***************/
function send_sms(myurl){
	window.open (myurl, "sms", "width=174,height=352,top=20,left=20,scrollbars=no, resizable=no")
}

//SMS¾²±â-À§¿øÈ¸ ¿©·¯»ç¶÷¿¡°Ô
function send_sms_total(sect,Brd_Frm,cname){
	var sid="";
	var pcs="";

	//------------------------ ÀüÃ¼Ã¼Å© ----------------------------
//	alert(Brd_Frm.elements.length);
	for( var i=1; i<Brd_Frm.elements.length; i++)
	{
		var check = Brd_Frm.elements[i];
		if (check.checked)
		{
			//to=eval("document.Brd_Frm.to"+i+".value");
			to=check.value;
			to1 = to.split("/");
			//alert(to1[1]);
			if(sid==""){
				sid=to1[0];
			}else{
				sid=sid+","+to1[0];
			}

			if(pcs==""){
				pcs=to1[1];
			}else{
				pcs=pcs+","+to1[1];
			}
		}
	}
//alert(sid);
	var theURL = "/wewon/send_sms.html?section="+sect+"&cname="+cname+"&sid_list="+sid+"&pcs_list="+pcs+"&mode=M";
//	alert(theURL);
	window.open(theURL,"sms", "width=174,height=352,top=20,left=20,scrollbars=no, resizable=no");
}

function SMS_open(myurl){
	window.open (myurl, "sms", "width=280,height=533,top=20,left=20,scrollbars=no, resizable=no");
}
//SMS¾²±â - ±×·ì ¿¡°Ô
function send_sms_grp(Brd_Frm){
	var sid="";
	var pcs="";

	//------------------------ ÀüÃ¼Ã¼Å© ----------------------------
//	alert(Brd_Frm.elements.length);
	for( var i=3; i<Brd_Frm.elements.length; i++)
	{
		var check = Brd_Frm.elements[i];
		if (check.checked)
		{
			//to=eval("document.Brd_Frm.to"+i+".value");
			to1=check.value;
//			to1 = to.split("/");
			//alert(to1[1]);
			if(sid==""){
				sid=to1;
			}else{
				sid=sid+","+to1;
			}

		}
	}
	if(sid){
//alert(sid);
	var theURL = "/admin/send_sms.html?gid_list="+sid+"&mode=G";
	//alert(theURL);
	window.open(theURL,"sms", "width=174,height=352,top=20,left=20,scrollbars=no, resizable=no");
	}else{
		alert("´ë»óÀ» ¼±ÅÃÇÏ¼¼¿ä");
	}
}

//SMS¾²±â - °³ÀÎº°
function send_sms_per(Brd_Frm){
	var sid="";
	var pcs="";

	//------------------------ ÀüÃ¼Ã¼Å© ----------------------------
//	alert(Brd_Frm.elements.length);
	for( var i=3; i<Brd_Frm.elements.length; i++)
	{
		var check = Brd_Frm.elements[i];
		if (check.checked)
		{
			//to=eval("document.Brd_Frm.to"+i+".value");
			to1=check.value;
			//to1 = to.split("/");
			//alert(to1[1]);
			if(sid==""){
				sid=to1;
			}else{
				sid=sid+","+to1;
			}
		}
	}
	if(sid){
//alert(sid);
	var theURL = "/admin/send_sms.html?gid_list="+sid+"&mode=P";
//	alert(theURL);
	window.open(theURL,"sms", "width=174,height=352,top=20,left=20,scrollbars=no, resizable=no");
	}else{
		alert("´ë»óÀ» ¼±ÅÃÇÏ¼¼¿ä");
	}
}
/*************************************************************************************** SMS °ü·Ã ***************/
//----------------------- Byte check ----------------------------
function Byte_check(str,str_limit)
{
	theForm = document.mail_frm;
	switch(str)
	{
		case "0" :
		var bodyForm = theForm.sms_msg;
		var bodyLimit = 80;
		break;
	}
	var bodyVal = bodyForm.value;
	var bodyLen = bodyVal.length;
	var bytesLen = 0;
	var validBodyLen = 0;
	var validBytesLen = 0;

	for (var i = 0; i < bodyLen; i++)
	{
		var oneChar = bodyVal.charAt(i);
		if (escape(oneChar).length > 4)
		{
			bytesLen += 2;
		}
		else if (oneChar!='\r')
		{
			bytesLen++;
		}
		if(bytesLen <= str_limit)
		{
			validBodyLen = i + 1;
			validBytesLen = bytesLen;
		}
	}
	if(bytesLen > str_limit)
	{
		alert(str_limit+"byte ÀÌ»óÀÇ ±ÛÀ» ¾²½Ç ¼ö ¾ø½À´Ï´Ù.");
		var realBodyVal = bodyVal.substr(0, validBodyLen);
		bodyForm.value = realBodyVal;
		var bytesVal = validBytesLen;
	}
	else
	{
		bytesVal = bytesLen;
	}

	if(str == "1" || str == "2" || str == "3" || str == "4")
	{
		var Total_byte = Total_check();
		var Total_limit = 1200;
		if(Total_byte > Total_limit)
		{
			alert(Total_limit+"byte ÀÌ»óÀÇ ±ÛÀ» ¾²½Ç ¼ö ¾ø½À´Ï´Ù.");
		}
		theForm.body_limit.value = Total_byte;
	}
	bodyLimit.value = bytesVal;
	bodyForm.focus();
}

/*************************************************************************************** SMS °ü·Ã ***************/

// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, À©µµ¿ì¸ðµå, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö)
function flash(url, w, h, win, id, bg, vars)
{
	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr =	"";
	flashStr += '<object width="' + w + '" height="' + h + '" align="middle"';
	if (id) flashStr += ' id="' + id + '"';
	flashStr += ' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
	flashStr += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">';
	flashStr += '<param name="allowScriptAccess" value="always" />';
	flashStr += '<param name="movie" value="' + url + '" />';
	flashStr += '<param name="menu" value="false" />';
	flashStr += '<param name="quality" value="high" />';
	if (win) flashStr += '<param name="wmode" value="' + win + '" />';
	if (bg) flashStr += '<param name="bgcolor" value="' + bg + '" />';
	if (vars) flashStr += '<param name="FlashVars" value="' + vars + '" />';
	flashStr += '<embed src="' + url + '" width="' + w + '" height="' + h + '"';
	flashStr += ' menu="false" quality="high" align="middle" allowScriptAccess="always"';
	flashStr += ' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"';
	if (win) flashStr += ' wmode="' + win + '"';
	if (id) flashStr += ' name="' + id + '"';
	if (bg) flashStr += ' bgcolor="' + bg + '"';
	if (vars) flashStr += ' FlashVars="' + vars + '"';
	flashStr += ' />';
	flashStr += '</object>';
	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}

// ÆË¾÷Ã¢ ¶ç¿ì±â
var _pop //create global variable without assigning a value so that its value is null
function popen(url, name, w, h, scroll, pos, res, menu) { // (°æ·Î,ÀÌ¸§,°¡·Î,¼¼·Î,½ºÅ©·ÑÀ¯¹«,À§Ä¡,¸®»çÀÌÁî)

	if (!scroll) scroll = 1;
	if (!pos) pos = "center";
	if (!res) res = 0;
	if (!menu) menu = "no";

	// ºê¶ó¿ìÀúº° ³ôÀÌ Á¶Àý
	var marginY = 0;
	if (navigator.userAgent.indexOf("MSIE 6") > 0) marginY = 30; // IE 6.x
	else if(navigator.userAgent.indexOf("MSIE 7") > 0) marginY = 80; // IE 7.x
	else if(navigator.userAgent.indexOf("Firefox") > 0) marginY = 80; // FF
	else if(navigator.userAgent.indexOf("Opera") > 0) marginY = 30; // Opera
	else if(navigator.userAgent.indexOf("Netscape") > 0) marginY = -2; // Netscape

	if(h >0) h = parseInt(Math.abs(h)) + parseInt(Math.abs(marginY));

	switch (pos) {
		case 'center' :
			LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
			TopPosition = (screen.height) ? (screen.height - h - 100) / 2 : 100;
			break;
		case "random" :
			LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100;
			TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
			break;
		default :
			var reg = /_/;
			if(reg.test(pos)) {
				var posArr =  pos.split('_');
				LeftPosition=posArr[0];
				TopPosition=posArr[1];
			}else{
				LeftPosition=0;
				TopPosition=0;
			}
		break;
	}

	var settings = 'width=' + w + ', height=' + h + ', top=' + TopPosition + ', left=' + LeftPosition + ', scrollbars=' + scroll;
	settings += ', location=no, directories=no, status=no, menubar='+menu+', toolbar=no, resizable=' + res;

	if(_pop!=null && !_pop.closed) {
		_pop.close();
	}

	pop = window.open(url, name, settings);
	pop.focus();
}


// --------------- 2009-09-10 PJH Ãß°¡ ---------------
// ºó°ª °Ë»ç (¸Þ¼¼Áö Ãâ·Â / °ø¹éÀ» Á¦¿ÜÇÏ°í ºó°ªÀÌ¸é true ¾Æ´Ï¸é false)
function chkBlank_msg(box, msg) {
	var valid = box.value.replace(/\s/gi,"");
	if (valid=="") {
		if (!msg) msg = "ºó °ªÀÔ´Ï´Ù. °ªÀ» ÀÔ·ÂÇÏ¼¼¿ä.";
		alert(msg); box.focus();
		return true;
	}
	return false;
}

// ÀÌ¸ÞÀÏ Çü½Ä °Ë»ç (¸ÂÀ¸¸é true Æ²¸®¸é false)
function chkEmail(box) {
	if (chkBlank_msg(box,"ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä")) return false;
	if (chkSpace(box.value)) {
		alert("ÀÌ¸ÞÀÏÀº °ø¹é¾øÀÌ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		box.value = box.value.replace(/\s/gi,"");
		box.focus(); box.select(); return false;
	}
	var email_exp = /^[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+$/;
	if (!email_exp.test(box.value)) {
		alert("ÀÌ¸ÞÀÏ Çü½ÄÀÌ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.");
		box.focus(); box.select(); return false;
	}
	return true;
}

// °ø¹é(½ºÆäÀÌ½º)°Ë»ç (°ø¹éÀÌ ÀÖÀ¸¸é true ¾øÀ¸¸é false)
function chkSpace(strText) {
	return (strText.search(/\s/) != -1);
}

// ÄÁÆß¸Þ¼¼Áö Ãâ·Â ÈÄ ÀÌµ¿
function conf_url(msg,murl) {
	if(confirm(msg)) window.location = murl;
}

// °¢Á¾ ±âÅ¸ Ã¼Å© ÇÔ¼ö
function chkEtc(name, str) { // º¯¼ö¸í, ±âÅ¸¹®ÀÚ¿­
	var f = document.regist_frm;
	var obj = eval("f." + name);
	var obj_etc = eval("f."+name+"_etc");
	if (obj.value == str) {
		obj_etc.disabled = false;
		obj_etc.focus();
	} else {
		obj_etc.disabled = true;
		obj_etc.value = "";
	}
}

