	//Æ¯¼ö¹®ÀÚ ¹× ÇÑ±ÛÀÔ·Â ¹æÁö È®ÀÎ
	function FuncString(chkfield){
			var checkOK = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
			var checkStr = chkfield;
			var allValid = true;
			var allNum = "";
			checkStr = checkStr.toUpperCase();
			for (i = 0;  i < checkStr.length;  i++)
			{
			  ch = checkStr.charAt(i);
			  for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
					break;
			    	if (j == checkOK.length)
			    	{
			      		allValid = false;
			      		break;
			    	}
			}
		if (allValid == false) return false;
		if (allValid == true) return true;
	}

	//ÀÌ¸ÞÀÏ ¹®ÀÚ¿­ È®ÀÎ
	function FuncEmailString(chkfield){
			var checkOK = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ@._-";
			var checkStr = chkfield;
			var allValid = true;
			var allNum = "";
			checkStr = checkStr.toUpperCase();
			for (i = 0;  i < checkStr.length;  i++)
			{
			  ch = checkStr.charAt(i);
			  for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
					break;
			    	if (j == checkOK.length)
			    	{
			      		allValid = false;
			      		break;
			    	}
			}
		if (allValid == false) return false;
		if (allValid == true) return true;
	}


	//ÀÌ¸ÞÀÏ Çü½Ä È®ÀÎ ---------------------------------------------------
	function FuncEmailChk(p_obj,p_name){
		if(p_obj.value == ""){
			alert(p_name + " ºó¹®ÀÚ È¤Àº °ø¹éÀ» ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
			p_obj.focus();
			return false;
		
		}else{
			var str = p_obj.value;
			if (FuncEmailString(str)) {
				for(var i=0;i<str.length;i++){
					if (str.substring(i+1,i+2) =="@"){
						var str_1 = "y";
					}
		
					if (str_1 == "y" && str.substring(i,i+1) =='.'){
						return true;
					}
		
				}
				alert("ÀÌ¸ÞÀÏ Çü½Ä¿¡ ¸ÂÁö ¾Ê½À´Ï´Ù.");
				p_obj.focus();
				return false;
			
			
			}else{
				alert("ÀÌ¸ÞÀÏÀº ÇÑ±ÛÀ» ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
				return false;
			}

		}
		
	}


	//¼ýÀÚ¿­ ÀÔ·ÂÈ®ÀÎ ---------------------------------------------------
	function FuncCheckNumeric(p_obj,p_name){
		var tocheck = p_obj.value;
		var isnum = true;
		if(isNaN(tocheck)){
			alert(p_name + " ¼ýÀÚ¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.");
			p_obj.value ="";
			p_obj.focus();
			return false;
		}
		
		for (var j = 0 ; j < tocheck.length; j++) {
 			if (tocheck.substring(j, j + 1) != "0" &&
		    tocheck.substring(j, j + 1) != "1" &&
		    tocheck.substring(j, j + 1) != "2" &&
		    tocheck.substring(j, j + 1) != "3" &&
		    tocheck.substring(j, j + 1) != "4" &&
		    tocheck.substring(j, j + 1) != "5" &&
		    tocheck.substring(j, j + 1) != "6" &&
		    tocheck.substring(j, j + 1) != "7" &&
		    tocheck.substring(j, j + 1) != "8" &&
		    tocheck.substring(j, j + 1) != "9") {
				alert("¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");
				p_obj.value ="";
				p_obj.focus();
				return false;
			}
		}
		
		return true;
	}


	//³¯Â¥À¯Çü °Ë»ö
	function FuncCheckDate(p_obj,p_name){
		var tocheck = p_obj.value;
		var tempdate = "";
		var resultdate = "";
		var firstzerodigit = "";
		
		for (var j = 0 ; j < tocheck.length; j++) {
 			if (tocheck.substring(j, j + 1) == "0" ||
		    tocheck.substring(j, j + 1) == "1" ||
		    tocheck.substring(j, j + 1) == "2" ||
		    tocheck.substring(j, j + 1) == "3" ||
		    tocheck.substring(j, j + 1) == "4" ||
		    tocheck.substring(j, j + 1) == "5" ||
		    tocheck.substring(j, j + 1) == "6" ||
		    tocheck.substring(j, j + 1) == "7" ||
		    tocheck.substring(j, j + 1) == "8" ||
		    tocheck.substring(j, j + 1) == "9") {
			
				tempdate += (tocheck.substring(j, j + 1)).toString();
			}
		}
		
		if (tempdate.length != 8){
			alert(p_name + "ÀÇ ³¯Â¥ Çü½ÄÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
			p_obj.value = "";
			p_obj.focus();
			return false;
		}else{
			resultdate = tempdate.substr(0,4).toString() + '-' +  tempdate.substr(4,2).toString() + '-' + tempdate.substr(6,2).toString();
			var checkdate = new Date((resultdate.toString()).replace("-","/"));
		
					
			if (parseInt(tempdate.substr(0,4)) != parseInt(checkdate.getYear())){
				alert(p_name + "Àº À¯È¿ÇÏÁö ¾ÊÀº ³¯Â¥ÀÔ´Ï´Ù.");
				p_obj.value = "";
				p_obj.focus();
				return false;
			}
			firstzerodigit = tempdate.substr(4,1).replace("0","") + tempdate.substr(5,1)		
			if (parseInt(firstzerodigit) != parseInt(checkdate.getMonth())+1){
				alert(p_name + "Àº À¯È¿ÇÏÁö ¾ÊÀº ³¯Â¥ÀÔ´Ï´Ù.");
				p_obj.value = "";
				p_obj.focus();
				return false;
			}
      firstzerodigit = tempdate.substr(6,1).replace("0","") + tempdate.substr(7,1)
			if (parseInt(firstzerodigit) != parseInt(checkdate.getDate())){
				
				alert(p_name + "Àº À¯È¿ÇÏÁö ¾ÊÀº ³¯Â¥ÀÔ´Ï´Ù.");
				p_obj.value = "";
				p_obj.focus();
				return false;
			}
			p_obj.value = resultdate;
			return true;
		}
	}


	//ºó¹®ÀÚ¿­ °Ë»ö ---------------------------------------------------
	function FuncNullchk(p_obj,p_name){
		var p_string = p_obj.value;
		if (p_string.length < 1){
			alert(p_name + " ºó¹®ÀÚ È¤Àº °ø¹éÀ» ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
			p_obj.focus();
			return false;
		}
		return true;
	}


	//ÀüÈ­¹øÈ£ Ã¼Å© ---------------------------------------------------
	function FuncTelCheck(p_obj,p_name){
		
			if(!FuncNullchk(eval(p_obj + "1"),p_name)){
				return false;
			}else{
				if(!FuncCheckNumeric(eval(p_obj + "1"),p_name)){
					return false;
				}
		
			}
		
			if(!FuncNullchk(eval(p_obj + "2"),p_name)){
				return false;
			}else{
				if(!FuncCheckNumeric(eval(p_obj + "2"),p_name)){
					return false;
				}
		
			}
		
			if(!FuncNullchk(eval(p_obj + "3"),p_name)){
				return false;
			}else{
				if(!FuncCheckNumeric(eval(p_obj + "3"),p_name)){
					return false;
				}
			}
			return true;
	}






	//¶óÀÎ ½ºÅ©·Ñ Ã³¸®
	function funcColor(p_obj,p_num){
		if(p_num == "1"){
			if(p_obj.style.background){
				if(p_obj.style.background == "#f3f3f3"){
					p_obj.style.background = "#e1d1bd";
				}
			}else{
				p_obj.style.background = "#e1d1bd";
			}
			
		}else{
			if(p_obj.style.background == "#e1d1bd"){
				p_obj.style.background = "#f3f3f3";
			}
		}
		
	}
	
	//¶óÀÎ ½ºÅ©·Ñ Ã³¸®1
	function funcColorReceive(p_obj,p_num,p_color){
		if(p_num == "1"){
			p_obj.style.background = p_color;
			
		}else{
			p_obj.style.background = p_color;
		}
		
	}

	//¼±ÅÃ¶óÀÎ Ç¥½Ã
	function FuncSetColor(p_frm,p_num){
		if(p_frm.clicknum.value != ""){
			eval("strline" + p_frm.clicknum.value).style.background = "#f3f3f3";
		}
		eval("strline" + p_num).style.background = "#ffd700";
		p_frm.clicknum.value = p_num;

	}

	//±Ý¾× À¯ÇüÀ¸·Î º¯°æ
	function FuncCurrency(p_value){

        var Moneys = p_value.toString();
        var currency = ""; 
        for(i=0;i < Moneys.length; i++){ 
                currency += Moneys.substring(i,i+1);         
                if(((Moneys.length - i-1)%3) == 0 && (Moneys.length-i-1) > 0 ) 
				currency += ","; 
        } 		
	
		return currency;
	}

	//ÀÚ¸® ´ÜÀ§ ¸ÂÃß±â
	function FuncRound(p_value, p_num){
		var strvalue = 0;
		if (p_value >= Math.pow(10,p_num)){
			strvalue = p_value % Math.pow(10,p_num);
			if (parseInt(strvalue) > 0){
				return Math.ceil(p_value / Math.pow(10,p_num)) * Math.pow(10,p_num);
			}else{
				return p_value;
			}
		}else{
				return p_value;
		}
		
	
	}
	
	
	function FuncBigImage500(p_mediumcd,p_ca,p_type,p_itemcd,p_num,p_url){
		//showModalDialog('/include/popup/ShopViewImage.asp?mediumcd='+ p_mediumcd + '&ca=' + p_ca+'&imagetype='+ p_type + '&itemcd=' + p_itemcd + '&imgnum=' + p_num+"&url="+p_url, window, 'resizable: no; help: no; status: no; scroll: no; ');
		//window.open('/include/popup/ViewImage.asp?imagetype='+ p_type + '&itemcd=' + p_itemcd + '&imgnum=' + p_num+"&url="+p_url,'','');
		showModalDialog('/include/popup/ViewImage.asp?mcd=' + p_mediumcd + '&ca=' + p_ca + '&imagetype='+ p_type + '&itemcd=' + p_itemcd + '&imgnum=' + p_num+"&url="+p_url, window, 'resizable: no; help: no; status: no; scroll: no; ');
	}


function MakeFlashString(source,id,width,height,wmode, otherParam)
{	
	return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=allowScriptAccess value=always /><param name=wmode value="+wmode+" /><param name=movie value="+source+" /><param name=quality value=high />"+otherParam+"<embed src="+source+" quality=high wmode="+wmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
}

function MakeObjectString(classid, codebase, name, id, width,height, param)
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
}

// innerHTML Type
function SetInnerHTML(target, code)
{ 
	target.innerHTML = code; 
}

// Direct Write Type
function DocumentWrite(src)
{
	document.write(src);
}

//Æ¯¼ö¹®ÀÚÀÔ·Â¹æÁö
function checkkeycode(e) {
	//32 : ½ºÆäÀÌ½º 46 : ¸¶Ä§Ç¥(¼ýÀÚÆÇ DelÅ°)
	if (/\W/.test(String.fromCharCode(e.keyCode)) && e.keyCode != 46 && e.keyCode != 32 && e.keyCode != 45) 
	{
		alert("Æ¯¼ö¹®ÀÚ´Â »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù.");
		e.returnValue = false;
	}
}
