
	function go_returnUrl(str){
		document.location.href=str+"&returnUrl="+document.location.href
	}


//ÆÄÀÏ ´Ù¿î·Îµå iframe À¸·Î ÇÏ´Â°Í
function dlfl(filename,tblname){
//document.all["dlflfrm"].src = "/common/include/File_down.asp?dnfile="+filename+"&tblname="+tblname

if (tblname == "" || tblname == null )
{
	window.open(filename,"filelink");
}else {
window.open("/upload/"+tblname+"/"+filename,"filelink");
//document.location.href="/common/include/f_down.asp?file=/upload/"+tblname+"/"+filename;
}
//<a href="#" onclick="javascript:dlfl('<%=filename%>','<%=(tblname)%>');">
//<iframe name="dlflfrm" id="dlflfrm" src="" width="0" height="0"></iframe>
//<script src="/kolon.admin/common/adminscript.js"></script>
}

//¸µÅ©·Î ´Ù¿î·Îµå
//function dlfl2(filename){

//}


//ÀÌ¹ÌÁö »çÀÌÁî ±¸ÇÏ´Â ½ºÅ©¸³Æ®
function imgsiz(src,fm){ //ÀÌ¹ÌÁö »çÀÌÁî ±¸ÇÏ´Â ½ºÅ©¸³Æ®
			
				var imgInfo = new Image();
				imgInfo.src = src;
				var x = imgInfo.width;
				var y = imgInfo.height;
				if(x > 800 || y> 800){
					x=x/2;
					y=y/2;
				}
				document.getElementById(fm).width=x;
				document.getElementById(fm).height=y;
}




function imgopen(str) {
//<!-- 06.08.31 21:10 [js] -->
document.all.popimgsrc.src = str;
var imgInfo = new Image();
imgInfo.src = str;

var x = imgInfo.width;
var y = imgInfo.height;

if(x > 800 || y> 800){
	x=x/2;
	y=y/2;
}

popimgsrc.width=x;
popimgsrc.height=y;
winImg = document.all.pophtml.innerHTML;

var p=window.createPopup();
var pbody=p.document.body;
pbody.style.backgroundColor="white";
//pbody.style.border="solid blue 1px"
pbody.style.color="white";

pbody.innerHTML= winImg;
p.show(150,150,x,y,parent.document.body);

}



////////////////////////////////////////////////////////////////////////////////
//¼ýÀÚ¸¸À» ±âÀÔ¹Þ°Ô ÇÏ´Â ¹æ¹ý
//onKeyPress
	function only_num(){
	
   		if((event.keyCode>=48)&&(event.keyCode<=57)){
      		event.returnValue = true;
		}

		else{
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼¼¿ä!");
			event.returnValue = false;	
		}

	}

////////////////////////////////////////////////////////////////////////////////
//°´Ã¼ ±æÀÌ ÀÌ¿ë true,false

	function str_len(fm){
		
		if(fm.value.length > 0)
		{
			return true;
		}else {
			return false;
		}

	}

//¸ÞÀÏÃ¼Å©
function isEmailCheck(str) {
	if(str == "") return false;
	var regex = /[-!#$%&'*+/^_~{}|0-9a-zA-Z]+(.[-!#$%&'*+/^_~{}|0-9a-zA-Z]+)*@[-!#$%&'*+/^_~{}|0-9a-zA-Z]+(.[-!#$%&'*+/^_~{}|0-9a-zA-Z]+)*/;
	if(regex.test(str)) return true;
	else return false;
}


///


function onlynum(objtext1, msg){
	var inText = objtext1.value;
	var ret;

	for (var i = 0; i < inText.length; i++) {
    ret = inText.charCodeAt(i);
		if (!((ret > 47) && (ret < 58))){
			if (msg == "1"){
				alert("¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.");
				objtext1.value = "";
				objtext1.focus();
			}


			return false;
		}
	}
	return true;
}
////¼ýÀÚ À½¼öºÎÈ£¸¸ ÀÔ·Â
function onlyInt(objtext1){
	var inText = objtext1.value;
	var ret;

	for (var i = 0; i < inText.length; i++) {
    ret = inText.charCodeAt(i);
		if (!((ret > 47) && (ret < 58))){
			if (ret!= 45){
				alert("¼ýÀÚ ¶Ç´Â À½¼öºÎÈ£(-)¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.");
				objtext1.value = "";
				objtext1.focus();
				return false;
			}
		}
	}
	return true;
}

function onlyInt2(objtext1){
	var inText = objtext1.value;
	var ret;

	for (var i = 0; i < inText.length; i++) {
    ret = inText.charCodeAt(i);
		if (!((ret > 47) && (ret < 58))){
			if (ret!= 45){
				objtext1.value = "";
				objtext1.focus();
				return false;
			}
		}
	}
	return true;
}

function chkresno(resno) {

  // ÁÖ¹Î¹øÈ£ÀÇ ÇüÅÂ¿Í 7¹øÂ° ÀÚ¸®(¼ºº°) À¯È¿¼º °Ë»ç
  fmt = /^\d{6}-[1234]\d{6}$/;
  if (!fmt.test(resno)) {
    alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù."); return false;
  }

  // ³¯Â¥ À¯È¿¼º °Ë»ç
  birthYear = (resno.charAt(7) <= "2") ? "19" : "20";
  birthYear += resno.substr(0, 2);
  birthMonth = resno.substr(2, 2) - 1;
  birthDate = resno.substr(4, 2);
  birth = new Date(birthYear, birthMonth, birthDate);

  if ( birth.getYear() % 100 != resno.substr(0, 2) ||
       birth.getMonth() != birthMonth ||
       birth.getDate() != birthDate) {
    alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù."); return false;
  }

  // Check Sum ÄÚµåÀÇ À¯È¿¼º °Ë»ç
  buf = new Array(13);
  for (i = 0; i < 6; i++) buf[i] = parseInt(resno.charAt(i));
  for (i = 6; i < 13; i++) buf[i] = parseInt(resno.charAt(i + 1));

  multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
  for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);

  if ((11 - (sum % 11)) % 10 != buf[12]) {
    alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù."); return false;
  }

return true;
}


function GlobalPOPUP(iName) {

	var PopImageName = new Image();
	PopImageName.src = iName;

	var sizeWidth = PopImageName.width; // ½ÇÁ¦ ÀÌ¹ÌÁö »çÀÌÁî
	var sizeHeight = PopImageName.height; // ½ÇÁ¦ ÀÌ¹ÌÁö »çÀÌÁî

	var popWidth = sizeWidth + 22; //ÆË¾÷ »çÀÌÁî
	var popHeight = sizeHeight + 64; //ÆË¾÷ »çÀÌÁî

	var OpenFile = "/common/popup/popup.asp?iw="+sizeWidth+"&ih="+sizeHeight+"&iName="+iName+"";

	window.open(OpenFile, "GlobalPopUp", "scrollbars=auto, resizable=yes, width="+popWidth+", height="+popHeight+", top=0, left=0");
}
