function checkRadio(radio_btn) {
	var len = radio_btn.length;
	for( i=0; i < len; i++ ) {
		if( radio_btn[i].checked == true ) {
			return radio_btn[i].value;
		}
	}
	return '';	   	
}

/* **************************************************
	wordCount
	´Ü¾î °³¼ö¸¦ ¹ÝÈ¯ÇÏ´Â ¸Þ¼­µå
************************************************** */
function wordCount( value )
{
	if( value == null ) return 0;
	return value.match( /\b\w+\b/g ).length;
}


/* **************************************************
	reserve method
	¹®ÀÚ¿­À» ¿ªÀ¸·Î º¯È¯ÇÏ´Â ¸Þ¼­µå
************************************************** */
function reverseStr( value )
{
	if( value == null ) return;
	return value.split( '' ).reverse().join( '' );
}



/* **************************************************
	reserveWords method
	´Ü¾î ´ÜÀ§·Î ¹®ÀÚ¿­À» ¿ªÀ¸·Î º¯È¯ÇÏ´Â ¸Þ¼­µå
************************************************** */
function reverseWorlds( value )
{
	if( value == null ) return '';
	return value.split( /\s+/ ).reverse().join( ' ' );
}



/* **************************************************
	cutChar
	Æ¯Á¤ ±æÀÌ ÀÌ»óÀÇ ¹®ÀÚ¿­Àº ... À¸·Î Ã³¸®ÇÏ±â
************************************************** */
function cutChar( str, num )
{
	if( str.length > num ){
		return str.substr( 0, num ) + " ...";
	}
	else{
		return str;
	}
}



/* **************************************************
	timeFormatter
	½Ã°£ Ç¥½Ã¹ýÀ¸·Î º¯È¯ÇÏ´Â ¸Þ¼­µå ( ºÐ :  ÃÊ )
	ex ) 00:00
************************************************** */
function timeFormatter( value )
{
	minute = Math.floor( value / 60 );
	second = Math.floor( value % 60 );
	return digit( minute ) + " : " + digit( second );
}



/* **************************************************
	isNumeric
	¼ýÀÚÀÎÁö ¿©ºÎ¸¦ ÆÇ´ÜÇÏ´Â ¸Þ¼­µå
************************************************** */
function isNumeric( value )
{
	if( value == null ) return false;
	var regexp = /^[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?$/;
	return regexp.test( value );
}



/* **************************************************
	trim
	¹®ÀÚ¿­ ÁÂ¿ì °ø¹éÀ» Á¦°ÅÇÏ´Â ¸Þ¼­µå
************************************************** */
function trim( value )
{
	if( value == null ) return '';
	return value.replace( /^\s+|\s+$/g, '' );
}



/* **************************************************
	trimLeft
	¹®ÀÚ¿­ ¿ÞÂÊ °ø¹éµéÀ» Á¦°ÅÇÏ´Â ¸Þ¼­µå
************************************************** */
function trimLeft( value )
{
	if( value == null ) return '';
	return value.replace( /^\s+/, '' );
}



/* **************************************************
	trimRight
	¹®ÀÚ¿­ ¿À¸¥ÂÊ °ø¹éµéÀ» Á¦°ÅÇÏ´Â ¸Þ¼­µå
************************************************** */
function trimRight( value )
{
	if( value == null ) return '';
	return value.replace( /\s+$/, '' );
}



/* **************************************************
	replace
	±âÁ¸ÀÇ ¹®ÀÚ¿­Áß Æ¯Á¤ ¹®ÀÚ¿­À» »õ ¹®ÀÚ¿­·Î ±³Ã¼ÇÏ´Â ¸Þ¼­µå
************************************************** */
function replace( str, oldSubStr, newSubStr )
{
	if( str == null || oldSubStr == null || newSubStr == null ) return false;
	return str.split( oldSubStr ).join( newSubStr );
}


/* **************************************************
	getTextFieldValueCount( ÅØ½ºÆ®¸¦ ÀÔ·ÂÇÏ´Â ÇÊµå, ±ÛÀÚ¼ö¸¦ Ç¥½ÃÇÏ´Â ÅØ½ºÆ® ÇÊµå, ÃÖ´ë ÀÔ·Â °¡´É ±ÛÀÚ¼ö )
	ÁöÁ¤ÇÑ ÃÖ´ë°³¼ö±îÁö¸¸ ÅØ½ºÆ®¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ´Â ¸Þ¼­µå
************************************************** */
function getTextFieldValueCount( _tf, _tf2, _maxNum )
{
	var currentLength = _tf.value.length;
	_tf2.value =  ( _maxNum - currentLength) + " / " + _maxNum;
	if( currentLength > 0 ){
		return true;
	}
	else{
		return false;
	}
}


function fnLogOut()
{
    location = 'LogOut_Process.aspx';
}
