//¼ýÀÚ,¿µ¹® ÀÌ¿Ü¿¡ ¹®ÀÚ Ã¼Å© ÇÔ¼ö
	function char_chk(input) {
		  var err_cnt=0
		for (var i = 0; i < input.length; i++) {
			var val = input.charAt(i);
		if (!((val >= "0" && val <= "9") || (val >= "a" && val <= "z") || (val >= "A" && val <= "Z")))
			err_cnt ++;
		}
		if (err_cnt == 0 ) return true; else     return false;
		}

//¶óµð¿À ¹öÆ° Ã¼Å©
 function radiochk(radioValue){ 
	var check = ""
	var num = radioValue;
	for(i=0;i<=num.length-1;i++){
	if(num[i].checked){
	    check  = "yes" }
    }
	if( check == "yes"){
	return true;
	}
	else {
	return false;
	}
}
//Ã¼Å©¹Ú½º
 
		function chkBox(chkValue){
			var count;
			var chkValue;

			count = 0;

			for (i = 0; i < chkValue.length; i++)
			{
			if (chkValue[i].checked)
			count++;
			}
			if(count > 3){
//			alert("3°³ ÀÌÇÏ¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
			return false;
			}
		}

		function chkBoxEx(chkValue){
			var count;
			var chkValue;

			count = 0;

			for (i = 0; i < chkValue.length; i++)
			{
			if (chkValue[i].checked)
			count++;
			}
			if(count > 3){
    		alert("¼ºÇü °ü½É ºÐ¾ß´Â 3°³ ÀÌÇÏ¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
			return false;
			}
		}

// ÀüÈ­¹øÈ£ ¼ýÀÚ Ã¼Å© ÇÔ¼ö
     function isNum(numValue){
       var regNum = /^[0-9]+$/

	   if(regNum.test(numValue))  return true;

	   return false;
	 }

	//Å° ÀÚµ¿ ÀÌµ¿
	function MoveNext(obj, Next){
			if ( obj.value.length == obj.maxLength ){
				Next.focus( );
				Next.select( );
				return false;
			}
	}

	//°ø¹é¹®ÀÚ¿­Ã¼Å©
	function BlankCheck(word){
       for ( var i=0, sp=1; sp==1 && i < word.length; i++ )
		{ // °ø¹éÀÌ ¾Æ´Ñ ¹®ÀÚ°¡ ³ª¿Ã¶§±îÁö ¹Ýº¹
			if ( word.charAt(i) == ' ' )
				sp = 1;
			else
				sp = 0;
		}	  
	    if( sp == 1){
			return false;
		}			
	}

//ºó°ø¹é Ã¼Å© ÇÔ¼ö
function chkSpc(chkStr)
{
	    title=chkStr;
       for ( var i=0, sp=1; sp==1 && i < title.length; i++ )
		{ // °ø¹éÀÌ ¾Æ´Ñ ¹®ÀÚ°¡ ³ª¿Ã¶§±îÁö ¹Ýº¹
			if ( title.charAt(i) == ' ' )
				 sp = 1;
			else
				 sp = 0;
		}	  
		    if (sp == 1){
				return false;
		    }
}

//¾ÕµÚ°ø¹éÁ¦°Å
	function jstrim(s) {
		while ( s.charAt(0) == " ") s = s.substring(1);

		while (s.charAt(s.length-1) == " ") {
			s = s.substring(0, s.length-1);
		}
		return s;
	}

//ÆË¾÷Ã¢
function popup(file_name,window_name,height,width){

      //¿øµµ¿ì ¿ÀÇÂ 

     openWindow=window.open( file_name,window_name,

      "toolbar=auto,location=no,directories=no,status=0,menubar=no,scrollbars=no,top=50,left=50,resizable=no,width="+width+",height="+height);

}

function openWin(theURL,winName,features) 

        { 

                newWin=window.open(theURL,winName,features);

                if (newWin !=null) {

                                        newWin.opener=self;

                        }

        }

		function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)

{

  toolbar_str = toolbar ? 'yes' : 'no';

  menubar_str = menubar ? 'yes' : 'no';

  statusbar_str = statusbar ? 'yes' : 'no';

  scrollbar_str = scrollbar ? 'yes' : 'no';

  resizable_str = resizable ? 'yes' : 'no';

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);

}


//ÀÌ¸ÞÀÏ
    function EmailCheck(strEmail){
    var regDoNot = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; 
    /** ÇÊ¼ö»çÇ×
     - @ÀÌÀü¿¡ ÇÏ³ªÀÌ»óÀÇ ¹®ÀÚ°¡ ÀÖ¾î¾ß ÇÔ
     - @°¡ ÇÏ³ªÀÖ¾î¾ß ÇÔ
     - Domain¸í¿¡ .ÀÌ ÇÏ³ª ÀÌ»ó ÀÖ¾î¾ß ÇÔ
     - Domain¸íÀÇ ¸¶Áö¸· ¹®ÀÚ´Â ¿µ¹®ÀÚ 2~3°³ÀÌ¾î¾ß ÇÔ **/
    var regMust = /^[a-zA-Z0-9\-\.\_]+\@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3})$/;
    
    if ( !regDoNot.test(strEmail) && regMust.test(strEmail) )
        return true;
    else
        return false;
	}

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 openWin(theURL,winName,features) 

        { 

                newWin=window.open(theURL,winName,features);

                if (newWin !=null) {

                                        newWin.opener=self;

                        }

        }

		function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)

{

  toolbar_str = toolbar ? 'yes' : 'no';

  menubar_str = menubar ? 'yes' : 'no';

  statusbar_str = statusbar ? 'yes' : 'no';

  scrollbar_str = scrollbar ? 'yes' : 'no';

  resizable_str = resizable ? 'yes' : 'no';

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);

}
