
<!--

String.prototype.trim = function () {
	return this.replace(/(^\s*)|(\s*$)/g, "");
};
function back() {
	history.back();
}

//file È®ÀåÀÚ °Ë»ç
function isValidImageExt(o)
{
	var v = o.value.toLowerCase();

	if(v != null)
	{
		if( checkExt(v, ".jpg") ) 	return true;
		if( checkExt(v, ".gif") ) 	return true;

		alert("»ç¿ëÇÒ¼ö ¾ø´Â ÆÄÀÏ Çü½ÄÀÔ´Ï´Ù");

		o.select();
		o.focus();

	}
	else {
		return true;
	}

	return false;
}


//file È®ÀåÀÚ °Ë»ç
function isValidPDFExt(o)
{
	var v = o.value.toLowerCase();

	if(v != null)
	{
		if( checkExt(v, ".pdf") ) 	return true;

		alert("»ç¿ëÇÒ¼ö ¾ø´Â ÆÄÀÏ Çü½ÄÀÔ´Ï´Ù");

		o.select();
		o.focus();
	}
	else {
		return true;
	}

	return false;
}

//file È®ÀåÀÚ °Ë»ç
function isValidMEDIAExt(o)
{
	var v = o.value.toLowerCase();

	if(v != null)
	{
		if( checkExt(v, ".wmv") ) 	return true;

		alert("»ç¿ëÇÒ¼ö ¾ø´Â ÆÄÀÏ Çü½ÄÀÔ´Ï´Ù");

		o.select();
		o.focus();
	}
	else {
		return true;
	}

	return false;
}

//file È®ÀåÀÚ °Ë»ç
function isValidDOCExt(o)
{
	var v = o.value.toLowerCase();

	if(v != null)
	{
		if( checkExt(v, ".pdf") ) 	return true;

		alert("»ç¿ëÇÒ¼ö ¾ø´Â ÆÄÀÏ Çü½ÄÀÔ´Ï´Ù");

		o.select();
		o.focus();
	}
	else {
		return true;
	}

	return false;
}

//file È®ÀåÀÚ °Ë»ç
function isValidFLASHExt(o)
{
	var v = o.value.toLowerCase();

	if(v != null)
	{
		if( checkExt(v, ".swf") ) 	return true;

		alert("»ç¿ëÇÒ¼ö ¾ø´Â ÆÄÀÏ Çü½ÄÀÔ´Ï´Ù");

		o.select();
		o.focus();
	}
	else {
		return true;
	}

	return false;
}


function checkExt(v, ext)
{
	if( v.lastIndexOf(ext) >0 ) {
		return true;
	}
	return false;
}

//ÁÖ¹Îµî·Ï ¹øÈ£ °Ë»ç
function isValidJumin(v) {
	var sum = 0;
	for (i = 0; i < 8; i++) {
		sum += v.substring(i, i + 1) * (i + 2);
	}
	for (i = 8; i < 12; i++) {
		sum += v.substring(i, i + 1) * (i - 6);
	}
	sum = 11 - (sum % 11);
	if (sum >= 10) {
		sum -= 10;
	}
	if (v.substring(12, 13) != sum || (1 > v.substring(6, 7) || 4 < v.substring(6, 7))) {
		return false;
	}
	return true;
}

//¼ýÀÚ·Î ±¸¼ºµÇ¾îÀÖ³ª?
function isNumber(v, message) {
	var str = v.value;
	for (var i = 0; i < str.length; ++i) {
		c = str.charAt(i);
		if ((c < "0" || c > "9")) {
			alert(message + " \ud56d\ubaa9\uc740 \uc22b\uc790\ub9cc \uc785\ub825\ud558\uc154\uc57c\ud569\ub2c8\ub2e4");
			v.focus();
			return false;
		}
	}
	return true;
}

//ÇÑ±Û·Î ±¸¼ºµÇ¾îÀÖ´Â°¡?
function isHangul(v, message) {
	var str = v.value;
	for (var i = 0; i < str.length; ++i) {
		c = str.charAt(i);
		if (!((c < "0" || c > "9") && (c < "a" || c > "z") && (c < "A" || c > "Z"))) {
			alert(message + " \ud56d\ubaa9\uc740 \ud55c\uae00\uc774\uc5b4\ub9cc\ud569\ub2c8\ub2e4.");
			v.focus();
			return false;
		}
	}
	return true;
}

function isOverLength(comp, length) {
	var val = comp.value;
	if (val.length > length) {
		comp.focus();
		return false;
	} else {
		return true;
	}
}

function isNotLength(comp, length, message) {
	var val = comp.value;
	if (val.length > length) {
		alert(message + " \ud56d\ubaa9\uc740 " + length + " \uc774\ud558\uc5ec\uc57c\ud569\ub2c8\ub2e4");
		comp.focus();
		return false;
	} else {
		return true;
	}
}
function isNotNull2(comp, focusComp, message) {
	var val = comp.value;
	if (val.trim() == "") {
		alert(message + " \ud56d\ubaa9\uc740  \ud544\uc218\uc785\ub2c8\ub2e4.");
		focusComp.focus();
		return false;
	} else {
		return true;
	}
}
function isNotNull(comp, message) {
	var val = comp.value;
	if (val.trim() == "") {
		alert(message + "¸¦ ÀÔ·Â(¼±ÅÃ)ÇØ ÁÖ¼¼¿ä.");
		comp.focus();
		return false;
	} else {
		return true;
	}
}

function isFileCheck(comp) {
	var val = comp.value;
	if (val.trim() == "") {
		comp.focus();
		return true;
	} else {
		return false;
	}
}
function isNull(comp) {
	var val = comp.value;
	if (val.trim() == "") {
		comp.focus();
		return true;
	} else {
		return false;
	}
}

function isNotChecked(comp, message) {
	var len = comp.length;
	for (var i = 0; i < len; i++) {
		if (comp[i].checked) {
			return true;
		}
	}
	alert(message + " \ud56d\ubaa9\uc744 \uc120\ud0dd\ud558\uc154\uc57c\ud569\ub2c8\ub2e4");
	comp[0].focus();
	return false;
}
function isSame(val1, val2) {
	if (val1 == val2) {
		return true;
	} else {
		return false;
	}
}
//------------
function isRadio(frm, message)
{
	var oAgreement = frm;

	for(var i=0; i < oAgreement.length; i++)
	{
		if(oAgreement[i].disabled || oAgreement[i].checked) {
			return true;
		}
	}

	alert(message + "¼±ÅÃÇØ ÁÖ½Ê½Ã¿À.");
	return false;
}

function CheckSpace( str )
{
     if(str.search(/\s/) != -1){
     	return 1;
     }

     else {
         return "";
     }
}

function CheckID( frm )
{
     /* check whether input value is included space or not  */
     if( frm.value == ""){
     	alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
     	return 0;
     }

     var retVal = CheckSpace( frm.value );

     if( retVal != "" ) {
         alert("¾ÆÀÌµð´Â ºó °ø°£ ¾øÀÌ ¿¬¼ÓµÈ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
         return 0;
     }
     if( frm.value.charAt(0) == '_') {
	 alert("¾ÆÀÌµðÀÇ Ã¹¹®ÀÚ´Â '_'·Î ½ÃÀÛÇÒ¼ö ¾ø½À´Ï´Ù.");
	 return 0;
     }

     /* checkFormat  */
     var isID = /^[a-z0-9_]{4,10}$/;
     if( !isID.test(frm.value) ) {
         alert("¾ÆÀÌµð´Â 4~10ÀÚÀÇ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ,Æ¯¼ö±âÈ£(_)¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
         return 0;
     }
     return 1;
}
function CheckPwd( frm )
{
	 if( frm.value == ""){
     	alert("¾ÏÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
     	return 0;
     }

	 var isID = /^[A-Za-z0-9]{4,8}$/;
     if( !isID.test(frm.value) ) {
         alert("ºñ¹Ð¹øÈ£´Â 4~8ÀÚÀÇ ¿µ¹®ÀÚ(´ë¼Ò¹®ÀÚ ±¸º°)¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
         return 0;
     }
     return 1;
}
function email_chk(str) {

     if(str == ""){
     	alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
     	return 0;
     }
     var retVal = CheckSpace( str );
     if( retVal != "") {
         alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ºó°ø°£ ¾øÀÌ ³ÖÀ¸¼¼¿ä.");
         return 0;
     }

     /* checkFormat */
     var isEmail = /[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*@[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*/;
     if( !isEmail.test(str) ) {
         alert("ÀÌ¸ÞÀÏ Çü½ÄÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù.");
         return 0;
     }
     if( str.length > 60 ) {
         alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò´Â 60ÀÚ±îÁö À¯È¿ÇÕ´Ï´Ù.");
         return 0;
     }
  return true;
}


function test()
{
	alert("test");
}
function goSite(obj)
{
	if(obj == null || obj.value == "")	return;
	
	wnd2 = window.open(obj.value);
}


function openBrWindow(theURL) { //v2.0

	MM_openBrWindow(theURL, '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes');

}

function openImage(imageNo){


}


//-->

