/*==================================================================================================
°øÅë
==================================================================================================*/

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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);
}

/*==================================================================================================
¹®ÀÚ¿­ Á¶ÀÛ
==================================================================================================*/
// LEFT
function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}

// RIGHT
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

// trim
function Trim(str){
	return String(str).rereplace(/^\s+|\s+$/g,'');
}

// ¼ýÀÚÃ¼Å©
function Global_numbercheck(obj)
{
    obj.value = obj.value.replace(/^\s+|\s+$/g,'');
    var strValue = obj.value;
    if(isNaN(strValue))
	{
		alert('¼ýÀÚ¸¦ ÀÔ·ÂÇÏ¼¼¿ä.');
        obj.value = "";
        obj.focus();
		return false;
	}
    else
	{
		return true;
	}
}

// ÄÞ¸¶
function addComma(obj,fLen)
{

	if(event.keyCode == 37 || event.keyCode == 39 )
	{
		return;
	}

	var fLen = fLen || 2;

	var strValue = obj.value.replace(/,|\s+/g,'');
	var strBeforeValue = (strValue.indexOf('.') != -1)? strValue.substring(0,strValue.indexOf('.')) :strValue ;
	var strAfterValue = (strValue.indexOf('.') != -1)? strValue.substr(strValue.indexOf('.'),fLen+1) : '' ;


	if(isNaN(strValue))
	{
		alert(strValue.concat(' : ¼ýÀÚ°¡ ¾Æ´Õ´Ï´Ù.'));
		return false;
	}

	var intLast = strBeforeValue.length-1;

	var arrValue = new Array;
	var strComma = '';

	for(var i=intLast,j=0; i >= 0; i--,j++)
	{

		if( j !=0 && j%3 == 0)
		{
			strComma = ',';
		}
		else
		{
			strComma = '';
		}

		arrValue[arrValue.length] = strBeforeValue.charAt(i) + strComma ;
	}

	obj.value= arrValue.reverse().join('') + strAfterValue;
}

/*==================================================================================================
À©µµ¿ì
==================================================================================================*/
// Window Open
function OpenWindow(JWinName,JOpenedFile,JWidth,JHeight)
{
	var x = (screen.width/2) - (JWidth/2);
	var y = (screen.height/2) - (JHeight/2);
	var NewWin = window.open('', JWinName, 'toolbar=no,resizable=no,scrollbars=yes,status=0,width='+JWidth+',height='+JHeight+',left='+x+',top='+y);
	NewWin.location = JOpenedFile;
}

// Ã¢Å©±â Á¶Àý
function WinSize(strW, strH)
{
	window.resizeTo(strW,strH);
}

// Ã¤³Î¸ðµå·Î À©µµ¿ì ¿ÀÇÂ
function ChannelModeWindowOpen(url)
{
    window.open(url,"","channelmode,scrollbars")
}

/*==================================================================================================
ÆÄ¶ó¸ÞÅÍ ¹Þ±â
==================================================================================================*/
// QueryString
function RequestQueryString(valuename)
{
    var rtnval = "";
    var nowAddress = unescape(location.href);
    var parameters = (nowAddress.slice(nowAddress.indexOf("?")+1,nowAddress.length)).split("&");

    for(var i = 0 ; i < parameters.length ; i++){
        var varName = parameters[i].split("=")[0];
        if(varName.toUpperCase() == valuename.toUpperCase())
        {
            rtnval = parameters[i].split("=")[1];
            break;
        }
    }

    return rtnval;
}

/*==================================================================================================
ÆûÃ¼Å©
==================================================================================================*/
// NULLÃ¼Å©
function CheckValue(controlid,message)
{
	var thisValue = document.all[controlid];
	var temp = "";
	string = '' + thisValue.value;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	temp += splitstring[i];

	if(temp=="")
	{
		alert(message);
		thisValue.value="";
		thisValue.focus();
		return false;
	}
	else
	{
		return true;
	}
}

// NULL Ã¼Å© -> Nofocus
function CheckValue2(controlid,message)
{
	var thisValue = document.all[controlid];
	var temp = "";
	string = '' + thisValue.value;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	temp += splitstring[i];

	if(temp=="")
	{
		alert(message);
		thisValue.value="";
		return false;
	}
	else
	{
		return true;
	}
}

// »èÁ¦ Ã³¸®
function DelYN (locationURL)
{
	if (confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {

		document.location = locationURL;
	}
}

// Array ¿©ºÎ
function IsArray(controlid)
{
    var thisValue = document.all[controlid];

    if(!eval(thisValue.length))
    {
        return false;
    }
    else
    {
        return true;
    }
}

// ¾ÆÀÌµðÃ¼Å©
function CheckID( controlName )
{
	searchko = document.all[controlName].value;

	for (i = 0 ; i < searchko.length ; i++)
	{
		sko = searchko.charAt(i);

		if ((sko < '0' || sko > '9')&&(sko < 'a' || sko > 'z')&&(sko < 'A' || sko > 'Z'))
		{
			alert('È¸¿ø ID´Â ¿µ¹®°ú ¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.');
			document.all[controlName].value = "";
			document.all[controlName].focus();
			return false;
		}
	}

	return true;
}

// ÀÌ¸ÞÀÏÃ¼Å©
function EmailCheck( controlName )
{
	if(document.all[controlName] != null)
	{
		if(Global_TrimSpaces(document.all[controlName].value) != "")
		{
			var chkEmail = document.all[controlName].value.match(/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/);

			if (chkEmail == null)
			{
				alert("¸ÞÀÏ ÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
				document.all[controlName].value = "";
				return false;
			}
			else
			{
				return true;
			}
		}
		else
		{
			return true;
		}
	}
	else
	{
		return true;
	}
}

// ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©
function CheckRegno ( controlName1, controlName2 )
{
	var NUM = "0123456789";

	var PID1 = document.all[controlName1].value;
	var PID2 = document.all[controlName2].value;

	var chk = 0;

	var nYear = PID1.substring(0,2);

	var nMondth = PID1.substring(2,4);

	var nDay = PID1.substring(4,6);

	var nSex = PID2.charAt(0);

	if (!IsValid(PID1, NUM))
	{
		alert("ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		document.all[controlName1].select();
		return false//-1;
	}

	if ( PID1.length!=6 ||  nMondth<1 || nMondth>12 || nDay<1 || nDay>31)
	{
		alert("ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		document.all[controlName1].select();
		return false//-1;
	}

	if (!IsValid(PID2, NUM))
	{
		alert("ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		document.all[controlName1].select();
		return false//1;
	}

	if ( PID2.length!=7 || (nSex!=1 && nSex!=2 && nSex!=3 && nSex!=4 && nSex!=5 && nSex!=6 && nSex!=7 && nSex!=8) )
	{
		alert("ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		document.all[controlName1].select();
		return false//1;
	}

	if ( nSex==5 || nSex==6 || nSex==7 || nSex==8 )
	{
		var sum=0;
		var odd=0;
		var PID = PID1 + PID2;
		buf = new Array(13);
		for (i=0; i<13; i++) buf[i] = parseInt(PID.charAt(i));
		odd = buf[7]*10 + buf[8];
		if (odd%2 != 0)
		{
			alert("ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
			document.all[controlName1].select();
			return false//-1;
		}

		multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
		for (i=0, sum=0; i<12; i++) sum += (buf[i] *= multipliers[i]);
		sum = 11-(sum%11);
		if (sum >= 10) sum-= 10;
		sum += 2;
		if (sum >= 10) sum -= 10;
		if ( sum != buf[12] )
		{
			alert("ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
			document.all[controlName1].select();
			return false//-1;
		}
	}
	else
	{
		var i;
		for (i=0; i<6; i++)
		{
			chk += ( (i+2) * parseInt( PID1.charAt(i) ));
		}

		for (i=6; i<12; i++)
		{
			chk += ( (i%8+2) * parseInt( PID2.charAt(i-6) ));
		}

		chk = 11 - (chk%11);
		chk %= 10;

		if (chk != parseInt( PID2.charAt(6)))
		{
			alert("ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
			document.all[controlName1].select();

			return false//-1;
		}
	}

	return true//0;
}

// ÁÖ¹Îµî·ÏÃ¼Å©ÀÇ ¼­ºê ÇÔ¼ö·Î »ç¿ëµË´Ï´Ù.
function IsValid(s,spc)
{
	var i;
	if (s.length<1) return false;
	for(i=0; i<s.length; i++)
	{
		if (spc.indexOf( s.substring(i, i+1)) < 0)
		{
			return false;
		}
	}

	return true;
}

// ¼ýÀÚÃ¼Å©
function MumberCheck(controlid,max)
{
	var thisValue = document.all[controlid];
	var age_value = thisValue.value;
	for (i = 0; i < age_value.length; i++)
	{
		if (!(age_value.charAt(i) >= '0' && age_value.charAt(i) <= '9')){
			alert("¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");
			thisValue.value="";
			thisValue.focus();
			return false;
		}
	}

    if(parseFloat(age_value) > parseFloat(max)){
        alert("ÀÔ·ÂÇÏ½Å ¹øÈ£°¡ ³Ê¹« ¸¹½À´Ï´Ù.");
        thisValue.value="";
        thisValue.focus();
        return false;
    }
}

// ¶óµð¿À ¹öÆ° ¼±ÅÃ¿©ºÎ Ã¼Å©
function RadioCheck(controlid,message) {
	var thisValue = document.all[controlid];
	
	for(var i=0; i<thisValue.length; i++) {
		if(thisValue[i].checked) {
			return 	true;				
		}
	}
	alert(message);
	return false;
}

// ¶óµð¿À ¹öÆ° ¼±ÅÃ¿©ºÎ Ã¼Å©
function radio_chk(form_name, field_name){
    var ilength = eval("document." + form_name + "." + field_name + ".length");
    var i = 0;
    var ichecked ;
    var ichk_cnt = 0;
    
    for(i = 0; i < ilength; i++){
        ichecked = eval("document." + form_name + "." + field_name + "[i].checked");
        
        if (ichecked == true)
            ichk_cnt = ichk_cnt + 1;
    }
    
    if(ichk_cnt < 1){
        eval("document." + form_name + "." + field_name + "[0].focus();");

        return false;
    }else
        return true;
}

/*==================================================================================================
Ã¼Å©¹Ú½º
==================================================================================================*/
// ÀüÃ¼¼±ÅÃ
function SelAllY(var1) {

    fm = var1;

    total = (fm.elements.length);
    
    if (total == undefined)
	{
		total += 1;
	} 
		
    //alert(total);

    for( i = 0 ; i < total ; i++) {

        fm.elements[i].checked = true;

    }
}

// ¼±ÅÃÇØÁ¦
function SelAllN(var1) {

    fm = var1;
    total = (fm.elements.length);

    if (total == undefined)
	{
		total += 1;
	} 
    //alert(total);

    for( i = 0 ; i < total ; i++) {

        fm.elements[i].checked = false;

    }
}

/*==================================================================================================
Cookie Ã³¸®
==================================================================================================*/
// Cookie°¡Á®¿À±â
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 "";
}

// Cookie³Ö±â
function SetCookie( name, value, expiredays )
{
	
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

/*==================================================================================================
±âÅ¸
==================================================================================================*/
//¸Þ´º È¿°ú(blendtrans)
function bt(id,after)
{
eval(id+'.filters.blendtrans.stop();');
eval(id+'.filters.blendtrans.apply();');
eval(id+'.src="'+after+'";');
eval(id+'.filters.blendtrans.play();');
}

// ÇØ´ç ÅØ½ºÆ® °ª¿¡¼­ È®ÀåÀÚ¸¦ ÃßÃâÇÕ´Ï´Ù.
function Global_GetFileExtension( controlObject )
{
	var contolValue = controlObject.value;

	var index = contolValue.lastIndexOf(".")

	if ( ( Global_TrimSpaces(contolValue) != "" ) && ( contolValue.length != 0 ) )
	{
		return contolValue.substring(index+1).toLowerCase();
	}
	else
	{
		return '';
	}
}

//¼ýÀÚ Ã¼Å©
function onlyNumber( el ) {
    el.value = el.value.replace( /\D/g, '' );

    //onkeyup="onlyNumber(this);"
}

// ÆË¾÷ ´Þ·Á ¶ç¿ì±â
var ObjectName;

function PopUpCalendal(objName)
{
	ObjectName = objName;
	
	objName.value = "";
	var n=window.open('/Class/CalendarPopup.asp' ,'window','width=300,height=260,status=no,menubar=no,scrollbars=no,resizable=no,left=455,top=180');
}

function setCalDate(dateTime) {

	ObjectName.value = dateTime.substring(0,4) + "-" + dateTime.substring(4, 6) + "-" + dateTime.substring(6, 8);
    ObjectName = null;
}

// °ø°£ °ª Ã¼Å©
function Global_TrimSpaces( text )
{
	var temp = "";

	text = '' + text.toUpperCase();

	splitstring = text.split(" ");

	for(i = 0; i < splitstring.length; i++)

	temp += splitstring[i];

	return temp;
}

// Ã¢À» Áß¾Ó/ÀÌº¥Æ® ¹ß»ý À§Ä¡ÇÏµµ·Ï ¿±´Ï´Ù.
function Global_WindowCenterOpen(url, name, width, height, enableScroll, isCenter)
{   
    var properties = "width="+width;
    properties += ", height="+height;
    
    if(isCenter)
    {
        properties += ", left="+Global_Width(width);
        properties += ", top="+Global_Height(height);
    }
    else
    {
        properties += ", left="+(window.event.clientX+10);
        properties += ", top="+(window.event.clientY+height);
    }
    
    if(enableScroll)
        properties += ", scrollbars=1";
    
    
    var popWindow = window.open(url,name,properties);    
}

// ÇØ´ç Ã¢ Å©±âÀÇ Á¤ Áß¾Ó ÁÂÇ¥¸¦ °¡Áö°í ¿É´Ï´Ù.
function Global_Width(popupWindowWidth)
{
    return (document.body.clientWidth/2) - (popupWindowWidth/2);
}

function Global_Height(popupWindowHeight)
{
    return (document.body.clientHeight/2) - (popupWindowHeight/2);
}

//·Î±×ÀÎ °æ°íÃ¢
function Global_LoginAlert(){
    alert("·Î±×ÀÎ ÈÄ ÀÌ¿ëÇÏ½Ê½Ã¿À.");
//    location.href = "http://member.mk.co.kr/member_login.php?successUrl=" + window.location;
}

//°æ°íÃ¢
function AlertMsg(objectName, AlertMent){
    if(!$get(objectName).value){
        alert(AlertMent);
        $get(objectName).focus();
        return false;
    }

    return true;
}

// Áñ°ÜÃ£±â
function AddFav(Title)
{   
    window.external.AddFavorite(location.href, Title);
}

//Åä±Û
function toggle(answerNumber, total_answer) {
 var totalAnswer = total_answer;
 
 curId = "menu" + answerNumber;
 curMenu = eval("document.all." + curId + ".style")
 
 for(i=1; i<=totalAnswer; i++) {
  answerId = "menu" + i;
  if(answerId != curId)
   eval("document.all." + answerId + ".style").display = "none";
 }
 if(curMenu.display == 'none')
  curMenu.display = "block";
 else if(curMenu.display == 'block')
  curMenu.display = "none";
}

//ÇÏÀÌ´Ú ÃâÃ³ Ç¥±â
function HidocLicensePrint(){
    HidocLicenseImage = "<table><tr><td height=50></td></tr></table>";
    HidocLicenseImage += "<a href=\"http://www.hidoc.co.kr\" target=\"_blank\"><img src=\"/Images/HidocLicense.bmp\" border=\"0\"></a>";
    document.getElementById("HidocLicenseDiv").innerHTML = HidocLicenseImage;
}

//ÆË¾÷ Å©±â Á¶Àý
function PopupResize(p_width, p_height){
	if (p_width > 1024) p_width = 1024;
	if (p_height > 768) p_height = 768;

	self.resizeTo(p_width, p_height);
}

//=====================================================================================
// Notice PopUp °ü·Ã (S)
//=====================================================================================

function open_eventpopup(JOpenName,strSrno,JWidth,JHeight,NLeft,NTop) {
	if (GetCookie( JOpenName ) != 'Y' ) {
		window.open('/Default/Popup.asp?Srno='+strSrno,JOpenName,'toolbar=no,resizable=no,scrollbars=yes,status=0,width='+JWidth+',height='+JHeight+',left='+NLeft+',top='+NTop);
	}
}

//=====================================================================================
// Notice PopUp °ü·Ã (E)
//=====================================================================================
function Global_goURL(strVar) {
	if (strVar != 0 )  
	{
		location.href= strVar; 
	}
}
/*==================================================================================================
ÇÏÀÌ´Ú °ü·Ã ½ºÅ©¸³Æ®
==================================================================================================*/

// ÇÏÀÌ´Ú ÀÚ°¡Ã¼Ä¿ ÆË¾÷
function ViewFlashSelfTest(srno)
{
    Global_WindowCenterOpen("http://www.hidoc.co.kr//SelfTest/FlashSelfTest.aspx?srno="+srno, "FlashSelfTest", 900, 731, true, true)
}

// ÇÏÀÌ´Ú ¾Ö´Ï¸ÞÀÌ¼Ç ÆË¾÷
function ViewAnimation(fileName)
{
	var pop = window.open('http://www.hidoc.co.kr/animation/'+fileName,'animation','width=766,height=640');

	if(pop = null)
	{
		alert("ÆË¾÷Â÷´ÜÀ» ÇØÁöÇØ¾ß ÇÕ´Ï´Ù.");	
	}
}
/*==================================================================================================
µðÀÚÀÎ °ü·Ã ½ºÅ©¸³Æ®
==================================================================================================*/

	function changeColor(idName, color)
	{
		idName.style.backgroundColor = color;
	}

//=====================================================================================
// Made in Korea Start
//=====================================================================================
    var ObjectName; // ´Þ·Â ÆË¾÷

    function Calendar(objName)
    {
        ObjectName = objName;

        objName.value = "";
        var n=window.open('/MBoard/CalendarPopup.asp' ,'window','width=300,height=280,status=no,menubar=no,scrollbars=no,resizable=no,left=455,top=180');
    }
//=====================================================================================
// Made in Korea Start
//=====================================================================================

//=====================================================================================
// Made in Korea Start (JQuery)
//=====================================================================================
    function ReturnFieldValue(FieldName, FieldType){   // ÇÊµå¿¡ ÀÔ·ÂµÈ °ªÀ» ¹ÝÈ¯ÇÑ´Ù
        if(FieldName == null){
            alert("ÇÊµå Á¤º¸¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
        }else if(FieldType == "input" || FieldType == "textarea" || FieldType == "select"){
            return $.trim($(FieldType + "[name=" + FieldName+ "]").val());
        }else if(FieldType == "radio" || FieldType == "checkbox"){
            return $.trim($(":input:" + FieldType + "[name=" + FieldName + "]:checked").val());
        }
    }
/*
    function FieldCheck(FieldName){ // ÇÊµå
        var ReturnValue = false;

        if(FieldName == null){
            alert("ÇÊµå Á¤º¸¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
        }else{
            if(ReturnFieldValue(FieldName) == null){
                ReturnValue = false;
            }else
                ReturnValue = true;
        }

        return ReturnValue;
    }
*/
    function FieldCheckAlert(FieldName, AlertMent, FieldType, FocusYN){ // ÇÊµå¿¡ °ªÀÌ ÀÔ·Â‰ç´ÂÁö Ã¼Å©
        var ReturnValue = false;

        if(FieldName == null){
            alert("ÇÊµå Á¤º¸¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
        }else if(!ReturnFieldValue(FieldName, FieldType)){
            alert(AlertMent);

            if(FocusYN = "Y"){
                if(FieldType == "input" || FieldType == "textarea" || FieldType == "select"){
                    $(FieldType + "[name=" + FieldName + "]").focus();
                }else if(FieldType == "radio" || FieldType == "checkbox"){
                    $(":input:" + FieldType + "[name=" + FieldName + "]").focus();
                }
            }

            ReturnValue = false;
        }else{
            ReturnValue = true;
        }

        return ReturnValue;
    }

    function ButtonValueReturn(FieldName){ // Radio,CheckboxÀÇ ¼±ÅÃµÈ °ªÀ» ¹ÝÈ¯ÇÑ´Ù
        var ReturnValue;

        $("input[name=" + FieldName + "]").each(function(){
            if(this.checked == true){
                ReturnValue = this.value;
            }
        });

        return ReturnValue
    }

    function chkPatten(field, patten){ // ÀÔ·ÂµÈ °ªµéÀÇ Çü½Ä Ã¼Å©
        var idCheck = /^[a-zA-Z]{1}[a-zA-Z0-9_-]{0,12}$/;
        var pwCheck = /^[a-zA-Z0-9_-]{4,12}$/;
        var mailCheck = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
        
        patten = eval(patten);
        if(!patten.test(ReturnFieldValue(field, "input"))){
            return false;
        } else {
            return true;
        }
    }

    function NumberCheck(CheckObject){ // ÀÔ·Â ÇÊµå¿¡ ¼ýÀÚ ÀÌ¿ÜÀÇ °ªÀº »èÁ¦
        CheckObject.value = CheckObject.value.replace( /\D/g, '' );
    }

//=====================================================================================
// Made in Korea Finish (JQuery)
//=====================================================================================