/*------------------------------------------------------------------------------------------------------
    ¡Ø ÆûÃ¼Å© JavaScript

	Á¤±ÔÆÐÅÏ½Ä º¯¼öÁ¤ÀÇ
------------------------------------------------------------------------------------------------------*/
    var onlyNumber   = /^[0-9]+$/
    var onlyEnglish  = /^[a-z|A-Z| ]+$/
    var onlyKorea    = /^[¤¡-¤¾|¤¿-¤Ó|°¡-ÆR| ]+$/
    var emailCheck1  = /^([a-z]([a-z|0-9|_]{3,19})@([a-z|A-Z|0-9]{2,20})\.([a-z|A-Z]{2,5}))+$/
    var emailCheck2  = /^([a-z]([a-z|0-9|_]{3,19})@([a-z|A-Z|0-9]{2,20})\.([a-z|A-Z]{2,10})\.([a-z|A-Z]{2,5}))+$/
    var idCheck      = /^([a-z|0-9|_]{4,15})+$/
    var nicNameCheck = /^([°¡-ÆRa-zA-Z0-9_-~`!@#$^&*=+]{2,20})+$/

    var emailAfterCheck1    = /^(([a-z|0-9]{2,20})\.([a-z|A-Z]{2,10})\.([a-z|A-Z]{2,5}))+$/
    var emailAfterCheck2    = /^(([a-z|0-9]{2,20})\.([a-z|A-Z]{2,5}))+$/
    var injectionCheck      = /\/\*|\*\/|@variable|xp_cmdshell|xp_stratmail|xp_sendmail|xp_grantlogin|xp_makewebtask|xp_dirtree|db_owner|xp_|sp_|db_|union|sysobjects|is_srvrolemember|cookie|shutdown|alter|\.js|script|create|declare|select|insert|drop|update|delete|truncate|cmdshell|execmaster|exec|netlocalgroupadministratthens|netuser|kill|xmp|count\(|asc\(|mid\(|char\(|varchar\(|db_name\(\)|openrowset\(\)/
    var injectionEditeCheck = /\/\*|\*\/|@variable|xp_cmdshell|xp_stratmail|xp_sendmail|xp_grantlogin|xp_makewebtask|xp_dirtree|db_owner|xp_|sp_|db_|union|sysobjects|is_srvrolemember|cookie|shutdown|alter|create|declare|truncate|cmdshell|execmaster|exec|netlocalgroupadministratthens|netuser|kill|xmp|count\(|asc\(|mid\(|char\(|varchar\(|db_name\(\)|openrowset\(\)/

    var nicTypeMsg   = "_-~`!@#$^&*=+";
    var imageTypeMsg = "gif, jpg, jpeg, bmp, png";
    var imageType    = /\.(gif|jpg|jpeg|bmp|png)$/
    var movieTypeMsg = "wmv, asf";
    var movieType    = /\.(wmv|asf)$/
    var wordTypeMsg  = "pdf, ppt, pptx, xls, xlsx, csv, doc, docx, hwp, txt";
    var wordType     = /\.(pdf|ppt|pptx|xls|xlsx|csv|doc|docx|hwp|txt)$/
    var comTypeMsg   = "alz, zip";
    var comType      = /\.(alz|zip)$/
    var swfTypeMsg   = "swf";
    var swfType      = /\.(swf)$/
    var inSTypeMsg   = "gif, jpg, jpeg, bmp, swf";
    var inSType      = /\.(gif|jpg|jpeg|bmp|swf)$/
    var exiTypeMsg   = "¾÷·Îµå Á¦ÇÑ";
    var exiType      = /\.(aspx|asp|asa|asax|htm|html|js|jsp|php|vbs|css|xml|config|cab|dll|exe|msi)$/

    var juminFront   = ""; // ÁÖ¹Î¹øÈ£ ¾ÕÀÚ¸® ÀúÀå º¯¼ö

/*------------------------------------------------------------------------------------------------------
    °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö - elementPrototype(ÇØ´ç°´Ã¼)
	¨ÜElement      - °´Ã¼
	¨ÜTypeName     - °´Ã¼Å¸ÀÔ
	¨ÜTagName      - °´Ã¼ÅÂ±×
	¨ÜElementName  - °´Ã¼ÀÌ¸§
	¨ÜElementValue - °´Ã¼°ª
------------------------------------------------------------------------------------------------------*/
    function elementPrototype(checkElement)
    {
    	if (checkElement.length > 1 && objectYN(checkElement.options) == false) // ¶óµð¿À¹Ú½ºorÃ¼Å©¹Ú½º = true
    	{
    		return {
    			Element : checkElement[0],
    			TypeName : checkElement[0].type.toUpperCase(),
    			TagName : checkElement[0].tagName.toUpperCase(),
    			ElementName : checkElement[0].name,
    			ElementValue : checkElement[0].value
    		}
    	}
    	else
    	{
    		return {
    			Element : checkElement,
    			TypeName : checkElement.type.toUpperCase(),
    			TagName : checkElement.tagName.toUpperCase(),
    			ElementName : checkElement.name,
    			ElementValue : checkElement.value
    		}
    	}
    }

/*------------------------------------------------------------------------------------------------------
	Æû¾ÈÀÇ ¾îÆ®¸®ºäÆ® Ã¼Å©ÇÔ¼ö - elementAttribute(ÇØ´ç°´Ã¼)
------------------------------------------------------------------------------------------------------*/
    function elementAttribute(checkElement)
    {
    	// °æ°íÃ¢¿¡ Ç¥½ÃµÉ °´Ã¼¸í
    	if (objectYN(checkElement.getAttribute("title")) == true) {
    		aL_Title = checkElement.getAttribute("title");
    	} else {
    		aL_Title = "";
    	}
    	return {
    		aL_Title  : aL_Title,							    // °´Ã¼¸í

    		aL_Exp : checkElement.getAttribute("exp"),		    // ÇÊ¼öÀÔ·Â
    		aL_Num : checkElement.getAttribute("num"),		    // ¼ýÀÚ¸¸ÀÔ·Â
    		aL_Eng : checkElement.getAttribute("eng"),		    // ¿µ¾î¸¸ÀÔ·Â
    		aL_Kor : checkElement.getAttribute("kor"),		    // ÇÑ±Û¸¸ÀÔ·Â
    		aL_Uid : checkElement.getAttribute("uid"),		    // IDÇü½Ä Ã¼Å©
    		aL_Nic : checkElement.getAttribute("nic"),		    // ´Ð³×ÀÓÇü½Ä Ã¼Å©
    		aL_Inj : checkElement.getAttribute("inj"),		    // ÀÎÁ§¼Ç°ø°Ý¼º ¹®ÀÚ¿­ Ã¼Å©

    		aL_Eml : checkElement.getAttribute("eml"),		    // E-mail Çü½Ä Ã¼Å©
    		aL_Ela : checkElement.getAttribute("ela"),		    // E-mail µÞºÎºÐ Çü½Ä Ã¼Å©

    		aL_Pho : checkElement.getAttribute("pho"),		    // ÀÌ¹ÌÁö¸¸ ¾÷·Îµå
    		aL_Mov : checkElement.getAttribute("mov"),		    // ¿µ»ó¸¸ ¾÷·Îµå
    		aL_Wor : checkElement.getAttribute("wor"),		    // ¹®¼­¸¸ ¾÷·Îµå
    		aL_Com : checkElement.getAttribute("com"),		    // ¾ÐÃàÆÄÀÏ¸¸ ¾÷·Îµå
    		aL_Swf : checkElement.getAttribute("swf"),		    // ÇÃ·¡½ÃÆÄÀÏ¸¸ ¾÷·Îµå
    		aL_Ins : checkElement.getAttribute("ins"),		    // ÀÌ¹ÌÁö/ÇÃ·¡½ÃÆÄÀÏ¸¸ ¾÷·Îµå
    		aL_Exi : checkElement.getAttribute("exi"),		    // ¾÷·Îµå Á¦ÇÑ È®ÀåÀÚ

    		aL_Ju1 : checkElement.getAttribute("ju1"),	 	    // ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸® Ã¼Å©
    		aL_Ju2 : checkElement.getAttribute("ju2"),		    // ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸® Ã¼Å©
    		aL_Jum : checkElement.getAttribute("jum"),		    // ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©

			aL_MaxLen : checkElement.getAttribute("maxlen"),	// ÃÖ´ë ÀÔ·Â±ÛÀÚ¼ö Á¦ÇÑ
			aL_MinLen : checkElement.getAttribute("minlen"),    // ÃÖ¼Ò ÀÔ·Â±ÛÀÚ¼ö Á¦ÇÑ
			aL_MaxNum : checkElement.getAttribute("maxnum"),    // ÃÖ´ë ¼ýÀÚ Á¦ÇÑ
			aL_MinNum : checkElement.getAttribute("minnum")     // ÃÖ¼Ò ¼ýÀÚ Á¦ÇÑ
    	}
    }

/*------------------------------------------------------------------------------------------------------
	°´Ã¼ true,false °Ë»ç - objectYN(°Ë»çÇÒ °´Ã¼)
------------------------------------------------------------------------------------------------------*/
    function objectYN(obj)
    {
    	if (typeof(obj) != "undefined" && obj != "" && obj != null) {
    		return true;
    	} else {
    		return false;
    	}
    }

/*------------------------------------------------------------------------------------------------------
	°´Ã¼ true,false °Ë»ç(¾îÆ®¸®ºäÆ® Àü¿ë) - attYN(°Ë»çÇÒ °´Ã¼)
------------------------------------------------------------------------------------------------------*/
    function attYN(obj)
    {
    	if (typeof(obj) != "undefined" && obj != null) {
    		return true;
    	} else {
    		return false;
    	}
    }

/*------------------------------------------------------------------------------------------------------
	¾Õ, µÚ °ø¹é Á¦°Å - strReplace(°´Ã¼ °ª)
------------------------------------------------------------------------------------------------------*/
    function strReplace(Field)
    {
    	Field = Field.replace(/(^\s*)|(\s*$)/g, "")
      //Field = Field.replace("<p>&nbsp;</p>", "")
    	return Field;
    }

/*------------------------------------------------------------------------------------------------------
	Æû¾ÈÀÇ °´Ã¼°Ë»ç - formCheck(°Ë»çÇÒ Æû)
	»ç¿ë¹ý :if(formCheck(frm) == true){ frm.action = "¾×¼ÇÆäÀÌÁö";frm.submit(); }
------------------------------------------------------------------------------------------------------*/
    function formCheck(form)
    {
    	var obj, att, f;
    	var elementLength = form.elements.length;

    	for (f=0; f<elementLength; f++)
    	{
    		obj = elementPrototype(form.elements[f]);   // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö
    		att = elementAttribute(obj.Element);        // °´Ã¼ ¾îÆ®¸®ºäÆ® Ã¼Å©ÇÔ¼ö

    		if (attYN(att.aL_Exp) == true) { if (fn_Exp(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Num) == true) { if (fn_Num(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Eng) == true) { if (fn_Eng(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Kor) == true) { if (fn_Kor(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Uid) == true) { if (fn_Uid(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Nic) == true) { if (fn_Nic(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Inj) == true) { if (fn_Inj(obj.Element, att.aL_Title) == false) { return false; } }

    		if (attYN(att.aL_Eml) == true) { if (fn_Eml(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Ela) == true) { if (fn_Ela(obj.Element, att.aL_Title) == false) { return false; } }

    		if (attYN(att.aL_Pho) == true) { if (fn_Pho(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Mov) == true) { if (fn_Mov(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Wor) == true) { if (fn_Wor(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Com) == true) { if (fn_Com(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Swf) == true) { if (fn_Swf(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Ins) == true) { if (fn_Ins(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Exi) == true) { if (fn_Exi(obj.Element, att.aL_Title) == false) { return false; } }

    		if (attYN(att.aL_Ju1) == true) { if (fn_Ju1(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Ju2) == true) { if (fn_Ju2(obj.Element, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_Jum) == true) { if (fn_Jum(obj.Element, att.aL_Title) == false) { return false; } }

    		if (attYN(att.aL_MaxLen) == true) { if (fn_Max(obj.Element, att.aL_MaxLen, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_MinLen) == true) { if (fn_Min(obj.Element, att.aL_MinLen, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_MaxNum) == true) { if (fn_Mxn(obj.Element, att.aL_MaxNum, att.aL_Title) == false) { return false; } }
    		if (attYN(att.aL_MinNum) == true) { if (fn_Mnn(obj.Element, att.aL_MinNum, att.aL_Title) == false) { return false; } }
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	Æû¾ÈÀÇ °´Ã¼°Ë»ç - formCheckSub(°Ë»çÇÒ Æû, ±¸ºÐÀÚ, ¸Þ¼¼Áö)
	»ç¿ë¹ý : if(formCheckSub(Æû.ÀÌ¸§, "±¸ºÐÀÚ", "¸Þ¼¼Áö") == false){ return false; }
------------------------------------------------------------------------------------------------------*/
    function formCheckSub(chk, gb, msg)
    {
    	if (gb == "exp") { if (fn_Exp(chk, msg) == false) { return false; } }
    	if (gb == "num") { if (fn_Num(chk, msg) == false) { return false; } }
    	if (gb == "eng") { if (fn_Eng(chk, msg) == false) { return false; } }
    	if (gb == "kor") { if (fn_Kor(chk, msg) == false) { return false; } }
    	if (gb == "uid") { if (fn_Uid(chk, msg) == false) { return false; } }
    	if (gb == "nic") { if (fn_Nic(chk, msg) == false) { return false; } }
    	if (gb == "inj") { if (fn_Inj(chk, msg) == false) { return false; } }

    	if (gb == "eml") { if (fn_Eml(chk, msg) == false) { return false; } }
    	if (gb == "ela") { if (fn_Ela(chk, msg) == false) { return false; } }

    	if (gb == "pho") { if (fn_Pho(chk, msg) == false) { return false; } }
    	if (gb == "mov") { if (fn_Mov(chk, msg) == false) { return false; } }
    	if (gb == "wor") { if (fn_Wor(chk, msg) == false) { return false; } }
    	if (gb == "com") { if (fn_Com(chk, msg) == false) { return false; } }
    	if (gb == "swf") { if (fn_Swf(chk, msg) == false) { return false; } }
    	if (gb == "ins") { if (fn_Ins(chk, msg) == false) { return false; } }
    	if (gb == "exi") { if (fn_Exi(chk, msg) == false) { return false; } }

    	if (gb == "ju1") { if (fn_Ju1(chk, msg) == false) { return false; } }
    	if (gb == "ju2") { if (fn_Ju2(chk, msg) == false) { return false; } }
    	if (gb == "jum") { if (fn_Jum(chk, msg) == false) { return false; } }
    }

    function formCheckSubEdit(chk1, chk2, gb1, gb2, msg)
    {
    	if (gb2 == "edexp") { if (fn_Edexp(chk1, chk2, gb1, msg) == false) { return false; } }
    	if (gb2 == "edinj") { if (fn_Edinj(chk1, chk2, gb1, msg) == false) { return false; } }
    	if (gb2 == "edfckexp") { if (fn_EdFckexp(chk1, chk2, gb1, msg) == false) { return false; } }
    }

/*------------------------------------------------------------------------------------------------------
	ÇÊ¼öÀÔ·Â Ã¼Å©ÇÔ¼ö - fn_Exp(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Exp(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    	{
    		if (strReplace(obj.ElementValue) == "" || strReplace(obj.ElementValue.toLowerCase()) == "<p>&nbsp;</p>" || strReplace(obj.ElementValue) == "&nbsp;")
    		{
    			if (obj.TypeName == "HIDDEN")
    			{
    				alert("[ "+ alertMsg +" ] °ªÀÌ ¾ø½À´Ï´Ù.\n\n°ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇØÁÖ½Ê½Ã¿À.");
    				return false;
    			}
    			else
    			{
    				alert("[ "+ alertMsg +" ] ÇÊ¼ö ÀÔ·Â»çÇ× ÀÔ´Ï´Ù.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	else if (obj.TypeName == "FILE")
    	{
    		if (strReplace(obj.ElementValue) == "")
    		{
    			alert("[ "+ alertMsg +" ] ÇÊ¼ö µî·Ï»çÇ× ÀÔ´Ï´Ù.");
    			obj.Element.focus(); return false;
    		}
    	}
    	else if (obj.TypeName == "SELECT-ONE")
    	{
    		if (strReplace(obj.ElementValue) == "")
    		{
    			alert("[ "+ alertMsg +" ] ÇÊ¼ö ¼±ÅÃ»çÇ× ÀÔ´Ï´Ù.");
    			obj.Element.focus(); return false;
    		}
    	}
    	else if (obj.TypeName == "RADIO")
    	{
    		var Radio_YN = "N";
    		var RadioName = document.getElementsByName(obj.ElementName);

    		if (objectYN(RadioName.length) == true)
    		{
    			for (r=0; r<RadioName.length; r++)
    			{
    				if (RadioName[r].checked == true){
    					Radio_YN = "Y";
    				}
    			}
    			if (Radio_YN == "N")
    			{
    				alert("[ "+ alertMsg +" ] ÇÊ¼ö ¼±ÅÃ»çÇ× ÀÔ´Ï´Ù.");
    				RadioName[0].focus(); return false;
    			}
    		}
    	}
    	else if (obj.TypeName == "CHECKBOX")
    	{
    		var CheckBox_YN = "N";
    		var CheckBoxName = document.getElementsByName(obj.ElementName);

    		if (objectYN(CheckBoxName.length) == true)
    		{
    			for (c=0; c<CheckBoxName.length; c++)
    			{
    				if (CheckBoxName[c].checked == true){
    					CheckBox_YN = "Y";
    				}
    			}
    			if (CheckBox_YN == "N")
    			{
    				alert("[ "+ alertMsg +" ] ÇÊ¼ö ¼±ÅÃ»çÇ× ÀÔ´Ï´Ù.");
    				CheckBoxName[0].focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¼ýÀÚ Ã¼Å©ÇÔ¼ö - fn_Num(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Num(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (onlyNumber.test(obj.ElementValue) == false)
    			{
    				alert("[ "+ alertMsg +" ] ¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¿µ¾î Ã¼Å©ÇÔ¼ö - fn_Eng(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Eng(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (onlyEnglish.test(obj.ElementValue) == false)
    			{
    				alert("[ "+ alertMsg +" ] ¿µ¹®¸¸ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÇÑ±Û Ã¼Å©ÇÔ¼ö - fn_Kor(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Kor(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (onlyKorea.test(obj.ElementValue) == false)
    			{
    				alert("[ "+ alertMsg +" ] ÇÑ±Û¸¸ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ID Ã¼Å©ÇÔ¼ö - fn_Uid(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Uid(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (idCheck.test(obj.ElementValue) == false)
    			{
    				alert("[ "+ alertMsg +" ] ¿µ¹®¼Ò¹®ÀÚ,¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	´Ð³×ÀÓ Ã¼Å©ÇÔ¼ö - fn_Nic(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Nic(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (nicNameCheck.test(obj.ElementValue) == false)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ nicTypeMsg +" ] Æ¯¼ö¹®ÀÚ¸¸ Çã¿ëµË´Ï´Ù.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÀÎÁ§¼Ç°ø°Ý¼º ¹®ÀÚ¿­ Ã¼Å©ÇÔ¼ö - fn_Inj(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Inj(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (injectionCheck.test(obj.ElementValue.toLowerCase()) == true)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ obj.ElementValue.toLowerCase().match(injectionCheck) +" ] ¹®ÀÚ´Â ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
    				//obj.Element.value = obj.ElementValue.replace(obj.ElementValue.match(injectionCheck), "");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	Email ÀüÃ¼ Ã¼Å©ÇÔ¼ö - fn_Eml(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Eml(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (emailCheck1.test(obj.ElementValue) == false && emailCheck2.test(obj.ElementValue) == false)
    			{
    				alert("[ "+ alertMsg +" ] Çü½ÄÀÌ ¿Ã¹Ù¸£Áö¾Ê½À´Ï´Ù.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	Email µÞºÎºÐ Ã¼Å©ÇÔ¼ö - fn_Ela(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Ela(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (emailAfterCheck1.test(obj.ElementValue) == false && emailAfterCheck2.test(obj.ElementValue) == false)
    			{
    				alert("[ "+ alertMsg +" ] Çü½ÄÀÌ ¿Ã¹Ù¸£Áö¾Ê½À´Ï´Ù.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÀÌ¹ÌÁöÆÄÀÏ Ã¼Å©ÇÔ¼ö - fn_Pho(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Pho(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "FILE")
    		{
    			if (imageType.test(obj.ElementValue.toLowerCase()) == false)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ imageTypeMsg +" ] ÆÄÀÏ¸¸ ¾÷·ÎµåÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	µ¿¿µ»óÆÄÀÏ Ã¼Å©ÇÔ¼ö - fn_Mov(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Mov(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "FILE")
    		{
    			if (movieType.test(obj.ElementValue.toLowerCase()) == false)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ movieTypeMsg +" ] ÆÄÀÏ¸¸ ¾÷·ÎµåÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¹®¼­ÆÄÀÏ Ã¼Å©ÇÔ¼ö - fn_Wor(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Wor(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "FILE")
    		{
    			if (wordType.test(obj.ElementValue.toLowerCase()) == false)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ wordTypeMsg +" ] ÆÄÀÏ¸¸ ¾÷·ÎµåÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¾ÐÃàÆÄÀÏ Ã¼Å©ÇÔ¼ö - fn_Com(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Com(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "FILE")
    		{
    			if (comType.test(obj.ElementValue.toLowerCase()) == false)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ comTypeMsg +" ] ÆÄÀÏ¸¸ ¾÷·ÎµåÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÇÃ·¡½ÃÆÄÀÏ Ã¼Å©ÇÔ¼ö - fn_Swf(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Swf(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "FILE")
    		{
    			if (swfType.test(obj.ElementValue.toLowerCase()) == false)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ swfTypeMsg +" ] ÆÄÀÏ¸¸ ¾÷·ÎµåÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÀÌ¹ÌÁö/ÇÃ·¡½ÃÆÄÀÏ Ã¼Å©ÇÔ¼ö - fn_Ins(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Ins(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "FILE")
    		{
    			if (inSType.test(obj.ElementValue.toLowerCase()) == false)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ inSTypeMsg +" ] ÆÄÀÏ¸¸ ¾÷·ÎµåÇØ ÁÖ½Ê½Ã¿À.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¾÷·Îµå Á¦ÇÑ È®ÀåÀÚ Ã¼Å©ÇÔ¼ö - fn_Exi(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Exi(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "FILE")
    		{
    			if (exiType.test(obj.ElementValue.toLowerCase()) == true)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ exiTypeMsg +" ] È®ÀåÀÚ ÆÄÀÏ ÀÔ´Ï´Ù.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¿¡µðÅÍ Ã¼Å©ÇÔ¼ö - fn_Edexp(ÇØ´ç°´Ã¼1, ÇØ´ç°´Ã¼2, ±¸ºÐ, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Edexp(checkElement1, checkElement2, gbEditName, alertMsg)
    {
    	var obj = elementPrototype(checkElement1); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö
    	if (gbEditName == "easy")
    	{
        	obj.ElementValue = eval(obj.ElementName +".getHtml()"); // ¿¡µðÅÍ °´Ã¼°ª ´Ù½Ã Á¤ÀÇ
        }
    	if (strReplace(obj.ElementValue) == "" || strReplace(obj.ElementValue.toLowerCase()) == "<p>&nbsp;</p>" || strReplace(obj.ElementValue) == "&nbsp;")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			alert("[ "+ alertMsg +" ] ÇÊ¼ö ÀÔ·Â»çÇ× ÀÔ´Ï´Ù.");
    			checkElement2.focus(); return false;
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	FCK ¿¡µðÅÍ Ã¼Å©ÇÔ¼ö - fn_EdFckexp(ÇØ´ç°´Ã¼1, ÇØ´ç°´Ã¼2, ±¸ºÐ, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_EdFckexp(checkElement1, checkElement2, gbEditName, alertMsg)
    {
        if(checkElement2 == "" || checkElement2.toLowerCase() == "<p>&nbsp;</p>" || checkElement2.toLowerCase() == "<p></p>" || checkElement2.toLowerCase() == "<br />" || checkElement2.toLowerCase() == "<br>" || checkElement2.toLowerCase() == "&nbsp;")
        {
            alert("[ ³»¿ë ] ÇÊ¼ö ÀÔ·Â»çÇ× ÀÔ´Ï´Ù.");
            checkElement1.EditorDocument.body.focus();
            return false;
        }
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¿¡µðÅÍ ÀÎÁ§¼Ç Ã¼Å©ÇÔ¼ö - fn_Edinj(ÇØ´ç°´Ã¼1, ÇØ´ç°´Ã¼2, ±¸ºÐ, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Edinj(checkElement1, checkElement2, gbEditName, alertMsg)
    {
    	var obj = elementPrototype(checkElement1); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö
    	if (gbEditName == "easy")
    	{
        	obj.ElementValue = eval(obj.ElementName +".getHtml()"); // ¿¡µðÅÍ °´Ã¼°ª ´Ù½Ã Á¤ÀÇ
        }
    	if (strReplace(obj.ElementValue) != "" && strReplace(obj.ElementValue.toLowerCase()) != "<p>&nbsp;</p>" || strReplace(obj.ElementValue) == "&nbsp;")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if (injectionEditeCheck.test(obj.ElementValue.toLowerCase()) == true)
    			{
    				alert("[ "+ alertMsg +" ] [ "+ obj.ElementValue.toLowerCase().match(injectionEditeCheck) +" ] ¹®ÀÚ´Â ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
    				obj.Element.value = obj.ElementValue.replace(obj.ElementValue.match(injectionEditeCheck), "");
    			    checkElement2.focus(); return false;
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸® Ã¼Å©ÇÔ¼ö - fn_Ju1(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Ju1(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if(formCheckSub(checkElement, "num", alertMsg) == false)
    			{
    				return false;
    			}

    			if (strReplace(obj.ElementValue).length != 6) {
    				alert("[ "+ alertMsg +" ] Çü½ÄÀÌ ¿Ã¹Ù¸£Áö¾Ê½À´Ï´Ù.");
    				obj.Element.focus(); return false;
    			}
    		}
    	}
    	juminFront = obj.ElementValue;
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸® Ã¼Å©ÇÔ¼ö - fn_Ju2(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Ju2(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if(formCheckSub(checkElement, "num", alertMsg) == false)
    			{
    				return false;
    			}
    			if (strReplace(obj.ElementValue).length != 7)
    			{
    				alert("[ "+ alertMsg +" ] Çü½ÄÀÌ ¿Ã¹Ù¸£Áö¾Ê½À´Ï´Ù.");
    				obj.Element.focus(); return false;
    			}
    			if (strReplace(juminFront) != "" && strReplace(obj.ElementValue) != "")
    			{
    				if (juminNumberCheckFull(juminFront, obj.ElementValue) == true)
    				{
    					alert("[ "+ alertMsg +" ] Çü½ÄÀÌ ¿Ã¹Ù¸£Áö¾Ê½À´Ï´Ù.");
    					obj.Element.focus(); return false;
    				}
    			}
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÁÖ¹Îµî·Ï¹øÈ£ ÀüÃ¼ Ã¼Å©ÇÔ¼ö - fn_Jum(ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Jum(checkElement, alertMsg)
    {
    	var obj = elementPrototype(checkElement); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "")
    	{
    		if (obj.TypeName == "TEXT" || obj.TypeName == "PASSWORD" || obj.TypeName == "TEXTAREA" || obj.TypeName == "HIDDEN")
    		{
    			if(formCheckSub(checkElement, "num", alertMsg) == false)
    			{
    				return false;
    			}
    			if (strReplace(obj.ElementValue).length != 13)
    			{
    				alert("[ "+ alertMsg +" ] Çü½ÄÀÌ ¿Ã¹Ù¸£Áö¾Ê½À´Ï´Ù.");
    				obj.Element.focus();return false;
    			}
    			if (juminNumberCheckFull(obj.ElementValue.substring(0, 6), obj.ElementValue.substring(6, 13)) == true)
    			{
    				alert("[ "+ alertMsg +" ] Çü½ÄÀÌ ¿Ã¹Ù¸£Áö¾Ê½À´Ï´Ù.");
    				obj.Element.focus();return false;
    			}
    	    }
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	ÁÖ¹Îµî·Ï¹øÈ£ À¯È¿¼º °Ë»ç - juminNumberCheckFull(ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®, ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®)
------------------------------------------------------------------------------------------------------*/
    function juminNumberCheckFull(strJumin1, strJumin2)
    {
    	var juminNumber = strJumin1 + strJumin2;

    	ju = new Array(13);
    	for (var i=0; i<13; i++)
    	{
    		ju[i] = parseInt(juminNumber.charAt(i));
    	}

    	var jn = ju[0]*2 + ju[1]*3 + ju[2]*4 + ju[3]*5 + ju[4]*6 + ju[5]*7 + ju[6]*8 + ju[7]*9 + ju[8]*2 + ju[9]*3 + ju[10]*4 + ju[11]*5;
    	var jn = jn % 11;
    	var re = 11 - jn;

    	if(re > 9) { re = re % 10; }
    	if(re != ju[12])
    		{ return true; }    //¿Ã¹Ù¸£Áö ¾ÊÀº ¹øÈ£
    	else
    		{ return false; }   //¿Ã¹Ù¸¥ ¹øÈ£
    }

/*------------------------------------------------------------------------------------------------------
	¾÷·ÎµåÆÄÀÏÀÌ ¾øÀ»¶§ Ã¼Å©ÇÔ¼ö - fn_Fyn(¾÷·ÎµåÆÄÀÏ °´Ã¼, ¾÷·ÎµåÆÄÀÏÀÌ ¾øÀ»¶§ Ã¼Å©°´Ã¼, ¸Þ¼¼Áö)
	»ç¿ë¹ý : if (fn_Fyn(Æû.ÀÌ¸§, Æû.ÀÌ¸§, "¸Þ¼¼Áö") == false) { return false; }
------------------------------------------------------------------------------------------------------*/
    function fn_Fyn(checkElement1, checkElement2, alertMsg)
    {
    	if (strReplace(checkElement1.value) == "")
    	{
    		if (strReplace(checkElement2.value) == "")
    		{
    			if(formCheckSub(checkElement2, "exp", alertMsg) == false) { return false; }
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	°´Ã¼1/°´Ã¼2 ºñ±³ÇÔ¼ö (¼­·Î °°¾Æ¾ßÇÑ´Ù) - fn_Tpt(ºñ±³°´Ã¼1, ºñ±³°´Ã¼2, ¸Þ¼¼Áö)
	»ç¿ë¹ý : if (fn_Tpt(Æû.ÀÌ¸§, Æû.ÀÌ¸§, "¸Þ¼¼Áö") == false) { return false; }
------------------------------------------------------------------------------------------------------*/
    function fn_Tpt(checkElement1, checkElement2, alertMsg)
    {
    	if (strReplace(checkElement1.value) != "" && strReplace(checkElement2.value) != "")
    	{
    		if (checkElement1.value != checkElement2.value)
    		{
    			alert("["+ alertMsg +"] ¼­·Î ÀÏÄ¡ÇÏÁö¾Ê½À´Ï´Ù.");
    			checkElement1.focus(); return false;
    		}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¼ýÀÚ Ã¼Å©ÇÔ¼ö - fn_Max(ÇØ´ç°´Ã¼, ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Max(checkElement1, checkElement2, alertMsg)
    {
    	var obj = elementPrototype(checkElement1); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "" && checkElement2 != "" && checkElement2 != null)
    	{
			if (checkElement2 < getLen(obj.ElementValue)) {
				alert("ÀÔ·ÂµÈ ±ÛÀÚ¼ö°¡ "+checkElement2+"ÀÚº¸´Ù ÀÛ¾Æ¾ßÇÕ´Ï´Ù.\n\n(¿µ¹® "+checkElement2+"ÀÚ, ÇÑ±Û "+Math.floor(checkElement2/2)+"ÀÚ ±îÁö °¡´ÉÇÕ´Ï´Ù.)");
				obj.Element.focus(); return false;
			}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¼ýÀÚ Ã¼Å©ÇÔ¼ö - fn_Min(ÇØ´ç°´Ã¼, ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Min(checkElement1, checkElement2, alertMsg)
    {
    	var obj = elementPrototype(checkElement1); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "" && checkElement2 != "" && checkElement2 != null)
    	{
			if (checkElement2 > getLen(obj.ElementValue)) {
				alert("ÀÔ·ÂµÈ ±ÛÀÚ¼ö°¡ "+checkElement2+"ÀÚº¸´Ù Ä¿¾ßÇÕ´Ï´Ù.");
				obj.Element.focus(); return false;
			}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¼ýÀÚ Ã¼Å©ÇÔ¼ö - fn_Mxn(ÇØ´ç°´Ã¼, ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Mxn(checkElement1, checkElement2, alertMsg)
    {
    	var obj = elementPrototype(checkElement1); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "" && checkElement2 != "" && checkElement2 != null)
    	{
			if (parseInt(checkElement2) < parseInt(obj.ElementValue)) {
				alert("ÀÔ·ÂµÈ ¼ýÀÚ´Â "+checkElement2+"º¸´Ù ÀÛ¾Æ¾ßÇÕ´Ï´Ù.");
				obj.Element.focus(); return false;
			}
    	}
    	return true;
    }

/*------------------------------------------------------------------------------------------------------
	¼ýÀÚ Ã¼Å©ÇÔ¼ö - fn_Mnn(ÇØ´ç°´Ã¼, ÇØ´ç°´Ã¼, ¸Þ¼¼Áö)
------------------------------------------------------------------------------------------------------*/
    function fn_Mnn(checkElement1, checkElement2, alertMsg)
    {
    	var obj = elementPrototype(checkElement1); // °´Ã¼¼Ó¼º Ã¼Å©ÇÔ¼ö

    	if (strReplace(obj.ElementValue) != "" && checkElement2 != "" && checkElement2 != null)
    	{
			if (parseInt(checkElement2) > parseInt(obj.ElementValue)) {
				alert("ÀÔ·ÂµÈ ¼ýÀÚ´Â "+checkElement2+"º¸´Ù Ä¿¾ßÇÕ´Ï´Ù.");
				obj.Element.focus(); return false;
			}
    	}
    	return true;
    }

/*=====================================================================================================
    ±âÅ¸ function
======================================================================================================*/
	function strTrim(fld)
	{
		var pattern = /(^\s*)|(\s*$)/g; // \s °ø¹é ¹®ÀÚ
		fld.value = fld.value.replace(pattern, "");
		return fld.value;
	}

	function getLen(str) {
	    var temp;
	    var len = str.length;
	    var tot_cnt = 0;
	    for(k=0; k < len; k++){
	    	temp = str.charAt(k);
	    	if(escape(temp).length > 4){ tot_cnt += 2; }
	    	else{ tot_cnt++; }
	    }
	    return tot_cnt;
	}

	function delHref(href)
	{
		if(confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
		document.location.href = href;
	}

	function onlyNum()
	{
    	if((event.keyCode<48)||(event.keyCode>57))
    	event.returnValue=false;
	}

	function engChk()
	{
    	 if((event.keyCode < 48) || (event.keyCode > 57) && (event.keyCode < 65) || (event.keyCode > 90) && (event.keyCode < 97) || (event.keyCode > 122))
    		  event.returnValue=false;
	}

	function handlerHomepage()
	{
    	 if((event.keyCode != 46) && (event.keyCode < 48) || (event.keyCode > 57) && (event.keyCode < 65) || (event.keyCode > 90)&& (event.keyCode < 97) || (event.keyCode > 122))
    	 event.returnValue = false;
	}

    function handlerEng()
    {
    	 if((event.keyCode < 48) || (event.keyCode > 57) && (event.keyCode < 65) || (event.keyCode > 90) && (event.keyCode < 97) || (event.keyCode > 122))
    	 event.returnValue = false;
    }

	function vodPlay(src,auto,w,h)
	{
		var width_val  = 448;
		var height_val = 298;
		if(w) width_val  = w;
		if(h) height_val = h;

		ie = "<object id=\"vodpalyer\" name=\"vodpalyer\" width="+width_val+" height="+height_val+" viewastext style=\"z-index:1\""
			+ " classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" "
			+ " codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\""
			+ " standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\">"
			+ "<param name=\"FileName\" value=\""+src+"\">"
			+ "<param name=\"ANIMATIONATSTART\" value=\"1\">"
			+ "<param name=\"AUTOSTART\" value=\""+auto+"\">"
			+ "<param name=\"BALANCE\" value=\"0\">"
			+ "<param name=\"CURRENTMARKER\" value=\"0\">"
			+ "<param name=\"CURRENTPOSITION\" value=\"0\">"
			+ "<param name=\"DISPLAYMODE\" value=\"4\">"
			+ "<param name=\"ENABLECONTEXTMENU\" value=\"0\">"
			+ "<param name=\"ENABLED\" value=\"1\">"
			+ "<param name=\"FULLSCREEN\" value=\"0\">"
			+ "<param name=\"INVOKEURLS\" value=\"1\">"
			+ "<param name=\"PLAYCOUNT\" value=\"1\">"
			+ "<param name=\"RATE\" value=\"1\">"
			+ "<param name=\"SHOWCONTROLS\" value=\"1\">"
			+ "<param name=\"SHOWSTATUSBAR\" value=\"-1\">"
			+ "<param name=\"STRETCHTOFIT\" value=\"0\">"
			+ "<param name=\"TRANSPARENTATSTART\" value=\"1\">"
			+ "<param name=\"UIMODE\" value=\"FULL\">"
			+ "<param name=\"displaybackcolor\" value=\"0\">"
			+ "</object>"

		ff = "<embed id=\"vodpalyer\" name=\"vodpalyer\" animationatstart=\"0\" autostart=\"1\" displaybackcolor=\"black\" showcontrols=\"1\" showstatusbar=\"1\" showtracker=\"1\""
			+ " showpositioncontrols=\"0\" pluginspage=\"http://www.microsoft.com/korea/windows/windowsmedia/\""
			+ " src="+src+" type=\"video/x-ms-asf-plugin\" width="+width_val+"  height="+height_val+" ></embed>"

    	var sUserAgent = navigator.userAgent.toLowerCase();
    	var isIE = (sUserAgent.indexOf("msie 6.") != -1 && (sUserAgent.indexOf("msie 7.") < 0 || sUserAgent.indexOf("opera") == -1 && window.document.all)) ? true:false;
    	if(isIE){
		    document.write(ie);
		}else{
		    document.write(ff);
		}
	}

	function vodPlayFile(src)
	{
		vodpalyer.Filename = src;
		vodpalyer.AutoStart = "True";
	}
