
//== NULL Ã¼Å© ==//
function NullCheck(obj,msg) {
if (obj.value == "") {
alert(msg + ' ±âÀÔÇØ ÁÖ¼¼¿ä')
obj.focus()
return true
}
}

function ENullCheck(obj,msg) {
if (obj.value == "") {
alert('Please enter ' + msg)
obj.focus()
return true
}
}
//============

//== NULL & ±æÀÌ Á¦ÇÑ Ã¼Å© ==/
function LenCheck(obj, msg, lmin, lmax) {
	if (obj.value == "") {
        alert(msg + 'À»(¸¦) ±âÀÔÇØ ÁÖ¼¼¿ä');
        obj.focus();
        return true;
        }
	else if (obj.value.length < lmin || obj.value.length > lmax) {
		alert(msg + 'Àº(´Â) ' + lmin + '~' + lmax + 'ÀÌ³» ÀÌ¾î¾ß ÇÕ´Ï´Ù.');
		obj.focus();
        return true;
        }
    
	}
//============================



//== ¿µ¹® ¼ýÀÚ Á¶ÇÕ Ã¼Å© ==//
function CombinationCheck(obj, msg)
	{
		var re = new RegExp("[^0-9a-zA-Z]", "g");
		if(re.exec(obj.value) != null)
		{
			alert(msg + " ¿µ¹®°ú ¼ýÀÚÀÇ Á¶ÇÕÀ¸·Î ¸¸µå¼Å¾ß ÇÕ´Ï´Ù.");
			obj.focus();
			return true;
		}
		return false;
	}
//========================

//== ¼ýÀÚ Á¶ÇÕ Ã¼Å© ==//
function NumCheck(obj, msg)	{
	var re = new RegExp("[^0-9]", "g");
	if(re.exec(obj.value) != null) {
		alert(msg + " ¼ýÀÚ¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		obj.focus();
		return true;
	}
	return false;
}
//========================


//== ÇÑ±Û Á¶ÇÕ Ã¼Å© ==/
function Hangulcheck(obj,msg) {
var Alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';

var str_name = obj.value;
	for(var i=0; i < str_name.length; i++) {
		if (Alpha.indexOf( str_name.charAt(i)) >= 0) {
			alert(msg + 'ÇÑ±Û·Î ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			obj.focus();
			return true;
		}
	}
}
//===============


//=====================
//== ÀüÀÚ¿ìÆí Ã¼Å© ==//
function Mailcheck(mail) {
var Alpha_mail = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@.-';
var str_email = mail.value;
	for(var i = 0; i < str_email.length ; i++ )
	{
		if(Alpha_mail.indexOf(str_email.charAt(i)) == -1) {
			alert('¸ÞÀÏ Çü½ÄÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.');
			mail.focus();
			return  true;
		}
	}
	if ((str_email.length != 0) && (str_email.search(/(\S+)@(\S+)\.(\S+)/) == -1)){
	alert('¸ÞÀÏ Çü½ÄÀÌ Àß¸øµÇ¾ú½À´Ï´Ù');
	mail.focus();
	return true;
	}
}

function EMailcheck(mail) {
var Alpha_mail = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@.-';
var str_email = mail.value;
	for(var i = 0; i < str_email.length ; i++ )
	{
		if(Alpha_mail.indexOf(str_email.charAt(i)) == -1) {
			alert('E-mail type is not correct.');
			mail.focus();
			return  true;
		}
	}
	if ((str_email.length != 0) && (str_email.search(/(\S+)@(\S+)\.(\S+)/) == -1)){
	alert('E-mail type is not correct.');
	mail.focus();
	return true;
	}
}
//==========================

//======== ÀÌ¹ÌÁö(¿Â,¾Æ¿ô ¸¶¿ì½º) ========== 
function imageOn(iname,im) { 
    var d = eval('document.'+iname);
    d.src=im;
 } 
 
 function imageOut(iname,im) { 
    var d = eval('document.'+iname);
    d.src=im;
 } 

 //===============
 function scheck(){
  if (NullCheck(document.ser.sstring,"°Ë»ö¾î¸¦")) return;
	document.ser.submit()
}


function page(p) {
	f = document.bform;
	f.page.value = p;
	f.submit();
}


function change(form,upage){
      var list=ser.fbpart.selectedIndex;
	  if (ser.fbpart.options[list].value != "" ) {
		bpart = ser.fbpart.options[list].value;  
		if (bpart == "00"){
			bpart = ""
		}
		self.location = upage+".asp?bpart="+bpart;
	  } else {
		  alert( "´Ù½Ã ¼±ÅÃÇØ ÁÖ¼¼¿ä");
	  }
      form.fbpart.selectedIndex = 0;
}

function famurl(form){
      var list=form.familys.selectedIndex;
	  if (form.familys.options[list].value != "" ) {
		opurl = form.familys.options[list].value;  
		window.open (opurl,"","");
	  } else {
		  alert( "´Ù½Ã ¼±ÅÃÇØ ÁÖ¼¼¿ä");
	  }
}