DOMAIN = document.domain ;

function imgResize(w, h, obj){
	if(obj){
		var Owidth = w;
		var Oheight = h;
		var Oratio = Owidth/Oheight;
		
		var Pwidth = obj.width;
		var Pheight = obj.height;
		var Pratio = Pwidth/Pheight;
		
		if(Pwidth <= Owidth && Pheight <=Oheight){
		}else if(Oratio > Pratio){
			obj.height = Oheight;
		}else{
			obj.width = Owidth;
		}
	}
}
function imgResizeArray(w, h, id)
{
	var obj = document.all(id) ;
	if (!obj) return ;
	if ( obj.length )
	{
		for (var cnt = 0 ; cnt < obj.length ; cnt++ )
		{
			imgObjResize(w,h, obj[cnt]) ;
		}
	}
	else
			imgObjResize(w,h, obj) ;
}


//ÆË¾÷À» ¸®»çÀÌÁîÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù.
function resize_common_popup(w, h){
	window.resizeTo( w, h+40 ) ;
}

//·Î±×ÀÎ ¹Ú½º ¾ÆÀÌÇÁ·¹ÀÓ ³ôÀÌ ¼³Á¤
// iframe resize Function
function parent_reSize()
{
	try{
	    var objBody	    =	login_lnfo.document.body;
	    var objFrame	=	document.all["login_lnfo"];

	    objFrame.style.height = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
		if(objFrame.style.height == "0px"){
			objFrame.style.height = "130px";
		}
	    objFrame.style.width = '208'
	}
	//An error is raised if the IFrame domain != its container's domain
	catch(e)
	{
	    //err_handle(e);
	}
}

// iframe initialize Function
function frame_init()
{
	parent.parent_reSize();
}
/**
 * checkbox¿¡¼­ ÀüÃ¼ ¼±ÅÃÇÏ´Â check box ´­·¶À» ¶§ È£ÃâµÇ´Â ÇÔ¼ö
 * @author : ÇãÁ¤¼ö
 * @date : 2004.01.15
 */
function chk_change_all( frm_name, c_all_box_name )
{
	// ÀüÃ¼ Ã¼Å©ÇÏ´Â Ã¼Å© ¹Ú½ºÀÇ ÇöÀç »óÅÂ
	var temp = eval( "document.forms." + frm_name + "." + c_all_box_name );
	
	var to_state ;
	// °³º° Ã¼Å© ¹Ú½ºÀÇ »óÅÂ¸¦ °áÁ¤
	if( temp.checked == true )
	{
		to_state = true ;
	}
	else
	{
		to_state = false ;
	}
	
	temp = eval( "document." + frm_name ) ;

	// °³º° Ã¼Å© ¹Ú½ºÀÇ »óÅÂ¸¦ º¯È­ ½ÃÅ°±â
	for( var i = 0 ; i < temp.length ; ++i )
	{
		if( temp[i].disabled == false ) 
			temp[i].checked = to_state ;
	}
} // end of change_all()

/**
 * formÀÇ checkbox¿¡ check ¾È µÈ °ÍÀÌ ÀÖ´ÂÁö °Ë»ç
 * ÇÏ³ª¶óµµ Ã¼Å©°¡ µÇ¾î ÀÖÀ¸¸é, true ¸®ÅÏ. ¾Æ´Ï¸é, false ¸®ÅÏ
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004. 01. 17
 */
function is_chk_checked( frm_name )
{
	var temp_frm = eval( "document." + frm_name ) ;

	var cnt = 0 ;

	var checked = false ;

	// loop¸¦ µ¹¸é¼­ checkµÈ °ÍÀÌ ÀÖ´ÂÁö °Ë»ç.
	for( ; cnt < temp_frm.length; ++cnt )
	{
		if( temp_frm[cnt].checked == true )
		{
			return true ;
		}
	} // end of for()

	return false ;

} // end of is_checked()

function window_open( page, name, top, left, width, height, scroll, resize )
{
	window.open( page, name,
	'toolbar=no, location=no, directories=no, status=no, ' +
	'menubar=no, scrollbars='+ scroll +', resizable='+ resize + ', width=' +
	width + ', height=' + height +
	', top=' + top + ', left=' + left );
}

function is_ssn_check( ssn1, ssn2 )
{
	check_arr = new Array( 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5 )
	buff = new Array()

	ssn_len = 13
	ssn = ssn1 + ssn2

	for( i = 0; i < ssn_len; i++ )
	{
		buff[i] = ssn.substr( i, 1 )
	}

	for( i = sum = 0; i < 12; i++ )
	{
		sum += ( buff[i] *= check_arr[i] );
	}

	if( ( ( 11 - ( sum % 11 ) ) % 10 ) != buff[12] )
		return false

	return true
}

/**
 * ¾ç/À½·Â º¯È¯ Ã¢ ¿­±â
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.02.04
 */
function open_trans()
{
	window_open( "/cm//sched/trans_sm.php", "cal", 100, 100, 500, 419 ) ;
} // end of open_trans()

/**
 * ³¯Â¥ °è»ê±â Ã¢ ¿­±â
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.02.04
 */
function open_cal()
{
	window_open( "/cm/sched/day_cal_f.php", "cal", 100, 100, 500, 417, 'toolbars=no,scrollbars=no' ) ;

} // end of open_cal()

/**
 * ÆÄÀÏ È®ÀåÀÚ ±¸ÇÏ±â
 * @author : ÇãÁ¤¼ö <wertyu@ufamiy.co.kr>
 * @date : 2004.03.27
 */
function get_file_ext( file_name )
{
	var re = /\.[a-z]*$/i ;

	var ret_val = file_name.match( re ) ;

	return ret_val ;
} // end of get_file_ext()

/**
 * ¾Ù¹ü ÄÚ¸àÆ®¸¦ Ãâ·ÂÇÏ´Â iframeÀ» È£ÃâÇØ¼­, div id=cmt¿¡
 * ±× ³»¿ëÀ» Ãâ·ÂÇÏ±â
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.03.23
 */
function al_print_cmt( uf_no, no_type, img_no )
{
        document.all.cmt.innerHTML = 'ÄÚ¸àÆ® ³»¿ëÀ» ÀÐ¾î¿À°í ÀÖ½À´Ï´Ù.' ;
        document.all.al_hidden_frame.src = '/cm/album/al_print_cmt.php?uf_no=' + uf_no + '&no_type=' + no_type + '&img_no=' + img_no ;
} // end of al_print_cmt()

/**
 * ºê¶ó¿ìÁ® ¹öÀü ¾Ë¾Æ ¿À±â
 * ¾îÂ÷ÇÇ ¿ì¸® ºê¶ó¿ìÀú´Â IE¸¸ Áö¿øÇÏ´Ï±ñ, ºê¶ó¿ìÁ®°¡ IE¶ó´Â °¡Á¤ÇÏ¿¡ 
 * ºê¶ó¿ìÁ® ¹öÀü °¡Á®¿À±â
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.04.14
 */
function get_version()
{
	var msiestart, msieend, msiestring, msiearray, platform, msieversion ;

	msiestart = (navigator.appVersion.indexOf('(') + 1);
	msieend = navigator.appVersion.indexOf(')');
	msiestring = navigator.appVersion.substring(msiestart, msieend);
	msiearray = msiestring.split(";");
	platform = msiearray[2];
	msieversion = msiearray[1].split(" ");

	version = msieversion[2];

	return version ;

} // end of get_version()

// SELECT¿¡¼­ OnFocus() ÀÌº¥Æ® ½Ã¿¡, ¿ø·¡ °ªÀ» ÀúÀåÇØ µÐ´Ù.
var old_seled_val ;

// selectÀÇ value°¡ "12:1" ÀÏ ¶§, ':'·Î ÀÚ¸¥ µÚ µÚÀÇ ¼ýÀÚ¸¦ ¸®ÅÏ
function get_sel_val( sel )
{
        var temp = sel.options[ sel.selectedIndex].value ;
        var temp_arr ;

        temp_arr = temp.split( ":", 2 ) ;

        return parseInt( temp_arr[1] ) ;

}
// FocusµÉ ¶§, Focus()µÈ changeµÇ±â Àü ¿ø·¡ °ªÀ» ÀúÀå
function set_old_seled_val( focused_sel )
{
        old_seled_val = get_sel_val( focused_sel ) ;

} // end of set_old_seled_val()

/**
 * SELECT¿¡¼­ onChange°¡ ¹ß»ýÇÏ¸é,
 * ¼ø¼­¸¦ º¯°æ ½ÃÅ°±â
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.04.16
 */
function re_order_select_box( frm, seled_sel )
{
        // ¼Ò½º ÄÚµå´Â º¹ÀâÇÏÁö¸¸,
        // ±âº» °³³äÀº °£´Ü.
	// ³»°¡ ÄÚµùÀ» ¸øÇØ¼­.

        // 1.2.3.4.5. ¿¡¼­ 5¸¦ 1·Î º¯°æÇÏ¸é => 2.3.4.5.1. ÀÌ µÈ´Ù.
        // 1.2.3.4.5. ¿¡¼­ 3À» 1·Î º¯°æÇÏ¸é => 2.3.1.4.5. °¡ µÈ´Ù.

        // 1.2.3.4.5. ¿¡¼­ 1À» 5·Î º¯°æÇÏ¸é => 5.1.2.3.4. °¡ µÈ´Ù.
        // 1.2.3.4.5. ¿¡¼­ 2¸¦ 4·Î º¯°æÇÏ¸é => 1.4.2.3.5. °¡ µÈ´Ù.


        // Áï, ¿ø·¡ °ª¿¡¼­ º¯°æµÈ °ª »çÀÌ¿¡ ÀÖ´Â °ªµéÀ»
        // ´õ Å©°Ô ¹Ù²î´ÂÁö ´õ ÀÛ°Ô ¹Ù²î´ÂÁö ÆÄ¾ÇÇØ¼­,
        // ±× »çÀÌÀÇ °ªµéÀ» +1ÇØÁÖ°Å³ª -1 ÇØ ÁØ´Ù.
        var cnt = 0 ;
        var temp = seled_sel.options[ seled_sel.selectedIndex ].value ;
        var temp_arr ;

        var temp_seled_val ; // loop ¾È¿¡¼­ ÀÓÀÇ·Î »ç¿ëÇÒ º¯¼ö

        var seled_val = get_sel_val( seled_sel ) ;

        var direct ;


        // ÇöÀç °ªº¸´Ù Å« °ÍÀ¸·Î Çß´ÂÁö, ÀÛÀº °ÍÀ¸·Î Çß´ÂÁö °áÁ¤

        if( old_seled_val < seled_val )
        {
                direct = 'big' ;
        }
        else if( old_seled_val > seled_val)
        {
                direct = 'small' ;
        }
	
        // selectÀÇ ÀÌ¸§ÀÌ print_order[1] ÀÌ·± ½ÄÀÌ¶ó.
        // ÆûÀÇ ¹è¿­·Î Á¢±ÙÇÏ´Â ¹æ¹ý ÀÌ¿Þ¿£ ¾ø´Ù.
        // »ç½Ç ´Ù¸¥ ¹æ¹ýÀÌ ÀÖÀ»Áöµµ ¸ð¸£°Ú´Âµ¥
        // ³­ ¸ð¸£°Ú´Ù.
        for( cnt = 0 ; cnt < frm.length ; ++cnt )
        {
                if( frm[cnt].name.substr(0, 11) == 'print_order' )
                {
                        temp_seled_val = get_sel_val( frm[cnt] ) ;

                        if( direct == 'big' )
                        // Å« °ÍÀ¸·Î º¯°æ
                        {
                                if( temp_seled_val > old_seled_val && temp_seled_val <= seled_val && ( frm[cnt].name != seled_sel.name ) )
                                // ¹üÀ§ ¾È¿¡ ÀÖÀ¸¸é
                                {
                                        frm[cnt].selectedIndex = frm[cnt].selectedIndex - 1 ;
                                }
                        }
                        else
                        // ÀÛÀº °ÍÀ¸·Î º¯°æ
                        {
                                if( temp_seled_val >= seled_val && temp_seled_val < old_seled_val && ( frm[cnt].name != seled_sel.name ) )
                                // ¹üÀ§ ¾È¿¡ ÀÖÀ¸¸é
                                {
                                        frm[cnt].selectedIndex = frm[cnt].selectedIndex + 1 ;
                                }
                        }
                }
        }

        // old_seled_valÀ» ÇöÀçÀÇ °ªÀ¸·Î º¯°æ.
        // ÇöÀç selÀ» ´Ù½Ã °ªÀ» ¹Ù²Ù¸é,
        // onFocus() ÀÌº¥Æ®°¡ ¾È ¹ß»ýÇÏ¹Ç·Î,
        // ¹«Á¶°Ç old_seled_valÀ» ÇöÀç °ªÀ¸·Î º¯°æÇÑ´Ù.
        set_old_seled_val( seled_sel ) ;

} // end of re_order_select_box()

  function open_share_list( form_name, from_no, no_type, p_opener )
  {
    var param ;

    var opener ; // °øÀ¯ Ã¢¿¡¼­ opener¿¡ µû¶ó¼­
                 // °øÀ¯ Ã¢ÀÇ titleÀÌ ´Ù¸£´Ù.

    if( typeof( p_opener ) != 'undefined' )
    {
      opener = p_opener ;
    }
    else
    {
      opener = '' ;
    }

    param = '/cm/share_list/share_list.php?form_name='+form_name+'&from_no='+from_no + '&no_type='+ no_type + '&opener=' + opener  ;

    var url = "/modal/modal_wrapper.php?url_path=" + escape( param ) ;
	//sp2ÀÏ¶§¿Í ºÐ±â
    if( !is_xpsp2_error() )
    	var mp_option = "status:false; dialogWidth: 515px; dialogHeight: 393px; help:no; status:no;scroll:no; scrollbars:no status:no" ;
	else
		var mp_option = "status:false; dialogWidth: 515px; dialogHeight: 373px; help:no; status:no;scroll:no; scrollbars:no status:no" ;
    if( window.showModelessDialog( url, window, mp_option )  )
    {
    } // end of if()
    else
    // Ãë¼Ò¸¦ ´­·¶À»¸é ¾Ï °Íµµ ¾È ÇÑ´Ù.
    {
    } // end of else

  } // end of share_list ;


/**
 * ÁÖ¹Îµî·Ï ¹øÈ£¸¦ ÀÔ·ÂÇÏ´Â Æû¿¡¼­, È£Ãâ
 * ÆûÀÇ º¯¼ö ÀÌ¸§ÀÌ °íÁ¤ÀÏ ¶§ »ç¿ë
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.04.24
 */
function check_ssn(theForm)
{
	errfound = false;
	
	var str_jumin1 = theForm.jumin1.value;
	var str_jumin2 = theForm.jumin2.value;

	var checkImg='';
	
	var i3=0
	for (var i=0;i<str_jumin1.length;i++)
	{
		var ch1 = str_jumin1.substring(i,i+1);
		if (ch1<'0' || ch1>'9')
		{
			i3=i3+1 
		}
	}

	if( (str_jumin1 == '') || ( i3 != 0 ) )
	{
		theForm.jumin1.focus() ;

		return false ;
	}
	
                 
                
	var i4=0

	for (var i=0;i<str_jumin2.length;i++)
	{
		var ch1 = str_jumin2.substring(i,i+1);
		if (ch1<'0' || ch1>'9')
		{
			i4=i4+1
		}
	}

	if ((str_jumin2 == '') || ( i4 != 0 ))
	{
		theForm.jumin2.focus() ;

		return false ;
	}

	/*
	- 04.07.30 ÇãÁ¤¼ö
	if(str_jumin1.substring(0,1) < 4)
	{
		theForm.jumin2.focus() ;

		return false ;
	}
	*/
	
	/*
	if(str_jumin2.substring(0,1) > 2)
	{
		theForm.jumin2.focus() ;

		return false ;
	}
	*/	
	if((str_jumin1.length > 6) || (str_jumin2.length > 7))
	{
		theForm.jumin2.focus() ;

		return false ;
	}

	if ((str_jumin1 == '72') || ( str_jumin2 == '18'))
	{
		theForm.jumin1.focus() ;

		return false;
	}
	
	var f1=str_jumin1.substring(0,1)
	var f2=str_jumin1.substring(1,2)
	var f3=str_jumin1.substring(2,3)
	var f4=str_jumin1.substring(3,4)
	var f5=str_jumin1.substring(4,5)
	var f6=str_jumin1.substring(5,6)
	var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7
	var l1=str_jumin2.substring(0,1)
	var l2=str_jumin2.substring(1,2)
	var l3=str_jumin2.substring(2,3)
	var l4=str_jumin2.substring(3,4)
	var l5=str_jumin2.substring(4,5)
	var l6=str_jumin2.substring(5,6)
	var l7=str_jumin2.substring(6,7)

	hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5
	hap=hap%11
	hap=11-hap
	hap=hap%10

	if (hap != l7) 
	{
		theForm.jumin1.focus() ;
		return false ;
	}
	
	  
	var i9=0

	return true ;
} // end of check_ssn()

/**
 * Æû¿¡¼­ Ã³¸®ÇÏ´Â°Ô ¾Æ´Ï¶ó,
 * °Á ssn1, ssn2 ¸¦ ÀÔ·ÂÇÏ¸é, true/false¸¸ ¸®ÅÏ
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.04.24
 */
function check_ssn_tf( ssn1, ssn2 )
{
	var ssn ;
	
	errfound = false;
	
	var str_jumin1 = ssn1 ;
	var str_jumin2 = ssn2 ;

	var checkImg='';
	
	var i3=0
	for (var i=0;i<str_jumin1.length;i++)
	{
		var ch1 = str_jumin1.substring(i,i+1);
		if (ch1<'0' || ch1>'9')
		{
			i3=i3+1 
		}
	}

	if( (str_jumin1 == '') || ( i3 != 0 ) )
	{
		return false ;
	}
	
                 
                
	var i4=0

	for (var i=0;i<str_jumin2.length;i++)
	{
		var ch1 = str_jumin2.substring(i,i+1);
		if (ch1<'0' || ch1>'9')
		{
			i4=i4+1
		}
	}
	if ((str_jumin2 == '') || ( i4 != 0 ))
	{
		return false ;
	}

	/* 04.07.30
	 - ÇãÁ¤¼ö
	 */
	/*
	if(str_jumin1.substring(0,1) < 4)
	{
		return false ;
	}
	*/
	
	/*
	if(str_jumin2.substring(0,1) > 2)
	{
		return false ;
	}
	*/	
	if((str_jumin1.length > 6) || (str_jumin2.length > 7))
	{
		return false ;
	}

	if ((str_jumin1 == '72') || ( str_jumin2 == '18'))
	{
		return false;
	}
	
	var f1=str_jumin1.substring(0,1)
	var f2=str_jumin1.substring(1,2)
	var f3=str_jumin1.substring(2,3)
	var f4=str_jumin1.substring(3,4)
	var f5=str_jumin1.substring(4,5)
	var f6=str_jumin1.substring(5,6)
	var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7
	var l1=str_jumin2.substring(0,1)
	var l2=str_jumin2.substring(1,2)
	var l3=str_jumin2.substring(2,3)
	var l4=str_jumin2.substring(3,4)
	var l5=str_jumin2.substring(4,5)
	var l6=str_jumin2.substring(5,6)
	var l7=str_jumin2.substring(6,7)

	hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5
	hap=hap%11
	hap=11-hap
	hap=hap%10

	if (hap != l7) 
	{
		return false ;
	}
	
	  
	var i9=0

	return true ;

} // end of check_ssn_tf()


function isHangul(s) 
{
	var len;

	len = s.length;

	for (var i = 0; i < len; i++)  
	{
		if (s.charCodeAt(i) != 32 && (s.charCodeAt(i) < 44032 || s.charCodeAt(i) > 55203))
		return 0;
	}

	return 1;
} // end of isHangul

function check_space( str )
{
	if( str.indexOf(" ") != -1)
	{
		str = str.replace(/\s/gi, "" );    /* '\s' is white space regular expression */
		return str;
	}
	else
	{
		return "";
	}
}  // end of check_space()

function is_id_format( str )
{
	return ( str.indexOf(" ") == -1 && str.replace( /^[a-z0-9_]{0,16}$/, "" ) == "" ) ;
}
function valid_id( str )
{
	/* check whether input value is included space or not  */
	var retVal = check_space( str );

	if( retVal != "" )
	{
		alert("¾ÆÀÌµð´Â ºó °ø°£ ¾øÀÌ ¿¬¼ÓµÈ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
		return 0;
	}

	/* checkFormat  */
	var isID = /^[a-z0-9_]{4,16}$/;
	if( !isID.test(str) )
	{
		alert("¾ÆÀÌµð´Â 4~16ÀÚÀÇ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
		return 0;
	}

	return 1;

} // end of valid_id()

/**
 * formÀÇ º¯¼ö °ªÀÌ, not_expect_val°ú °°À¸¸é alert(err_msg)¸¦ Ãâ·ÂÇÏ°í
 * elem.focus()¸¦ ½ÇÇà
 * elemÀº elementÀÇ ¾àÀÚ
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.04.22
 */
function check_form_var( elem, not_expect_val, err_msg )
{
	if( elem.value == not_expect_val )
	{
		alert( err_msg ) ;
		elem.focus() ;

		return false ;
	}

	return true ;

} // end of check_form_var()

/**
 * date1 < date2 : return -1
 * date1 = date2 : return 0 
 * date1 > date2 : return 1
 * @author : ÇãÁ¤¼ö <wertyu@ufamily.co.kr>
 * @date : 2004.05.04
 */
function date_diff( date1, date2 )
{
	var str1 = new String( date1 ) ;
	var str2 = new String( date2 ) ;

	var arr1, arr2 ;

	arr1 = str1.split( "-" ) ;
	arr2 = str2.split( "-" ) ;
	
	arr1[0] = parseInt( arr1[0], 10 ) ;
	arr1[1] = parseInt( arr1[1], 10 );
	arr1[2] = parseInt( arr1[2], 10 );

	arr2[0] = parseInt( arr2[0], 10 );
	arr2[1] = parseInt( arr2[1], 10 );
	arr2[2] = parseInt( arr2[2], 10 );
	
	if( arr1[0] < arr2[0] )
	{
		return -1 ;
	}
	else if( arr1[0] == arr2[0] && arr1[1] < arr2[1] )
	{
		return -2 ;
	}
	else if( arr1[0] == arr2[0] && arr1[1] == arr2[1] && arr1[2] < arr2[2] )
	{
		return -3 ;
	}
	else if( arr1[0] == arr2[0] && arr1[1] == arr2[1] && arr1[2] == arr2[2] )
	{
		return 0 ;
	}
	
	return 1 ;
} // end of date_diff()

/**
 *  Å½»ö±â ¿ÀÇÂ ½ÃÅ°±â
 */
function control_uploader_open( control_id )
{
	control_id.OpenFileDialog() ;
} // end of control_upload_open()

/**
 * ÀüÃ¼ ¼±ÅÃ
 */
function control_uploader_select_all( control_id )
{
	control_id.SelectAllItems() ;
} // end of control_upload_select_all()

/**
 * ¼±ÅÃµÈ ÆÄÀÏ Áö¿ì±â
 */
function control_uploader_del( control_id )
{
	control_id.DeleteSelectedItem() ;
} // end of control_upload_del()

/**
 * Ã·ºÎµÈ ÆÄÀÏ °³¼ö °¡Á®¿À±â
 */
function control_uploader_get_cnt( control_id )
{
	return control_id.FileCount ;
} // end of control_uploader_get_cnt()

/**
 * Ã·ºÎµÈ ÆÄÀÏ ÀÌ¸§ °¡Á®¿À±â
 * ÆÄÀÏÀº 1¹ø ºÎÅÍ ½ÃÀÛ 
 */
function control_uploader_get_filename( control_id, idx )
{
	return control_id.GetFileName( idx ) ;
} // end of control_uploader_get_filename()

/**
 * »èÁ¦µÈ ÆÄÀÏ °³¼ö °¡Á®¿À±â
 */
function control_uploader_del_cnt( control_id )
{
	return control_id.DeletedFileIDCount ;

} // end of control_uploader_del_cnt()

/**
 * »èÁ¦µÈ ÆÄÀÏ id¸¦ °¡Á®¿À±â
 */
function control_uploader_del_list( control_id, i )
{
	return control_id.GetDeletedFileID( i ) ;
} // end of control_uploader_del_list()

function open_ud( img_path, caller )
{
	// 1. img_path¸¦ escape() ÇØ ÁÖ±â
	var org_path ;
	
	org_path = escape( img_path ) ;

	window.open( 'http://' + DOMAIN + '/cm/ud/ud.php?caller='+caller+'&org_path='+org_path, 'UltraDrawing', 'width=1024, height=708, scrollbars=no, left=0, top=0');
} // end of open_ud()

/**
 * C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\uf82.png
 * ·ÎºÎÅÍ uf82.png¸¦ °¡Á®¿À±â
 */
function get_filename_src( src )
{
	var tmp = src.split( "\\" ) ;
	var cnt = count( tmp ) ;

	return tmp[cnt-1] ;
} // end of get_filename_src()

function send_image_phone_link( hostname, img_src )
{
	sendimg.host.value = hostname ;
	sendimg.img.value = img_src ;
	sendimg.com.value  = 'ufamily' ;

	window.open("","photo","width=706,height=685,status=no");
	sendimg.target="photo";
	sendimg.action="http://www.photoyo.com/pmail/pmail.jsp";
	sendimg.submit();
}


function jumin_next(elem1,elem2,size)
{     // ÁÖ¹Î¹øÈ£ valid check , ÀÚµ¿ ´ÙÀ½ Æû ÀÌµ¿

   num = elem1.value ;
   siz = num.length;
   numFlag = Number(num);
   if(!numFlag && siz > 1 && num != '00' &&  num != '000'){
         alert('¼ýÀÚ¸¦ ³Ö¾îÁÖ¼¼¿ä');
	 elem1.focus() ;
         return false;
   }

   if(siz == size){
	  elem2.focus() ;
	  return true;
   }

} // end of next()

function get_txt_length( str )
{
	var curText ;
	var strLen ;
	var byteIs ;
	var lastByte ;
	var thisChar ;
	var escChar ;

	curText = new String( str ) ;
	strLen = curText.length ;

	byteIs = 0 ;

        for(i=0; i<strLen; i++)
        {
                thisChar = curText.charAt(i);
                escChar = escape(thisChar);

                if (escChar.length > 4)
                {
                        byteIs += 2;
                }
                else
                {
                        byteIs += 1;
                }
                lastByte = byteIs;
        }

	return lastByte ;

} // end of get_txt_length()

function set_text_len( elem, len )
{
	var txt = elem.value ;
	var txt_len = get_txt_length( txt ) ;

	len = parseInt( len ) ;
	if( parseInt( txt_len ) > parseInt( len ) )
	{
		alert('ÃÖ´ë ' + len + '±ÛÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù ^^' ) ;
		elem.value = my_substr( txt, len ) ;
	}

} // end of set_text_len()

/**
 * ÇÑ±ÛÀ» °í·ÁÇÑ substring()
 * @author : ÇãÁ¤¼ö
 * @date   : 2004.07.15
 */
function my_substr( txt, len )
{
        var curText;
        var strLen;
        var byteIs;
        var lastByte;
        var thisChar;
        var escChar;

        curText = new String(txt);
        strLen = curText.length;
        byteIs = 0;

        for(i=0; i<strLen; i++)
        {
                thisChar = curText.charAt(i);
                escChar = escape(thisChar);

                if (escChar.length > 4)
                {
                        byteIs += 2;
                }
                else
                {
                        byteIs += 1;
                }

                if (byteIs > len)
		// ´õ Å©¸é, Áö±Ý µ· °Å ±îÁö¸¸ return
                {
                        thisText = curText.substring(0, i);
                        byteIs = lastByte;

			return thisText ;
                        break;
                }

                lastByte = byteIs;
        }

	return txt ;

} // end of my_substr()

//
// rect_w, rect_h : ÀÌ¹ÌÁö°¡ º¸¿©Áú ºÎºÐ »ç°¢ÇüÀÇ width, height
// img_w, img_h   : ÀÌ¹ÌÁöÀÇ width, height
// return         : new_w:new_h
function get_size_img( rect_w, rect_h, img_w, img_h )
{
	var new_w, new_h ;

	if( img_w <= rect_w && img_h <= rect_h )
	// width, height ¸ðµÎ Å« °æ¿ì
	// width¿¡ °íÁ¤
	{
		new_w = img_w ;
		new_h = img_h ;
	}
	else if( img_w / img_h > rect_w / rect_h )
	// °¡·Î ºñÀ²ÀÌ ´õ Å« °æ¿ì.
	{
		new_w = rect_w ;
		new_h = img_h * ( new_w / img_w ) ;
	}
	else 
	// ¼¼·Î ºñÀ²ÀÌ ´õ Å« °æ¿ì.
	{
		new_h = rect_h ;
		new_w = img_w * ( new_h / img_h ) ;
	}

	return new_w + ":" + new_h ;

} // end of get_size_img()

/**
 * ºí·Ï, °¡Á· È¨ÇÇ µî¿¡¼­ 
 * POPup ÇüÅÂ·Î ¶ß´Â ·Î±ä Ã¢
 * @author : ÇãÁ¤¼ö
 * @date : 2004.07.06
 */
function go_pop_login()
{
	window.open('/user/pop_login/pop_login_f.php','pop_login','width=440,height=380')
} // end of go_pop_login()

/**
 * user_id¿¡°Ô ÂÊÁö º¸³»±â
 * @author : ÇãÁ¤¼ö
 * @date : 2004.07.08
 */
function go_memo( user_no )
{
	window.open('/ro/memo/send_f.php?from=quick&no_list='+user_no,'','width=430px,height=260px')
} // end of go_memo()

function go_guest_folder( user_dom, user_id )
{
	window.open( "http://webfolder."+user_dom + "/template/mail.ufamily.co.kr/t_login_web_folder_guest.html?user_id=" +user_id , "", 'status=yes,toolbars=no,width=1011,height=703,resizable=yes') ;
}

function go_webfolder()
{
	var user_dom = getCookie( "USER_DOM" ) ;

	window.open( "http://webfolder." + user_dom + "/servlet/login?_route=web_folder" , "", 'status=yes,toolbars=no,width=1011,height=703,resizable=yes') ;
}

function setCookie( name, value, expiredays ) 
{ 
        var todayDate = new Date(); 
        todayDate.setDate( todayDate.getDate() + expiredays ); 
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 

} // end of setCookie()

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 "";

} // end of getCookie()

// ¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ´Â ÇÊµå¿¡¼­
// keyPress ÀÌº¥Æ® ½Ã¿¡ È£ÃâÇØ ÁÖ¸é
// ¼ýÀÚ¸¸ ÀÔ·ÂÇÏµµ·Ï ÇØ ÁØ´Ù.
function only_digit()
{
	var key = window.event.keyCode ;
	if( key < 48 || key > 57 )
	{
		event.returnValue = false ;
	}
} // end of only_digit()

// °Ô½Ã¹° »èÁ¦½Ã ÆË¾÷Ã¢À» ¿ÀÇÂÇÏ¿© ºñ¹Ð¹øÈ£¸¦ ÀÔ·Â ¹Þ´Â´Ù.
function open_pop_del(frm_name, cmt_no)
{
	window.open('/cm/pop_del.php?form='+frm_name+'&cmt_no='+cmt_no,'pop_del','width=265,height=180');
} // end open_pop_del()

function open_charge_point( from )
{
	var obj = window.open('/li/manage/ec/charge_point.php?from=' + from,'charge_point', "width=440,height=340,scrollbars=auto");
	obj.focus() ;
}
// À¯ÆÔ ¸Ó´Ï ÃæÀü Ã¢ ¶ç¿ì±â
function open_charge_win( mode )
{
	// mode : C = ÃæÀü¸¸
	//      : P = ¹º°¡ °áÁ¦ÇÒ °Ô ÀÖÀ» ¶§ °áÁ¦µµ °°ÀÌ º¸¿©ÁÖ±â
	if( typeof( mode ) == 'undefined' )
		mode = 'C' ;
	
	var charge_win ;
	var options = "" ;
	
	if( mode == 'C' )
	{
		options = "width=420,height=580" ;
	}
	else if( mode == 'P' )
	{
		options = "width=440,height=576,scrollbars=yes" ;
	}
	else
	{
		options = "width=420,height=580" ;
	}

		
	charge_win = window.open('/li/manage/ec/charge_f.php?mode=' + mode,'charge_win', options);

	charge_win.focus() ;

} // end of open_charge_win()

/**
 * ±â°£ º° SMS °Å·¡ ³»¿ª º¸±â
 * @author : ÇãÁ¤¼ö <wertyu@ufam.co.kr>
 * @date : 2004.10.28
 */
function open_sms_send_list()
{

	var sms_win ;
	var s_y, s_m, s_d ;
	var e_y, e_m, e_d ;

	var param = '' ;

	if( typeof( document.frm ) != 'undefined' )
	{
		if( typeof( document.frm.s_y ) != 'undefined' ) 
		{
			s_y = document.frm.s_y.value ;
			s_m = document.frm.s_m.value ;
			s_d = document.frm.s_d.value ;

			e_y = document.frm.e_y.value ;
			e_m = document.frm.e_m.value ;
			e_d = document.frm.e_d.value ;

			param = "real_click=T&s_y=" + s_y + "&s_m=" + s_m + "&s_d=" + s_d + "&e_y=" + e_y + "&e_m=" + e_m + "&e_d=" + e_d ;
		}

	}

	options = "width=440,height=400" ;
		
	sms_win = window.open('/li/manage/ec/sms_list.php?' + param, 'sms_win', options);

} // end of open_sms_send_list()

/**
 * ±â°£ º° ÀÎÅÍ³ÝÆù °Å·¡ ³»¿ª º¸±â
 * @author : ÇãÁ¤¼ö <wertyu@ufam.co.kr>
 * @date : 2004.10.28
 */
function open_iphone_send_list()
{

	var voip_win ;
	var s_y, s_m, s_d ;
	var e_y, e_m, e_d ;

	var param = '' ;

	if( typeof( document.frm ) != 'undefined' )
	{
		if( typeof( document.frm.s_y ) != 'undefined' ) 
		{
			s_y = document.frm.s_y.value ;
			s_m = document.frm.s_m.value ;
			s_d = document.frm.s_d.value ;

			e_y = document.frm.e_y.value ;
			e_m = document.frm.e_m.value ;
			e_d = document.frm.e_d.value ;

			param = "real_click=T&s_y=" + s_y + "&s_m=" + s_m + "&s_d=" + s_d + "&e_y=" + e_y + "&e_m=" + e_m + "&e_d=" + e_d ;
		}

	}

	options = "width=470,height=410,scrollbars=yes" ;
		
	voip_win = window.open('/li/manage/ec/iphone_list.php?' + param, 'voip_win', options);

} // end of open_sms_send_list()

/**
 * ¿ë·® º¯°æ ³»¿ª Á¶È¸ Ã¢ ¶ç¿ì±â
 * @author : ÇãÁ¤¼ö <wertyu@ufam.co.kr>
 * @date : 2004.11.02
 */
function open_quota_change_list()
{

	var quota_win ;
	var s_y, s_m, s_d ;
	var e_y, e_m, e_d ;

	var param = '' ;

	if( typeof( document.frm ) != 'undefined' )
	{
		if( typeof( document.frm.s_y ) != 'undefined' ) 
		{
			s_y = document.frm.s_y.value ;
			s_m = document.frm.s_m.value ;
			s_d = document.frm.s_d.value ;

			e_y = document.frm.e_y.value ;
			e_m = document.frm.e_m.value ;
			e_d = document.frm.e_d.value ;

			param = "real_click=T&s_y=" + s_y + "&s_m=" + s_m + "&s_d=" + s_d + "&e_y=" + e_y + "&e_m=" + e_m + "&e_d=" + e_d ;
		}

	}

	options = "width=440,height=400" ;
		
	quota_win = window.open('/li/manage/quota/quota_change_list.php?' + param, 'quota_win', options);

} // end of open_quota_change_list()

/**
 * °íÈñÇö. 04.11.03
 */
function open_quick()
{
        go_agent_login(agent_login);
}

function is_xpsp2()
{
  var strVerStr = window.navigator.appVersion ;
  var arrVerStr = strVerStr.split('; ');
  if (arrVerStr.length >= 3)
  {
    // arrOsVer Example
    // Windows NT 5.1
    var arrOsVer = arrVerStr[2].split(' ');
    if (arrOsVer.length >= 3 && arrOsVer[0] == "Windows")
    {
      var osVerNum = new Number(arrOsVer[2]);
      // »õ·Î¿î Windows Version ³ª¿Ã¶§ ¼öÁ¤ÇÊ¿ä
      if (  (osVerNum >= 5.1 && strVerStr.indexOf("SV1") >= 35 ) || arrOsVer[2] == '5.1)' )
        return true;
    }
  }
  return false;

	var strVerStr = window.navigator.appVersion;
	var arrVerStr = strVerStr.split('; ');

	if( arrVerStr.length >= 4 )
	{
		var arrOsVer = arrVerStr[2].split(' ');

		if( arrOsVer.length >= 3 && arrOsVer[0] == "Windows" )
		{
			var osVerNum = new Number(arrOsVer[2]);

			if( osVerNum >= 5.1 && strVerStr.indexOf("SV1") >= 35 ) 

				return true;
		}
	}

	return false;

} // end of is_xpsp2()

/**
 * login ÆäÀÌÁö¿¡¼­¸¸ ¾µ ¼ö ÀÖÀ½
 */
function is_xpsp2_error()
{
	// Äü ¼­ºñ½ºÀÇ °æ¿ì, update=no·Î ³Ñ¾î ¿À±â ¶§¹®¿¡
	// OBJECT Tag°¡ ¾ø´Ù.
	// µû¶ó¼­, UltraLiveUpdate°¡ ¾Æ¿¹ ¾ø¾î¼­,
	// undefinedÀÌ¹Ç·Î,
	// false¸¦ return
	if( typeof( Uploader ) == 'undefined' )
	{
		return false ;
	}
	if( typeof( RemoteAgent ) == 'undefined' )
	{
		return false ;
	}

	var obj_type1 = typeof( Uploader.SelectAllItems ) ;
	var obj_type2 = typeof( RemoteAgent.IsAgentLoggedIn ) ;
	//var obj_type3 = typeof( UltraLiveUpdate.UpdateAx ) ;
	if( obj_type1 == 'undefined' || obj_type2 == 'undefined' )
	{
		if( is_xpsp2() )
		{
			return true ;
		}
	}

	return false ;
} // end of is_error()

function is_xpsp2_error_news()
{
	var obj_type1 = typeof( document.NewsEditor.IsEmpty ) ;
	
	if( obj_type1 == 'undefined' )
	{
		if( is_xpsp2() )
		{
			return true ;
		}
	}

	return false ;
} // end of is_error()
/*½Å±Ô ¸ÞÀÎ °ü·Ã ½ºÅ©¸³Æ® ½ÃÀÛ*/


/************** ³» ¼­Àç¿ë **************/
function getStrCheck(str, maxLen)
{ 
	var len=0, j; 

	for (i=0, j=str.length;i<j;i++, len++) 
	{ 
		if ( (str.charCodeAt(i)<0)||(str.charCodeAt(i)>127) )
		{ 
			len = len+1; 
		} 

		if (len >= maxLen) 
		{ 
			alert('ÃÖ´ë '+maxLen+' Bytes ¸¦ ³ÑÀ» ¼ö ¾ø½À´Ï´Ù.'); 
			try
			{
				document.frm.title.value=str.substring(0,i); 
				document.frm.title.focus(); 
				return; 
			}
			catch(e)
			{
				return ;
			}
		}
	}
}


/************** °¢Á¾¸µÅ© **************/
//¿ì¸®¼¥¿¡ SSO¸µÅ©
function go_woorishop_sso( url )
{
	var obj_ifrm = document.createElement( 'iframe' ) ;
	obj_ifrm.style.left = '0px' ;
	obj_ifrm.style.top = '0px' ;
	obj_ifrm.width = '0' ;
	obj_ifrm.height = '0' ;
	obj_ifrm.style.zIndex = '1' ;
	obj_ifrm.src = '/cp/ubcity/shop/redirect_out.php?mode=sso' ;
	document.body.appendChild( obj_ifrm ) ;
}
//ÆÐ½º¿öµå Ã£±â
function go_find_id()
{
	obj = window.open('/office/find_account/id_01.php', 'win_id', 'scrollbars=yes,status=yes,width=866,height=600') ;
	obj.focus() ;
}
//ºñ¹Ð¹øÈ£ Ã£±â
function go_find_pw()
{
	obj = window.open('/office/find_account/pw_01.php', 'win_id', 'scrollbars=yes,status=yes,width=866,height=600') ;
	obj.focus() ;
}
//À¯ÆÐ¹Ð¸® ¸ÞÀÎ
function go_ufamily_main()
{
	var obj = window.open( "/","ufam_index" ) ;
	obj.focus() ;
}
//¹ÂÁ÷¼¥ ¸ÞÀÎ
function go_music_shop()
{
	var obj = window.open( "/bgm/","ufam_index" ) ;
	obj.focus() ;
}
//À¯ÆÐ¹Ð¸® °¡ÀÔ
function go_ufamily_regist( recom_id )
{
	if ( !recom_id ) recom_id = '' ;
	var obj = window.open( "/user/regist_ufam/reg_step1_1.php?recom_id=" + recom_id,"ufam_index" ) ;
	obj.focus() ;
}
//³»¹æ¹æ¹®
function visit_ro(owner, cmd)
{
	var cmd = (cmd) ? cmd : "" ;
	var owner = (owner) ? owner : "" ;
	var obj = window.open( "http://" + DOMAIN + "/ro/?owner="+owner+"&cmd="+cmd, "ufam_main", "width=1011,height=703,scroolbars=no,toolbars=no,resizable=no,titlebar=no,status=yes");
	obj.focus() ;
}
//°Å½Ç¹æ¹®
function visit_li(owner, cmd)
{
	var cmd = (cmd) ? cmd : "" ;
	var owner = (owner) ? owner : "" ;
	var obj = window.open( "http://" + DOMAIN + "/li/?owner="+owner+"&cmd="+cmd, "ufam_main", "width=1011,height=703,scroolbars=no,toolbars=no,resizable=no,titlebar=no,status=yes");
	obj.focus() ;
}
//À¯ÆÔTV ¸µÅ©
function go_utv()
{
	var utv_url = window.open( "/ma/utv/utv_main.php","ufam_index" ) ;
	utv_url.focus() ;
}
/************** °¢Á¾¸µÅ© **************/


//ÇÃ·¡½Ã ¸Þ´º ½ºÅ©¸³Æ®
function go_page2(num){
	var page_str = new Array();
	page_str[0]= "/index.php";
	page_str[1]= "/ma/html/whatufam01.php";
	//page_str[2]= "Ä«Æä";
	//page_str[3]= "¼îÇÎ¸ô";
	if(num != '2' && num != '3'){
		location.href = page_str[num];
	}
	if(num == '3'){
		go_ubcity()
	}
}
// ¸ÞÀÎ ÇÃ·¹½Ã ¸µÅ©
function main_menu_uf(num){
	var page_str = new Array();
	page_str[0]= "/";
	page_str[1]= "/ma/html/whatufam01.php";//À¯ÆÐ¹Ð¸®¶õ?
	page_str[2]= "http://cafe.ufamily.co.kr";//Ä«Æä
	page_str[3]= "/bgm/";//¹ÂÁ÷¼¥
	
	if(num == '2'){
		var obj = window.open(page_str[num],'','');
		obj.focus();
		return;
	}
	location.href = page_str[num];
}
//¸ÞÀÎ INPUT BOX¹è°æ
function chk_idname2(){
	if(document.frm.id.value==''){
		document.frm.id.style.backgroundImage="url('/images/index/bg_id.gif')";
	}
}
function chk_pwname2(){
	if(document.frm.passwd.value==''){
		document.frm.passwd.style.backgroundImage="url('/images/index/bg_pw.gif')";
	}
} 

//·¹ÀÌ¾î À§Ä¡ °ü·Ã ½ºÅ©¸³Æ®
function reset_layer(){
	layer_height = document.all.layer_doc.scrollHeight;	
	document.all.bg_layer.style.height = layer_height;
}

//ÀÌ¸ÞÀÏ ÁÖ¼Ò ¹«´Ü¼öÁý °ÅºÎ 
function open_emailnot(){
	email_not = window.open("/ma/html/pop_emailnot.html","pop_email","width=520,height=180,scrollbars=no");
	email_not.focus();
}

//BestUFAM
function what_best(){
	best_not = window.open("/ma/html/pop_best.html","pop_best","width=450,height=645,scrollbars=no");
	best_not.focus();
}

//»õ³»±â ·¹º§¿Õ
function what_newking(){
	level_not = window.open("/ma/html/pop_what_level.html","pop_level","width=450,height=559,scrollbars=no");
	level_not.focus();
}

//È­¸ñÁö¼ö¿Õ
function what_happy(){
	happy_not = window.open("/ma/html/pop_what_happy.html","pop_happy","width=450,height=559,scrollbars=no");
	happy_not.focus();
}

//¿À´ÃÀÇ ¾Ù¹ü ½ÅÃ»
function apply_album(){
	screen_w=screen.availWidth;
	screen_h=screen.availHeight;
	screen_h2 = screen_h-10;
	popWidth = 344;
	popHeight = 436;
	popLeft=(screen_w-popWidth)/2;
	popTop=(screen_h-popWidth)/2;
	apply_ab = window.open("/ma/aotd/apply_f.php","pop_ab","width="+popWidth+",height="+popHeight+",left="+popLeft+",top="+popTop+",scrollbars=no");
	apply_ab.focus();
}

//»õ·Î¿î °¡Á· ½Å¹® ½ÅÃ»
function apply_np(){
	screen_w=screen.availWidth;
	screen_h=screen.availHeight;
	screen_h2 = screen_h-10;
	popWidth = 400;
	popHeight = 500;
	popLeft=(screen_w-popWidth)/2;
	popTop=(screen_h-popWidth)/2;
	apply_np = window.open("pop_apply_np.html","pop_np","width="+popWidth+",height="+popHeight+",left="+popLeft+",top="+popTop+",scrollbars=no");
	apply_np.focus();
}
/*½Å±Ô ¸ÞÀÎ °ü·Ã ½ºÅ©¸³Æ® ³¡*/

//½ºÆ®¸µ => html·Î ÀÌ¿Ã¶ó½º ÆÐÄ¡ ¿ë
function html2obj( html, obj )
{
	obj.innerHTML = html ;
}

//ÀÌº¥Æ® µî·Ï ÇÔ¼ö
function obj2evt2func( obj, evt_name, func_name )
{
	if ( !obj ) return ;
	var evt_name = ( document.all ) ? evt_name : evt_name.substring( 2, evt_name.length ) ;
	if ( document.all )
	{
		obj.attachEvent( evt_name, eval(func_name) ) ;
	}
	else
	{
		obj.addEventListener( evt_name, eval(func_name), true ) ;
	}
}
//ÀÌº¥Æ® Á¦°Å ÇÔ¼ö
function obj2evt2func_delete( obj, evt_name, func_name )
{
	if ( !obj ) return ;
	var evt_name = ( document.all ) ? evt_name : evt_name.substring( 2, evt_name.length ) ;
	if ( document.all )
	{
		obj.detachEvent( evt_name, eval(func_name) ) ;
	}
	else
	{
		obj.removeEventListener( evt_name, eval(func_name), true ) ;
	}
}

//¸ðÁú¶ó¿¡¼­ ÀÌº¥Æ® °´Ã¼ ÂüÁ¶ÇÏ±â ½±µµ·Ï
//set_moz_event( ["click", "mousemove"] )
function set_moz_event( array_moz_evt_name )
{
	if ( !document.all )
	{
		for (var i = 0; i < array_moz_evt_name.length; i++)
		{
			document.addEventListener( array_moz_evt_name[i], function (e) {window.event = e;}, true) ;
		}
	}
}
//set_moz_event( ["keypress", "keydown"] ) ;

function get_layer_posy_inbox( box_width, layer_width, event_x )
{
	if ( box_width - layer_width - event_x <= 0 )
	{
		x = event_x - layer_width - 10 ;
	}
	else
		x = event_x + 10 ;
	return x + 10 ;
}
function get_layer_posx_inbox( box_height, layer_height, event_y )
{
	if ( box_height - layer_height - event_y <= 0 )
	{
		y = box_height - layer_height - 10 ;
	}
	else
		y = event_y - 10 ;
	return y ;
}
function get_pos_w2x( width )
{
	var layer_w = width ;
	var screen_w = document.body.offsetWidth + document.body.scrollLeft ;
	var base_x = event.clientX + document.body.scrollLeft ;
	if ( screen_w - base_x - layer_w <= 0 )
	{
		x = screen_w - layer_w - 10 ;
	}
	else
		x = base_x ;
	return x + 10 ;
}
function get_pos_h2y( height )
{
	var layer_h = height ;
	var screen_h = document.body.offsetHeight + document.body.scrollTop ;
	var base_y = event.clientY + document.body.scrollTop ;
	if ( screen_h - base_y - layer_h <= 0 )
	{
		y = screen_h - layer_h - 5 ;
	}
	else
		y = base_y ;
	return y + 5 ;
}


//¸ðÁú¶ó¿ë °ø¿ë ÀÌº¥Æ® Ã³¸®
set_moz_event( [ 'mousedown', 'click', 'mouseup' ] ) ;

//°ø¿ëCSS ¸µÅ©(ÀÓ½Ã:2006-07 Á¤¼ö¿µ)
function uf_common_css_link()
{
	con = '<link href="/css/uf_common.css" rel="stylesheet">';
	document.write(con);
}
uf_common_css_link() ;

//À¯ÀúÀÌ¸§ ¸Þ´º °øÅë
var UF_USER_MENU = {
	init : function ()
	{
		this.init_html_action() ;
		this.init_html_menu() ;
		this.user_no = '' ;
		this.ufam_no = '' ;
		this.is_menu_over = false ;
		//this.set_moz_event( [ 'onmousedown' ] ) ;
		this.is_init = true ;
		//alert(document.doctype.systemId );
		//dtdÃß°¡ÇßÀ» ¶§µµ ½ºÅ©·Ñ¹Ù¸¦ ¹«½ÃÇÑ ¼¼·Î »çÀÌÁî¸¦ Á¦¾îÇØ¾ßÇÏ¹Ç·Î
		//ÇØ´çÆäÀÌÁöÀÇ css¶Ç´Â ÀÌ°÷¿¡¼­ ´ÙÅ¥¸ÕÆ® ¼¼·Î¼Ó¼ºÀÇ Á¶ÀýÀÌ ÇÊ¿äÇÔ
		document.getElementsByTagName( 'html' )[0].style.height = '100%' ;
		document.getElementsByTagName( 'body' )[0].style.height = '100%' ;
	},
	init_html_action : function ()
	{
		this.html_action = document.createElement( 'IFRAME' ) ;
		this.html_action.src = 'about:blank' ;
		this.html_action.width = 0 ;
		this.html_action.height = 0 ;
		this.html_action.frameBorder = 'no' ;
		this.html_action.scrolling = 'no' ;
		document.body.appendChild( this.html_action ) ;
	},
	init_html_menu : function ()
	{
		this.html_menu = document.createElement( 'div' ) ;
		this.html_menu.style.position = 'absolute' ;
		this.html_menu.style.left = 0 ;
		this.html_menu.style.top = 0 ;
		this.html_menu.style.zIndex = 200000 ;
		this.html_menu.innerHTML = this.str_html_menu() ;
		document.body.appendChild( this.html_menu ) ;
		this.obj2evt2func( this.html_menu, 'onmouseover', 'UF_USER_MENU.menu_over' ) ;
		this.obj2evt2func( this.html_menu, 'onmouseout', 'UF_USER_MENU.menu_out' ) ;
	},
	name_write : function ( user_name, css_name, user_no, ufam_no )
	{
		if ( !css_name ) css_name = 'uf_user_name1' ;
		if ( !user_no ) user_no = '' ;
		if ( !ufam_no ) ufam_no = '' ;
		var con = '<a onClick="UF_USER_MENU.on( \''+user_no+'\', \''+ufam_no+'\' ); return false;" href="#" class="' + css_name + '">'+user_name+'</a>';
		document.write(con);
		return false ;
	},
	menu_over : function ()	{ UF_USER_MENU.is_menu_over = true ; },
	menu_out : function ()	{ UF_USER_MENU.is_menu_over = false ; },
	on : function ( user_no, ufam_no )
	{
		if ( !this.is_init ) this.init() ;
		this.html_menu.style.left = '-1000px' ;
		this.html_menu.style.top = '-1000px' ;
		this.html_menu.style.display = 'block' ;
		var x = this.get_pos_w2x( this.html_menu.offsetWidth ) ; //94
		var y = this.get_pos_h2y( this.html_menu.offsetHeight ) ; //116
		this.html_menu.style.left = x + 'px' ;
		this.html_menu.style.top = y + 'px' ;
		this.obj2evt2func( document, 'onmousedown', 'UF_USER_MENU.off_by_doc' ) ;
		if ( user_no ) this.user_no = user_no ;
		if ( ufam_no ) this.ufam_no = ufam_no ;
	},
	off : function ()
	{
		this.html_menu.style.display = 'none' ;
		this.obj2evt2func_delete( document, 'onmousedown', 'UF_USER_MENU.off_by_doc' ) ;
	},
	off_by_doc : function ()
	{
		if ( !UF_USER_MENU.is_menu_over ) UF_USER_MENU.off() ;
	},
	ex : function ( mode )
	{
		if ( !this.user_no )
		{
			alert( 'Á¤º¸°¡ ¾ø½À´Ï´Ù' ) ;
			return ;
		}
		else if ( !mode )
		{
			return ;
		}
		var str_param = 'user_no=' + this.user_no + '&ufam_no=' + this.ufam_no + '&mode=' + mode ;
		if ( document.domain == 'test.ufamily.co.kr' )
			this.html_action.src = 'http://test.ufamily.co.kr/cm/cm_name2redirect.php?' + str_param ;
		else
			this.html_action.src = 'http://www.ufamily.co.kr/cm/cm_name2redirect.php?' + str_param ;
		this.off() ;
	},
	str_html_menu : function ()
	{
		var html = "";
		html +='<table style="text-align:left" width="94" cellpadding="0" cellspacing="0" onmouseover="DIV_UF_REDIRECT_BOX_ON=true" onmouseout="DIV_UF_REDIRECT_BOX_ON=false">\
				<tr>\
					<td style="background:url(/images/bit-layer01.gif) no-repeat; height:2px;"></td>\
				</tr>\
				<tr>\
					<td style="background:url(/images/bit-layer02.gif) repeat-y; padding:5px 4px 5px 2px;">\
						<table width="100%" cellpadding="0" cellspacing="0">\
						<tr>\
							<td style="padding:3px 0 0 13px;; cursor:pointer;" onmouseover="this.style.background=\'#D7D7D7\'" onmouseout="this.style.background=\'#fff\'"><a href="#" onclick="UF_USER_MENU.ex( \'li_visit\' ); return false;" style="font:12px gulim; color:#1A1A1A; text-decoration:none;">°Å½Ç¹æ¹®</a></td>\
						</tr>\
						<tr>\
							<td height="2"></td>\
						</tr>\
						<tr>\
							<td style="padding:3px 0 0 13px; cursor:pointer;" onmouseover="this.style.background=\'#D7D7D7\'" onmouseout="this.style.background=\'#fff\'"><a href="#" onclick="UF_USER_MENU.ex( \'ro_visit\' ); return false;" style="font:12px gulim; color:#1A1A1A; text-decoration:none;">³»¹æ¹æ¹®</a></td>\
						</tr>\
						<tr>\
							<td height="2"></td>\
						</tr>\
						<tr>\
							<td style="padding:3px 0 0 13px; cursor:pointer;" onmouseover="this.style.background=\'#D7D7D7\'" onmouseout="this.style.background=\'#fff\'"><a href="#" onclick="UF_USER_MENU.ex( \'friend_request\' ); return false;" style="font:12px gulim; color:#1A1A1A; text-decoration:none;">Ä£±¸½ÅÃ»</a></td>\
						</tr>\
						<tr>\
							<td height="5"></td>\
						</tr>\
						<tr>\
							<td style="height:1px; background:url(/images/dot-layer.gif) repeat-x;"></td>\
						</tr>\
						<tr>\
							<td height="5"></td>\
						</tr>\
						<tr>\
							<td style="padding:3px 0 0 13px; cursor:pointer;" onmouseover="this.style.background=\'#D7D7D7\'" onmouseout="this.style.background=\'#fff\'"><a href="#" onclick="UF_USER_MENU.ex( \'memo_send\' ); return false;" style="font:12px gulim; color:#1A1A1A; text-decoration:none;">ÂÊÁöº¸³»±â</a></td>\
						</tr>\
						<tr>\
							<td height="2"></td>\
						</tr>\
						<tr>\
							<td style="padding:3px 0 0 13px; cursor:pointer;" onmouseover="this.style.background=\'#D7D7D7\'" onmouseout="this.style.background=\'#fff\'"><a href="#" onclick="UF_USER_MENU.ex( \'sms_send\' ); return false;" style="font:12px gulim; color:#1A1A1A; text-decoration:none;">SMSº¸³»±â</a></td>\
						</tr>\
						<tr>\
							<td height="5"></td>\
						</tr>\
						<tr>\
							<td style="height:1px; background:url(/images/dot-layer.gif) repeat-x;"></td>\
						</tr>\
						<tr>\
							<td height="5"></td>\
						</tr>\
						<tr>\
							<td style="padding:3px 0 0 13px; cursor:pointer;" onmouseover="this.style.background=\'#D7D7D7\'" onmouseout="this.style.background=\'#fff\'"><a href="#" onclick="UF_USER_MENU.ex( \'grape_ball_send\' ); return false;" style="font:12px gulim; color:#1A1A1A; text-decoration:none;">Æ÷µµ¾Ë¼±¹°</a></td>\
						</tr>\
						</table>\
					</td>\
				</tr>\
				<tr>\
					<td style="background:url(/images/bit-layer03.gif) no-repeat; height:2px;"></td>\
				</tr>\
				</table>';
		return html ;
	},
	get_pos_w2x : function ( width )
	{
		var scroll_left = document.body.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft ;
		var layer_w = width ;
		var screen_w = document.body.offsetWidth + scroll_left ;
		var base_x = event.clientX + scroll_left ;
		if ( screen_w - base_x - layer_w <= 0 )
		{
			x = screen_w - layer_w - 10 ;
		}
		else
			x = base_x ;
		return x + 10 ;
	},
	get_pos_h2y : function ( height )
	{
		var scroll_top = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop ;
		var layer_h = height ;
		var screen_h = document.body.offsetHeight + scroll_top ;
		var base_y = event.clientY + scroll_top ;
		if ( screen_h - base_y - layer_h <= 0 )
		{
			y = screen_h - layer_h - 15 ;
		}
		else
			y = base_y ;
		return y + 5 ;
	},
	obj2evt2func : function ( obj, evt_name, func_name )
	{
		if ( !obj ) return ;
		var evt_name = ( document.all ) ? evt_name : evt_name.substring( 2, evt_name.length ) ;
		if ( document.all )
		{
			obj.attachEvent( evt_name, eval(func_name) ) ;
		}
		else
		{
			obj.addEventListener( evt_name, eval(func_name), true ) ;
		}
	},
	obj2evt2func_delete : function ( obj, evt_name, func_name )
	{
		if ( !obj ) return ;
		var evt_name = ( document.all ) ? evt_name : evt_name.substring( 2, evt_name.length ) ;
		if ( document.all )
		{
			obj.detachEvent( evt_name, eval(func_name) ) ;
		}
		else
		{
			obj.removeEventListener( evt_name, eval(func_name), true ) ;
		}
	}
}
function uf_user_name_click( user_no, ufam_no, obj )
{
	if ( !user_no )
	{
		alert('Ä£±¸Á¤º¸°¡ ¾ø½À´Ï´Ù.');
		return false ;
	}
	uf_move_box_show( user_no, ufam_no, obj ) ;
	return false ;
}
//ÀÏ¹ÝÀûÀÎ ÀÌ¸§ Å¬¸¯ÇÑ °æ¿ì
function uf_user_name_display( user_name, user_no, ufam_no, obj )
{
	UF_USER_MENU.name_write( user_name, 'uf_user_name1', user_no, ufam_no ) ;
	return false ;
}
//¸ÞÀÎ¿¡¼­ ÀÌ¸§ Å¬¸¯ÇÑ °æ¿ì
function uf_user_name_display_ma( user_name, user_no, ufam_no, obj )
{
	UF_USER_MENU.name_write( user_name, 'uf_user_name2', user_no, ufam_no ) ;
	return false ;
}
//°¡°èµµ¿¡¼­ ÀÌ¸§ Å¬¸¯ÇÑ °æ¿ì
function uf_user_name_display_fa( user_name, user_no, ufam_no, obj )
{
	UF_USER_MENU.name_write( user_name, 'uf_user_name1', user_no, ufam_no ) ;
	return false ;
}


function array_push(array, val)
{
	var length = array.length ;
	array[length] = val ;
}


//xmlHttpRequest °ü·Ã ½ÃÀÛ
function formData2QueryString(docForm)
{
	var strSubmitContent = '';
	var formElem;
	var strLastElemName = '';
	for (i = 0; i < docForm.elements.length; i++)
	{
		formElem = docForm.elements[i];
		switch (formElem.type)
		{
			// Text fields, hidden form elements
			case 'text':
			case 'hidden':
			case 'password':
			case 'textarea':
			case 'select-one':
				strSubmitContent += formElem.name + '=' + urlencode(formElem.value) + '&'
				strLastElemName = formElem.name
				break;
			// Radio buttons
			case 'radio':
				if (formElem.checked)
				{
					strSubmitContent += formElem.name + '=' + urlencode(formElem.value) + '&'
				}
				strLastElemName = formElem.name
				break;
			// Checkboxes
			case 'checkbox':
				if (formElem.checked)
				{
					strSubmitContent += formElem.name + '=' + urlencode(formElem.value) + '&'
					strLastElemName = formElem.name
					// Continuing multiple, same-name checkboxes
					/*
					if (formElem.name == strLastElemName)
					{
						// Strip of end ampersand if there is one
						if (strSubmitContent.lastIndexOf('&') == strSubmitContent.length-1)
						{
							strSubmitContent = strSubmitContent.substr(0, strSubmitContent.length - 1);
						}
						// Append value as comma-delimited string
						strSubmitContent += ', ' + escape(formElem.value);
					}
					else
					{
						strSubmitContent += formElem.name + '=' + escape(formElem.value);
					}
					strSubmitContent += '&';
					strLastElemName = formElem.name ;
					*/
				}
				break;
		}
	}
	// Remove trailing separator
	strSubmitContent = strSubmitContent.substr(0, strSubmitContent.length - 1);
	return strSubmitContent;
}
function urlencode(str)
{
	return encodeURIComponent( str ) ;
}
//AJAX 2006-7-14
function aj_req_param( str_method, str_url, str_param, str_func )
{
	aj_req( str_method, str_url, str_param, str_func, 'param' ) ;
}
function aj_req_form( str_method, str_url, str_form, str_func )
{
	aj_req( str_method, str_url, str_form, str_func, 'form' ) ;
}
function aj_req( str_method, str_url, str_data, str_func, data_type )
{
	var xmlHttpReq = get_xmlHttpReq() ;
	var d = new Date() ;
	var nocache = 'uf' + d.getTime() ;
	if ( data_type == 'form' )
	{
		var f = document.getElementsByName( str_data ).item(0) ;
		var str_param = formData2QueryString( f ) ;
		str_param += str_param ? '&' + nocache : nocache ;
	}
	else
	{
		var str_param = str_data ;
		str_param += str_param ? '&' + nocache : nocache ;
	}
	var str_param_get = '' ;
	var str_param_post = '' ;
	if ( str_method == 'GET' )
	{
		str_param_get = str_param ;
		xmlHttpReq.open( 'GET', str_url + '?' + str_param_get , true ) ;
	}
	else
	{
		str_param_post = str_param ;
		xmlHttpReq.open( 'POST', str_url, true ) ;
	}
	xmlHttpReq.setRequestHeader( 'Content-Type','application/x-www-form-urlencoded' );
	xmlHttpReq.setRequestHeader( 'Accept-Language','ko' );
	xmlHttpReq.onreadystatechange = function()
	{
		if ( xmlHttpReq.readyState == 4 )
		{
			if ( str_func ) eval( str_func + "(xmlHttpReq)" ) ;
		}
	}
	xmlHttpReq.send( str_param_post ) ;
}
//
function aj_request_param( str_method, str_url, str_param, str_func )
{
	aj_request( str_method, str_url, str_param, str_func, 'param' ) ;
}
function aj_request_form( str_method, str_url, str_form, str_func )
{
	aj_request( str_method, str_url, str_form, str_func, 'form' ) ;
}
function aj_request( str_method, str_url, str_data, str_func, data_type )
{
	var xmlHttpReq = get_xmlHttpReq() ;
	var d = new Date() ;
	var nocache = 'uf' + d.getTime() ;
	if ( data_type == 'form' )
	{
		var f = document.getElementsByName( str_data ).item(0) ;
		var str_param = formData2QueryString( f ) ;
		str_param += str_param ? '&' + nocache : nocache ;
	}
	else
	{
		var str_param = str_data ;
		str_param += str_param ? '&' + nocache : nocache ;
	}
	var str_param_get = '' ;
	var str_param_post = '' ;
	if ( str_method == 'GET' )
	{
		str_param_get = str_param ;
		xmlHttpReq.open( 'GET', str_url + '?' + str_param_get , true ) ;
	}
	else
	{
		str_param_post = str_param ;
		xmlHttpReq.open( 'POST', str_url, true ) ;
	}

	xmlHttpReq.setRequestHeader( 'Content-Type','application/x-www-form-urlencoded' );
	xmlHttpReq.setRequestHeader( 'Accept-Language','ko' );
	xmlHttpReq.onreadystatechange = function()
	{
		if ( xmlHttpReq.readyState == 4 )
		{
			if ( str_func ) eval( 'after_submit("' + str_func + '", xmlHttpReq)' ) ;
		}
	}
	xmlHttpReq.send( str_param_post ) ;
}
function get_xmlHttpReq()
{
	var xmlHttpReq = false ;
	if ( window.XMLHttpRequest ) // Mozilla/Safari
	{
		xmlHttpReq = new XMLHttpRequest() ;
	}
	else if ( window.ActiveXObject ) // IE
	{
		xmlHttpReq = new ActiveXObject('Microsoft.XMLHTTP') ;
	}
	return xmlHttpReq ;
}
function after_submit( str_func, xmlHttpReq )
{
	var data_xml = xmlHttpReq.responseXML ;
	var data_text = xmlHttpReq.responseText ;
	var data_html = null ;
	var data_js = null ;
	try { var data_html = data_xml.getElementsByTagName('data_html').item(0).firstChild.nodeValue ; } catch(e) {}
	try { var data_js = data_xml.getElementsByTagName('data_js').item(0).firstChild.nodeValue ; } catch(e) {}
	eval( str_func + '(data_js, data_html, data_text, data_xml)' ) ;
}
function str_element( target )
{
	var str_rtn = "" ;
	for ( i in target )
	{
		str_rtn += i + "<br>\n" ;
	}
	return str_rtn ;
}
//xmlHttpRequest °ü·Ã ƒP

function _IX(s,t){return s.indexOf(t);};
var PU_rl='http://'+'gtp5.acecounter.com';var PU_pt='8080';var PCHKIMG=new Image();var PL_bn=navigator.appName;var PL_CODE='AB2A31833723244';
if(document.URL.substring(0,7)=='http://'){if(PL_bn.indexOf("Netscape")> -1 || PL_bn=="Mozilla"){setTimeout("PCHKIMG.src=PU_rl+':8080/?cookie';",1);}else{PCHKIMG.src=PU_rl+':8080/?cookie';};};
var _UD='undefined';var _UN='unknown'; if(typeof PU_rl==_UD) var PU_rl ='';
var PL_d='',PL_tz=20,PL_ja=_UN,PL_bv='',PL_sc=_UN,PL_sv=10,PL_rf='',PL_arg='',PL_av='',PL_je='n',PL_ul=_UN,PL_ua=_UN,PL_UA=_UN,PL_rl='',PL_os=_UN,PL_vs=_UN,PL_ak='',PL_xrl='',PL_cd='',PL_cu='',PL_bz='';if( typeof PL_CODE==_UD ) PL_CODE = '' ;PL_tz = Math.floor((new Date()).getTimezoneOffset()/60) + 29 ;if( PL_tz > 24 ) PL_tz = PL_tz - 24 ;
PL_je = (navigator.javaEnabled()==true)?'1':'0';PL_bn=navigator.appName;if(PL_bn.substring(0,9)=="Microsoft") PL_bn="MSIE";PL_bz=navigator.appName;  PL_pf=navigator.platform;  PL_av=navigator.appVersion;  PL_bv=parseFloat(PL_av) ;if(PL_bn=='MSIE'){PL_cu=navigator.cpuClass;}else{PL_cu=navigator.oscpu;};if((PL_bn=="MSIE")&&(parseInt(PL_bv)==2)) PL_bv=3.01;PL_rf=document.referrer;var PL_prl='';var PL_frm=false;
if( typeof top.frames.length=='number' && top.frames.length > 0 ){eval("try{PL_pre_url = top.document.URL;}catch(_e){PL_pre_url='';};");if( PL_pre_url != document.URL ) PL_frm = true;};
if(PL_frm){ eval("try{PL_prl = top.document.URL;}catch(_e){PL_prl='';};"); if(PL_prl == '') eval("try{PL_prl=parent.document.URL;}catch(_e){PL_prl='';};"); if( _IX(PL_prl,'#') > 0 ) PL_prl=PL_prl.substring(0,_IX(PL_prl,'#')); if( _IX(PL_rf,'#') > 0 ) PL_rf=PL_rf.substring(0,_IX(PL_rf,'#')); if( PL_prl.charAt(PL_prl.length-1)=='/') PL_prl = PL_prl.substring(0,PL_prl.length-1); if( PL_rf.charAt(PL_rf.length-1)=='/') PL_rf = PL_rf.substring(0,PL_rf.length-1); if( PL_rf == '' ) eval("try{PL_ref=parent.document.referrer;}catch(_e){PL_ref='';}"); if( PL_rf == PL_prl ){ eval("try{PL_rf=top.document.referrer;}catch(_e){PL_rf='';}"); if( _IX(document.cookie,'ACE_CK='+escape(PL_rf)) > -1 ){ PL_rf = PL_prl;} else{ if(_IX(PL_prl,'?') > 0) PL_ak = PL_prl.substring(_IX(PL_prl,'?')+1,PL_prl.length); if( _IX(PL_prl,'OVRAW=') > 0 ){ PL_ak = 'src=overture&kw='+PL_pre_url.substring(PL_pre_url.indexOf('OVKEY=')+6,PL_pre_url.indexOf('&',PL_pre_url.indexOf('OVKEY=')+6)); }; document.cookie='ACE_CK='+escape(PL_rf)+';path=/;'; }; if(document.URL.indexOf('?')>0 && PL_ak == '' ) PL_ak =document.URL.substring(document.URL.indexOf('?')+1,document.URL.length); }; }else{ if( _IX(PL_rf,'#') > 0 ) PL_rf=PL_rf.substring(0,_IX(PL_rf,'#')); if(_IX(document.URL,'?') > 0) PL_ak = document.URL.substring(_IX(document.URL,'?')+1,document.URL.length); };
if(document.URL.substring(0,8)=='https://'){PU_rl='https://sslp1.acecounter.com/sslp1';}; PL_rl=document.URL;
if(_IX(PL_rl,'#')>0) PL_rl=PL_rl.substring(0,_IX(PL_rl,'#'));if(PL_rl.charAt(PL_rl.length)=='/') PL_rl=PL_rl.substring(0,PL_rl.length-1);if(_IX(PL_rl,'://')>0) PL_rl=PL_rl.substring(_IX(PL_rl,'://')+3,PL_rl.length);if(PL_rf.charAt(PL_rf.length)=='/') PL_rf=PL_rf.substring(0,PL_rf.length-1);if(_IX(PL_rf,'://')>0) PL_rf=PL_rf.substring(_IX(PL_rf,'://')+3,PL_rf.length);if( typeof PL_rf==_UD||( PL_rf == '' )) PL_rf = 'bookmark' ;PL_cd=(PL_bn=="MSIE")?screen.colorDepth:screen.pixelDepth;PL_UA = navigator.userAgent;PL_ua = navigator.userAgent.toLowerCase();if (navigator.language) {  PL_ul = navigator.language.toLowerCase();} else if (navigator.userLanguage) {  PL_ul = navigator.userLanguage.toLowerCase();}PL_st = _IX(PL_UA,'(') + 1;PL_end = _IX(PL_UA,')');PL_str = PL_UA.substring(PL_st, PL_end);PL_if = PL_str.split('; ');PL_cmp = 'UNKNOWN' ;if (_IX(PL_ua,'msie') != -1) {  PL_cmp = navigator.appName;  PL_str = PL_if[1].substring(5, PL_if[1].length);  PL_vs = parseFloat(PL_str);} else if ( _IX(PL_ua,'opera') != -1 ){  PL_cmp = "Opera" ;} else if ((PL_st = _IX(PL_ua,"netscape6")) > 0) {  PL_cmp = "Netscape";  PL_vs = PL_ua.substring(PL_st+10, PL_ua.length);  if ((PL_st = _IX(PL_vs,"b")) > 0 ) {    PL_str = PL_vs.substring(0,_IX(PL_vs,"b"));    PL_vs = PL_str ;  };} else if ((PL_st = _IX(PL_ua,"netscape/7")) > 0) {  PL_cmp = "Netscape";  PL_vs = PL_ua.substring(PL_st+9, PL_ua.length);  if ((PL_st = _IX(PL_vs,"b")) > 0 ){ PL_str = PL_vs.substring(0,_IX(PL_vs,"b")); PL_vs = PL_str;};}else{ if (_IX(PL_ua,"gecko") > 0){ PL_cmp = navigator.vendor;  } else if (_IX(PL_ua,"nav") > 0){ PL_cmp = "Netscape Navigator";}else{ PL_cmp = navigator.appName;}; PL_av = PL_UA ;};if (parseInt(PL_vs) == parseFloat(PL_vs)) {  PL_vs = PL_vs + ".0";};PL_bz = PL_cmp; if( _IX(PL_pf,_UD) >= 0 || PL_pf ==  '' ){ PL_os = 'UNKNOWN' ;}else{ PL_os = PL_pf ; };if( _IX(PL_os,'Win32') >= 0 ){if( _IX(PL_av,'98')>=0){ PL_os = 'Windows 98';}else if( _IX(PL_av,'95')>=0 ){ PL_os = 'Windows 95';}else if( _IX(PL_av,'Me')>=0 ){ PL_os = 'Windows Me';}else if( _IX(PL_av,'NT')>=0 ){ PL_os = 'Windows NT';}else{ PL_os = 'Windows';};if( _IX(PL_av,'NT 5.0')>=0){ PL_os = 'Windows 2000';};if( _IX(PL_av,'NT 5.1')>=0){PL_os = 'Windows XP';if( _IX(PL_av,'SV1') > 0 ){PL_os = 'Windows XP SP2';};};if( _IX(PL_av,'NT 5.2')>=0){PL_os ='Windows Server 2003';};};PL_pf_s = PL_pf.substring(0,4);if( PL_pf_s == 'Wind'){if( PL_pf_s == 'Win1'){PL_os = 'Windows 3.1';}else if( PL_pf_s == 'Mac6' ){ PL_os = 'Mac';}else if( PL_pf_s == 'MacO' ){ PL_os ='Mac';}else if( PL_pf_s == 'MacP' ){PL_os='Mac';}else if(PL_pf_s == 'Linu'){PL_os='Linux';}else if( PL_pf_s == 'WebT' ){ PL_os='WebTV';}else if(  PL_pf_s =='OSF1' ){ PL_os ='Compaq Open VMS';}else if(PL_pf_s == 'HP-U' ){ PL_os='HP Unix';}else if(  PL_pf_s == 'OS/2' ){ PL_os = 'OS/2' ;}else if( PL_pf_s == 'AIX4' ){ PL_os = 'AIX';}else if( PL_pf_s == 'Free' ){ PL_os = 'FreeBSD';}else if( PL_pf_s == 'SunO' ){ PL_os = 'SunO';}else if( PL_pf_s == 'Drea' ){ PL_os = 'Drea'; }else if( PL_pf_s == 'Plan' ){ PL_os = 'Plan'; }else{ PL_os = 'UNKNOWN'; };};if( PL_cu == 'x86' ){ PL_cu = 'Intel x86';}else if( PL_cu == 'PPC' ){ PL_cu = 'Power PC';}else if( PL_cu == '68k' ){ PL_cu = 'Motorola 680x';}else if( PL_cu == 'Alpha' ){ PL_cu = 'Compaq Alpa';}else if( PL_cu == 'Arm' ){ PL_cu = 'ARM';}else{ PL_cu = 'UNKNOWN';};if( PL_d == '' || typeof PL_d==_UD ){ PL_d = '0*0';}
if(typeof _PL_hdki == 'undefined'){ var _PL_hdki = new Image() ; if( typeof window.screen == 'object'){PL_sv=12;PL_d=window.screen.width+'*'+window.screen.height;};if(PL_bn=="MSIE"){if(PL_bv>=4){ PL_sv=12;};if( PL_bv >= 5){ PL_sv = 13;};};if(_IX(PL_bn,"Netscape") > -1 ||PL_bn=="Mozilla"||PL_bn=="Opera"){if(PL_bv>=3){ PL_sv = 11 ;};if(PL_bv>=4){ PL_sv = 12 ;};if(PL_bv>=4.06){ PL_sv=13 ; };if(PL_d==_UD){ PL_d='UNKNOWN'; };}; if(document.URL.substring(0,8)=='https://'){PL_arg=PU_rl;}else{PL_arg=PU_rl+':'+PU_pt+'/';}; if( typeof PL_ERR !=_UD && PL_ERR == 'err'){PL_arg += "?euid="+PL_CODE;}else{PL_arg += "?uid="+PL_CODE;}; PL_arg += "&cpu="+PL_cu+"&bz="+PL_bz+"&bv="+PL_vs+"&os="+PL_os;PL_arg += "&dim="+PL_d+"&cd="+PL_cd+"&je="+PL_je+"&ref="+escape(PL_rf)+"&url="+escape(PL_rl);PL_arg += "&jv="+PL_sv+"&tz="+PL_tz+"&ul="+PL_ul+"&ad_key="+escape(PL_ak)+"&" ; if( _IX(PL_bn,"Netscape") > -1 ||PL_bn=="Mozilla"){ setTimeout("_PL_hdki.src = PL_arg;",1);}else{   _PL_hdki.src = PL_arg;};};
if(PL_sv==10){ if(typeof PL_rf == _UD ||PL_rf=='')PL_rf='bookmark';PL_arg = "<img src='" + PU_rl + ":"+PU_pt+"/?uid=" + PL_CODE;PL_arg += "&cpu="+PL_cu+"&bz="+PL_bz+"&bv=4.0&os="+PL_os;PL_arg += "&dim=640*480&cd=8&je=0&ck=0&ref="+escape(PL_rf)+"&url="+escape(PL_rl);PL_arg += "&jv=10&tz="+PL_tz+"&ul="+PL_ul+"&ad_key="+escape(PL_ak)+"&' border=0>" ;document.write( PL_arg );};

function analytics_gg()
{
	if ( script_gg.readyState == 'loaded' )
	{
		_uacct = "UA-247772-2" ;
		urchinTracker() ;
	}
	else
	{
		setTimeout( 'analytics_gg()', 100 ) ;
	}
}
if ( document.domain != 'test.ufamily.co.kr' )
{
	var script_gg = document.createElement("script") ;
	script_gg.src = "http://www.google-analytics.com/urchin.js" ;
	document.getElementsByTagName("head")[0].appendChild(script_gg) ;
	analytics_gg() ;
}


function uf_menu_pop_close( cmd )
{
	if ( parent && parent.UHOME_MENU_CONTROL )
		parent.UHOME_MENU_CONTROL.menu_close( cmd ) ;
	else
		window.close() ;
}


/**
	ÆË¾÷Ã¢ ¸®»çÀÌÁî ÇÏ´Â ÇÔ¼ö
**/
var resizeWin = {
	topW : 0,
	topH : 0,
	init : function(){
		if (document.all){
			cW=document.body.offsetWidth
			cH=document.body.offsetHeight
			window.resizeTo(500,500)
			barsW=500-document.body.offsetWidth
			barsH=500-document.body.offsetHeight
			wW=barsW+cW
			wH=barsH+cH
			window.resizeTo(wW,wH)
		}
		else
		{
			wW=window.outerWidth
			wH=window.outerHeight
		}
		resizeWin.topW = wW - document.body.clientWidth;
		resizeWin.topH = wH - document.body.clientHeight;
		
		if(arguments.length == 2){
			resizeWin.resize(arguments[0], arguments[1])
		}
	},
	resize : function(w, h){
		window.resizeTo(w + resizeWin.topW, h + resizeWin.topH)
	}
}
/**
	°¡Àå ÀÏ¹ÝÀûÀÎ ÆË¾÷Ã¢
**/
function popup(src, w, h, popName){
	if(!popName) popName = ""
	
	var obj = window.open("",popName,"width="+w+",height="+h+"")
	obj.focus()
}
/**
	½ºÅ©·Ñ¹Ù°¡ ÀÖ´Â ÆË¾÷Ã¢
**/
function popupScroll(src, w, h, popName){
	if(!popName) popName = ""
	
	var obj = window.open("",popName,"width="+w+",height="+h+",scrollbars=yes")
	obj.focus()
}
/**
	¸®»çÀÌÁî °¡´ÉÇÑ ÆË¾÷Ã¢
**/
function popupResize(src, w, h, popName){
	if(!popName) popName = ""
	
	var obj = window.open("",popName,"width="+w+",height="+h+",scrollbars=yes,resizable=yes")
	obj.focus()
}


//´Þ·Â Æû
var TIME_CONTROL = {
	init_ymd : function ()
	{
		if ( !this.layer_ymd ) this.layer_ymd = this.layer_create() ;
		this.layer_ymd.width = 170 ;
		this.layer_ymd.height = 80 ;
		this.obj_ymd = null ;
		this.obj_y = null ;
		this.obj_m = null ;
		this.obj_d = null ;
	},
	init_hi : function ()
	{
		if ( !this.layer_hi ) this.layer_hi = this.layer_create() ;
		this.layer_hi.width = 72 ;
		this.layer_hi.height = 50 ;
		this.obj_h = null ;
		this.obj_i = null ;
	},
	layer_create : function ()
	{
		var obj = document.createElement( 'IFRAME' ) ;
		obj.style.display = 'none' ;
		obj.style.position = 'absolute' ;
		obj.frameBorder = 'no' ;
		obj.scrolling = 'no' ;
		document.body.appendChild( obj ) ;
		return obj ;
	},
	ymd_open : function ( id_ymd, id_y, id_m, id_d, x, y )
	{
		if ( !this.layer_ymd ) this.init_ymd() ;
		this.obj_ymd = document.getElementById( id_ymd ) ;
		this.obj_y = document.getElementById( id_y ) ;
		this.obj_m = document.getElementById( id_m ) ;
		this.obj_d = document.getElementById( id_d ) ;
		if ( this.obj_ymd && this.obj_ymd.value )
		{
			var temp = this.obj_ymd.value.split( '-' ) ;
			var d_year = temp[0] ;
			var d_month = temp[1] ;
		}
		else
		{
			var d = new Date() ;
			var d_year = ( this.obj_y && this.obj_y.value ) ? this.obj_y.value : d.getYear()  ;
			var d_month = ( this.obj_m && this.obj_m.value ) ? this.obj_m.value : d.getMonth() + 1 ;
		}
		var x = ( x ) ? x : event.clientX ;
		var y = ( y ) ? y : event.clientY ;
		this.layer_ymd.style.left = x ;
		this.layer_ymd.style.top = y ;
		this.layer_ymd.src = '/cm/js_date_ymd.php?d_year=' + d_year + '&d_month=' + d_month ;
		this.layer_ymd.style.display = 'block' ;
		obj2evt2func( document.body, 'onmousedown', 'TIME_CONTROL.ymd_close_global' ) ; //stdlib.js
	},
	ymd_close : function ()
	{
		//this.hi_close() ;
		this.layer_ymd.style.display = 'none' ;
		obj2evt2func_delete( document.body, 'onmousedown', 'TIME_CONTROL.ymd_close_global' ) ; //stdlib.js
	},
	ymd_close_global : function () { TIME_CONTROL.ymd_close() ; },
	ymd_select : function ( y, m, d )
	{
		var date_m = ( parseInt( m ) < 10 ) ? '0' + m : m ;
		var date_d = ( parseInt( d ) < 10 ) ? '0' + d : d ;
		if ( this.obj_ymd ) this.obj_ymd.value = y + '-' + date_m + '-' + date_d ;
		if ( this.obj_y ) this.obj_y.value = y ;
		if ( this.obj_m ) this.obj_m.value = m ;
		if ( this.obj_d ) this.obj_d.value = d ;
		this.ymd_close() ;
	},
	hi_open : function ( id_hi, id_h, id_i, x, y )
	{
		if ( !this.layer_hi ) this.init_hi() ;
		this.obj_hi = document.getElementById( id_hi ) ;
		this.obj_h = document.getElementById( id_h ) ;
		this.obj_i = document.getElementById( id_i ) ;
		var d = new Date() ;
		var d_hour = ( this.obj_h && this.obj_h.value ) ? this.obj_h.value : d.getHours()  ;
		var d_minute = ( this.obj_i && this.obj_i.value ) ? this.obj_i.value : d.getMinutes() ;
		var x = ( x ) ? x : event.clientX ;
		var y = ( y ) ? y : event.clientY ;
		this.layer_hi.style.left = x ;
		this.layer_hi.style.top = y ;
		this.layer_hi.src = '/cm/js_date_hi.php?nocache=' + d.getMinutes() + d.getSeconds() ;
		this.layer_hi.style.display = 'block' ;
		obj2evt2func( document.body, 'onmousedown', 'TIME_CONTROL.hi_close_global' ) ; //stdlib.js
	},
	hi_close : function ()
	{
		//this.ymd_close() ;
		this.layer_hi.style.display = 'none' ;
		obj2evt2func_delete( document.body, 'onmousedown', 'TIME_CONTROL.hi_close_global' ) ; //stdlib.js
	},
	hi_close_global : function () { TIME_CONTROL.hi_close() ; },
	hi_select : function ( h, i )
	{
		if ( this.obj_hi ) this.obj_hi.value = h + ':' + i ;
		if ( this.obj_h ) this.obj_h.value = h ;
		if ( this.obj_i ) this.obj_i.value = i ;
		this.layer_hi.width = 10 ;
		this.layer_hi.height = 10 ;
		this.hi_close() ;
	}
}

var LOG_TEMP = {
	init : function ()
	{
	},
	log_request : function ( log_type, log_detail )
	{
		if ( !log_type ) log_type = '' ;
		if ( !log_detail ) log_detail = '' ;
		var str_param = 'log_type=' + log_type + '&log_detail=' + log_detail ;
		aj_req_param( 'POST', '/cm/uhome/log_temp.php', str_param, 'LOG_TEMP.log_response' )
	},
	log_response : function ( xmlHttpReq )
	{
		if ( !xmlHttpReq.responseText ) return ;
	}
}

var USER_INFO = {
	init : function ( mode )
	{
		this.mode = mode ;
		this.data_user = new Array() ;
		this.info_request( mode ) ;
	},
	is_login : function ()
	{
		if ( !this.is_init ) return false ;
		if ( this.data_user && this.data_user['user_no'] )
			return true ;
		else
			return false ;
	},
	info_request : function ()
	{
		var str_param = 'mode=' + this.mode ;
		aj_req_param( 'POST', '/cm/user_info_xml.php?', str_param, 'USER_INFO.info_response' )
	},
	info_response : function ( xmlHttpReq )
	{
		if ( !xmlHttpReq.responseText ) return ;
		var xml = xmlHttpReq.responseXML ;
		var obj = xml.getElementsByTagName( this.mode )[0].childNodes ;
		for ( cnt = 0, len = obj.length ; cnt < len ; cnt++ )
		{
			if ( obj[cnt].tagName ) this.data_user[ obj[cnt].tagName ] = obj[cnt].firstChild.nodeValue ;
		}
		this.is_init = true ;
	}
}

/*ÇÃ·¡½Ã ¿Ü°û¼± ¾ø¾Ö±â(ÀÌ¿Ã¶ó½ºÆÐÄ¡ ´ëÀÀ)*/
function fnc_flashRewrite(obj){
	obj.innerHTML = obj.innerHTML
}


