//********************************************************//
//	À¯Æ¿¸®Æ¼ »ç¿ëÇÔ¼ö Á¤ÀÇ
//********************************************************//

///////////////////////////////////////////////////////////////
//////  Å¬¸³º¸µå·Î ³»¿ë ÀúÀå (CTRL + C)
///////////////////////////////////////////////////////////////
function copyClip(meintext) {
	if (window.clipboardData)  {

		window.clipboardData.setData("Text", meintext);

	} else if (window.netscape) { 
		netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
		var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
		if (!clip) return;
		var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
		if (!trans) return;
		trans.addDataFlavor('text/unicode');

		var str = new Object();
		var len = new Object();
		var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);

		var copytext=meintext;
		str.data=copytext;
		trans.setTransferData("text/unicode",str,copytext.length*2);

		var clipid=Components.interfaces.nsIClipboard;
		if (!clip) return false;

		clip.setData(trans,null,clipid.kGlobalClipboard);
	}
	return false;
}


//popup
function popWindow(pop,width,height,scroll) {
	var url = pop;  
	var wd = width;
	var he = height;
	window.open(url,"","toolbar=0,menubar=0,scrollbars=" + scroll + ",resizable=no,width=" + wd +",height=" + he + ";")
}

//popup
function popWindowCenter(pop,width,height,scroll) {
	var url = pop;  
	var wd = width;
	var he = height;
	var top = (window.screen.height-he)/2;
	var left = (window.screen.width-wd)/2;
	window.open(url,"","toolbar=0,menubar=0,scrollbars=" + scroll + ",resizable=no,top="+top+",left="+left+",width=" + wd +",height=" + he + ";")
}
//popup
function popWindowCenter2(name,url,width,height,scroll) {
	var url = pop;  
	var wd = width;
	var he = height;
	var top = (window.screen.height-he)/2;
	var left = (window.screen.width-wd)/2;
	window.open(url,name,"toolbar=0,menubar=0,scrollbars=" + scroll + ",resizable=no,top="+top+",left="+left+",width=" + wd +",height=" + he + ";")
}

///////////////////////////////////////////////
///////// ¼ýÀÚÅ°¸¸ Çã¿ë ÇÔ¼ö
///////////////////////////////////////////////
function checkKeyDownNumber(e) {
	ev = (e||window.event);
	if(ev.srcElement) {
		var key = ev.keyCode;
		if ((key >= 48 && key <= 57) // Å°º¸µå »ó´Ü ¼ýÀÚÅ°
	       //|| (key >= 96 && key <= 105) // Å°ÆÐµå ¼ýÀÚÅ°
	       || key == 8  // ¹é½ºÆäÀÌ½º Å°
	       || key == 37 // ¿ÞÂÊ È­»ìÇ¥ Å°
	       || key == 39 // ¿À¸¥ÂÊ È­»ìÇ¥ Å°
	       || key == 46 // DEL Å°
	       || key == 13 // ¿£ÅÍ Å°
	       || key == 9  // Tab Å°
	       )
			ev.returnValue=true;
		else
			ev.returnValue=false;
	}
}

///////////////////////////////////////////////
///////// ÁöÁ¤Å° ÀÔ·Â½Ã ÇÔ¼ö½ÇÇà ÇÔ¼ö
///////////////////////////////////////////////
function keyPressHandler(code, funcName) { 
   if(isNaN(code)) {
    	return false;
   } else if(event.keyCode == code) {
     if(funcName){
     	eval(funcName);
     }
     return false;
   }
}

///////////////////////////////////////////////
///////// ÄíÅ°°ü·Ã ÇÔ¼ö
///////////////////////////////////////////////
// ÄíÅ°¸¦ »ý¼ºÇÑ´Ù (È°¼ºÁÖ±â´Â ÃÊ´ÜÀ§·Î ¼³Á¤)
function setCookie(name, value, expireSeconds){
	var todayDate = new Date();
	if(expireSeconds > 0 ) todayDate.setSeconds( todayDate.getSeconds() + expireSeconds );
	var expires = expireSeconds > 0 ? "expires=" +todayDate.toGMTString()+";" : "";
	document.cookie = name + "=" + escape( value ) + "; path=/; "+expires;
}

// »ý¼ºµÈ ÄíÅ°°ªÀ» °¡Á®¿Â´Ù.
function getCookie(name){ 
	var nameOfCookie = name + "="; 
	var x = 0; 

	while ( x <= document.cookie.length ) {
		var y = (x+nameOfCookie.length); 
		if ( document.cookie.substring( x, y ) == nameOfCookie ) { 
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 
				endOfCookie = document.cookie.length; 
			return unescape( document.cookie.substring( y, endOfCookie ) ); 
		} 
		x = document.cookie.indexOf( " ", x ) + 1; 
		if ( x == 0 ) 
			break; 
	}
	return ""; 
}

function deleteCookie( cookieName ){
	var expireDate = new Date();
	expireDate.setDate( expireDate.getDate() - 1 );
	document.cookie = cookieName + "= " + "; path=/; expires=" + expireDate.toGMTString();
}

// ÇöÁ¦ ºê¸®¿ìÁ®°¡ ÄíÅ°¸¦ »ç¿ëÇÒ ¼ö ÀÖ´ÂÁö Ã¼Å©ÇÑ´Ù.
function checkCookieEnabled() {
	setCookie("checkCookie","Y",5);
	var value = getCookie("checkCookie");
	return value == "Y" ? true : false;
}

//-------------------------------------------------------
//¹ÙÀÌÆ® °è»ê, return ÃÑ¹ÙÀÌÆ®¼ö
//-------------------------------------------------------
function getByte(instr) {
    var len = 0;
    for(i=0; i<instr.length; i++) {
        var chr = instr.charAt(i);
        if (escape(chr).length > 4) {
                len += 2;
        }
        else  {
                len++;
        }
    }
    return len;
}

//-------------------------------------------------------
// ¹®ÀÚ¿­¿¡¼­ ¾ÕµÚ °ø¹é Á¦°Å , return °ø¹é Á¦°ÅµÈ ¹®ÀÚ¿­
// »ç¿ë¹ý : "string".trim();
//-------------------------------------------------------
String.prototype.trim = function() {
	return this.replace(/\s/g, "");
}

//-------------------------------------------------------
// ¹®ÀÚ¿­¿¡¼­ ¾Õ °ø¹é Á¦°Å , return °ø¹é Á¦°ÅµÈ ¹®ÀÚ¿­
// »ç¿ë¹ý : "string".ltrim();
//-------------------------------------------------------
String.prototype.ltrim = function() {
	var i, j = 0;
	var objstr
	for (i = 0; i < this.length; i++) {
		if (this.charAt(i) == ' ') j = j + 1;
		else break;
	}
	return this.substr(j, this.length - j + 1)  
}


//-------------------------------------------------------
// ¹®ÀÚ¿­¿¡¼­ µÚ °ø¹é Á¦°Å , return °ø¹é Á¦°ÅµÈ ¹®ÀÚ¿­
// »ç¿ë¹ý : "string".rtrim();
//-------------------------------------------------------
String.prototype.rtrim = function() {
	var i, j = 0;
	for (i = this.length - 1; i >= 0; i--) {
		if (this.charAt(i) == ' ') j = j + 1;
		else break;
	}
	return this.substr(0, this.length - j);
}

//-------------------------------------------------------
// ¼ýÀÚ(¼Ò¼öÁ¡ Á¸Àç)¿¡ , Ãß°¡µÈ Æ÷¸ËÀ¸·Î º¯°æ
//-------------------------------------------------------
function formatNumber(strOrg) {
	strOrg = "" + strOrg;
	if(strOrg == "")	return "";

	var strNum = "";
	for(i=0; i<strOrg.length; i++) {
		if(strOrg.charAt(i) == ",")
			continue;
		strNum += strOrg.charAt(i);
	}

	if(!Validate.isNum(strNum))	return strOrg;

	var dot = strNum.indexOf(".");
	var strInt = "";
	var strFlt = "";
	if(dot > 0) {
		strInt = strNum.substring(0,dot);
		strFlt = strNum.substring(dot);
	}
	else
		strInt = strNum;

	var smod = strInt.length % 3;
	var strRtn = "";
	if(smod > 0)	strRtn = strInt.substring(0,smod);
	for(i=smod; i<strInt.length; i++) {
		if(smod != 0 && i == smod)	strRtn += ",";
		else if(i > 0 && (i - smod) % 3 == 0)
			strRtn += ","
		strRtn += strInt.charAt(i);
	}
	if(dot > 0)	strRtn += strFlt;

	return strRtn;
}

//-------------------------------------------------------
// ¼ýÀÚ¿¡¼­  , Á¦°Å
//-------------------------------------------------------
function removeComma(str) {
	var len = str.length;
	var rstr = "";
	if (len > 0) {
		for (var i = 0; i < len; i++) {
			var ch = str.charAt(i);
			if (ch != ',') rstr += ch;
		}
	}
	return rstr;
}


//-------------------------------------------------------
// ¼ýÀÚ¿¡  , Ãß°¡
//-------------------------------------------------------
function insertComma(vstr) {
	var str = vstr;
	str += "";

	var comval = "";
	var inversecomval = "";

	for ( k = 0 ; k < str.length ; k++ ) {
		if ( k != 0 && k%3 == 0 ) {
			comval += ",";
		}
		comval += str.charAt(str.length-(k+1));
	}

	for ( k = 0 ; k < comval.length; k++ ) {
		inversecomval += comval.charAt(comval.length-(k+1));
	}
	return inversecomval;
}


function getFillZero(value, length) {
	var val = new String(value);
	var valLength = val.length;
	for(var i = 1; i <= length - valLength; i++) {
		val = "0"+val;
	}
	return val;
}

//-------------------------------------------------------------------------
//ÀÌ¹ÌÁö ¸®»çÀÌÁî  : °¡·Î Á¦ÇÑÀ» ÆÄ¶ó¹ÌÅÍ·Î ³Ñ±è 
//-------------------------------------------------------------------------
function imgResizeTo(idName, limitWidth) {

	var obj = document.getElementById(idName);
	var imgWidth = 0;
	var imgHeight = 0;
	var imgRatio = 0;
	var i = 0;

	if(obj == null) return;
	
	imgWidth = obj.width;
	imgHeight = obj.height;
	imgRatio = 0

	if (imgWidth > limitWidth) {
		imgRatio= imgHeight * limitWidth / imgWidth;
		obj.width= limitWidth;
		obj.height= imgRatio;
	}
	
}

//-------------------------------------------------------------------------
//ÀÌ¹ÌÁö ¸®»çÀÌÁî  : °¡·Î Á¦ÇÑÀ» ÆÄ¶ó¹ÌÅÍ·Î ³Ñ±è, num ¹Ù²Ü ÀÌ¹ÌÁö °³¼ö 
//-------------------------------------------------------------------------
function imgResizeToNumW(idName, limitWidth, num) {
	var obj
	var imgWidth = 0;
	var imgHeight = 0;
	var imgRatio = 0;
	var i = 0;

	for(i = 0; i <= num; i++) {
		obj = document.getElementById(idName + i);
		if(obj == null) continue;

		imgWidth = obj.width;
		imgHeight = obj.height;
		imgRatio = 0
	
		if (imgWidth > limitWidth) {
			imgRatio= imgHeight * limitWidth / imgWidth;
			obj.width= limitWidth;
			obj.height= imgRatio;
		}
	}
}

//-------------------------------------------------------------------------
//ÀÌ¹ÌÁö ¸®»çÀÌÁî  : ¼¼·Î Á¦ÇÑÀ» ÆÄ¶ó¹ÌÅÍ·Î ³Ñ±è, num ¹Ù²Ü ÀÌ¹ÌÁö °³¼ö 
//-------------------------------------------------------------------------
function imgResizeToNumH(idName, limitHeight, num) {

	var obj
	var imgWidth = 0;
	var imgHeight = 0;
	var imgRatio = 0;
	var i = 0;

	for(i = 0; i <= num; i++) {
		obj = document.getElementById(idName + i);
		if(obj == null) continue;

		imgWidth = obj.width;
		imgHeight = obj.height;
		imgRatio = 0
	
		if (imgHeight > limitHeight) {
				imgRatio= imgWidth * limitHeight  /  imgHeight;
				obj.height= limitHeight;
				obj.width= imgRatio;
		}
	}
}

//-------------------------------------------------------------------------
//iframe »çÀÌÁî ³ôÀÌ Á¶Àý 
// »ç¿ë¹ý : <iframe src="url" onload="resizeiFrameHeight(this)"></iframe>
//-------------------------------------------------------------------------
function resizeiFrameHeight(obj){

	var innerBody = obj.contentWindow.document.body;

	var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);

	if (navigator.appName != "Microsoft Internet Explorer") {	//ie°¡ ¾Æ´Ò °æ¿ì 
		innerHeight = innerBody.offsetHeight 
	}

	obj.style.height = innerHeight;

}

//-------------------------------------------------------------------------
//À©µµ¿ì Ã¢Å©±â Á¶Àý 
// »ç¿ë¹ý : <body onload="resizeWin()">
//-------------------------------------------------------------------------
function resizeWin(){

	var winW, winH, sizeToW, sizeToH;

	if ( parseInt(navigator.appVersion) > 3 ) {
		if ( navigator.appName=="Netscape" ) {
			winW = window.innerWidth;
			winH = window.innerHeight;
		}
		if ( navigator.appName.indexOf("Microsoft") != -1 ) {
			winW = document.body.scrollWidth;
			winH = document.body.scrollHeight;
		}
	}

	sizeToW = 0;
	sizeToH = 0;

	if ( winW > 1000 ) sizeToW = 1000 - document.body.clientWidth;
	else if ( Math.abs(document.body.clientWidth - winW ) > 3 ) sizeToW = winW - document.body.clientWidth;

	if ( winH > 680 ) sizeToH = 680 - document.body.clientHeight;
	else if ( Math.abs(document.body.clientHeight - winH) > 4 ) sizeToH = winH - document.body.clientHeight;

	if ( sizeToW != 0 || sizeToH != 0 ) window.resizeBy(sizeToW, sizeToH);

}

// Debug ¿ë. ¿ìÃø¿¡ ¸Þ¼¼Áö ¹Ú½º¸¦ ¶ç¿î ÈÄ ³»¿ëÀ» »Ñ·ÁÁØ´Ù.
var trace = function(text) {
	var debug = true;
	if(debug) {
		if(!$("traceMsg")) {
			var objDiv = new Element("div",{id:"traceMsg"});
			objDiv.setStyle({overflow:"auto",zIndex:"1200",position:"absolute",top:"30px",right:"30px",width:"300px",height:"500px",
							backgroundColor:"#FFFFFF",filter:"Alpha(opacity=70)",opacity:(70/100)});
			objDiv.update("<table border='1' width='100%' height='500'><tr><td valign='top' id='traceMsgOut'></td></tr></table>");
			$$("body")[0].insert(objDiv);
		}
		$("traceMsgOut").innerHTML = text+"<br>"+$("traceMsgOut").innerHTML;
	}
}

// ÀÔ·ÂÆû¿¡ ´ëÇÑ ¹®ÀÚ¿­ ±æÀÌ Á¦ÇÑ (ÇÑ±ÛÃ³¸®)
var checkValueLength = function(obj,title,maxLength) {
	var str = new String();
	var strLength = 0;
	for(i=0; i < obj.value.length; i++) {
		var addLength = Validate.isKor(obj.value.charAt(i)) ? 2 : 1;
		strLength += addLength 
		if(strLength > maxLength) {
			alert(title+"Àº(´Â) ¿µ¹®±âÁØ "+maxLength+"ÀÚ, ÇÑ±Û±âÁØ "+Math.floor(maxLength/2)+"ÀÚ ÀÌÇÏ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
			obj.value = str;
			strLength -= addLength;
			break;
		}
		str += obj.value.charAt(i);
	}
	return strLength;
}


/*select box À§·Î ·¹ÀÌ¾î ¶ç¿ì±â */
// Internet Explorer¿¡¼­ ¼¿·ºÆ®¹Ú½º¿Í ·¹ÀÌ¾î°¡ °ãÄ¥½Ã ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º µÚ·Î ¼û´Â Çö»óÀ» ÇØ°áÇÏ´Â ÇÔ¼ö
// ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º¸¦ Ä§¹üÇÏ¸é ¼¿·ºÆ® ¹Ú½º¸¦ hidden ½ÃÅ´
// »ç¿ë¹ý :
// <div id=LayerID style="display:none; position:absolute;" onpropertychange="selectbox_hidden('LayerID')">
var selectboxHidden = function(layer_id, tagName)
{
	tagName = (tagName||"SELECT");
	var ly = eval(layer_id);
	
	var selectBoxs = $(layer_id).getElementsByTagName(tagName);

	// ·¹ÀÌ¾î ÁÂÇ¥
	var ly_left  = ly.offsetLeft;
	var ly_top    = ly.offsetTop;
	var ly_right  = ly.offsetLeft + ly.offsetWidth;
	var ly_bottom = ly.offsetTop + ly.offsetHeight;

	// ¼¿·ºÆ®¹Ú½ºÀÇ ÁÂÇ¥
	var el;

	for (i=0; i<document.forms.length; i++) {

		for (k=0; k<document.forms[i].length; k++) {
			el = document.forms[i].elements[k];
			if(tagName == "OBJECT") {
				var id = "CLSID:4D68446C-92A2-4A32-BD61-E18708016387";
				if(el.getAttribute("CLASSID") != id) continue;
			}

			//alert(el.tagName);

			if (el.tagName == tagName) {
				var checkSame = false;
				for(z = 0; z < selectBoxs.length; z++) {
					if(selectBoxs.item(z).name == el.name) {
						checkSame = true;
						break;
					}
				}
				if(!checkSame) {
					var el_left = el_top = 0;
					var obj = el;
					if (obj.offsetParent) {
						while (obj.offsetParent) {
							el_left += obj.offsetLeft;
							el_top  += obj.offsetTop;
							obj = obj.offsetParent;
						}
					}
					el_left  += el.clientLeft;
					el_top    += el.clientTop;
					el_right  = el_left + el.clientWidth;
					el_bottom = el_top + el.clientHeight;
	
					// ÁÂÇ¥¸¦ µûÁ® ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º¸¦ Ä§¹üÇßÀ¸¸é ¼¿·ºÆ® ¹Ú½º¸¦ hidden ½ÃÅ´
					if ( (el_left >= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) ||
						(el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||
						(el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) ||
						(el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) )
						el.style.visibility = 'hidden';
				}
			}
		}
	}
}

// °¨Ãß¾îÁø ¼¿·ºÆ® ¹Ú½º¸¦ ¸ðµÎ º¸ÀÌ°Ô ÇÔ
var selectboxVisible = function (tagName)
{
	tagName = (tagName||"SELECT");
	for (i=0; i<document.forms.length; i++) {
		for (k=0; k<document.forms[i].length; k++) {
			el = document.forms[i].elements[k];
			if (el.tagName == tagName && el.style.visibility == 'hidden')
				el.style.visibility = 'visible';
		}
	}
}

// ÇØ´ç ´Ü¾î¿¡ ´ëÇÑ Á¶»ç¸¦ ±¸ÇØ¿Â´Ù 
// type = 1 : (À»/¸¦), 2: (Àº/´Â), 3: (ÀÌ/°¡)
function getAux(val, type){
	hanTable=new Array();
	hanTable[0]='¤¡¤¢¤¤¤§¤¨¤©¤±¤²¤³¤µ¤¶¤·¤¸¤¹¤º¤»¤¼¤½¤¾'; // 19 ÃÊ¼º
	hanTable[1]='¤¿¤À¤Á¤Â¤Ã¤Ä¤Å¤Æ¤Ç¤È¤É¤Ê¤Ë¤Ì¤Í¤Î¤Ï¤Ð¤Ñ¤Ò¤Ó'; //21 Áß¼º
	hanTable[2]=' ¤¡¤¢¤£¤¤¤¥¤¦¤§¤©¤ª¤«¤¬¤­¤®¤¯¤°¤±¤²¤´¤µ¤¶¤·¤¸¤º¤»¤¼¤½¤¾'; //28 Á¾¼º

	b = val.charCodeAt(val.length-1);
	hcode = b-0xAC00;
	cho = new Array();
	cho[0] = parseInt(hcode / 588); //ÃÊ¼º
	hcode2 = hcode % 588;
	cho[1] = parseInt(hcode2 / 28); //Áß¼º
	cho[2] = hcode2 % 28; //Á¾¼º ¤¡,,,¤¤ 

	mun=new Array();
	mun[0]  =hanTable[0].charAt(cho[0]);
	mun[1] = hanTable[1].charAt(cho[1]); //ÀÚÀ½
	mun[2] = hanTable[2].charAt(cho[2]); //0¹øÀº Á¾¼ºÀ¯¹«
	
	var aux = "À»¸¦Àº´ÂÀÌ°¡"
	return (mun[2].trim() != "") ? aux.charAt((type*2)-2) : aux.charAt((type*2)-1);
}

var zoomSize = 100; 
function zoom(obj,method) { 
    if(method == "in") { 
        zoomSize = zoomSize+10; 
    } else if(method == "out") { 
        if(zoomSize > 10) { 
			zoomSize = zoomSize-10;
        } 
    } else if(method == "reset") { 
        zoomSize = 100; 
    } 
    document.getElementById(obj).style.zoom = zoomSize + "%"; //Æ¯Á¤ ¿µ¿ª¸¸ ¼³Á¤½Ã
} 

// ÀÔ·ÂÆû ÀÚµ¿ Æ÷Ä¿½º º¯È¯
function autoFocus(e, length, target) {
	ev = (e||window.event);
	var obj = ev.srcElement; 
	if(obj.value.length >= length 
			&& !$A([0,8,9,16,17,18,37,38,39,40,46]).include(ev.keyCode)) {
		target.focus();
	}
}

// ³¯Â¥º¯È¯
function calculate(start, end) {
	var start = start.split("-");  
	var end = end.split("-");   

	var startdate = new Date(start[0], start[1]-1, start[2]);
	var enddate = new Date(end[0], end[1]-1, end[2]);
	return result = (enddate.getTime() - startdate.getTime() ) / 1000 / 60 / 60 / 24;    // Date °´Ã¼´Â ¹Ð¸®ÃÊ´ÜÀ§ÀÓ
}


// ³ªÀÌ °è»ê
// strDate-YYYYMM, todate-YYYYMMDD, isFullAge-Y/N(¸¸³ªÀÌ¿©ºÎ)
function getAge(strDate, todate, isFullAge){
	var Fage, Fage2, Ndate, Ndate2;

	Fage	= strDate.substring(0,2);
	Fage2	= strDate.substring(2,4);
	Fage3	= strDate.substring(2,6);
	Ndate	= todate.substring(0,4);
	Ndate2	= todate.substring(4,8);

	Fage2	= "20" + Fage;

	if(Fage2 >= Ndate){
		Fage2 = "19" + Fage;
	}

	Fage = Ndate - Fage2 + 1

	if(Fage > 100){
		Fage = Fage - 100;
	}

	// ¸¸ ³ªÀÌ °è»ê [isFullAge = Y]
	if(isFullAge == "Y"){
		if(Ndate2 > Fage3){
			Fage = Fage - 1;
		} else {
			Fage = Fage - 2;
		}
	}
	return Fage;
}


function setURL(param) {
	var query = $H(param).toQueryString();
	document.location.href = "#"+query;
}

function getURL() {
	var href = document.location.href;
	var param = $H({});
	if(href.indexOf("#") > 0) {
		query = href.substr(href.indexOf("#")+1);
		param = query.toQueryParams();
	}
	return param;
}

///////////////////////////////////////////////
///////// ¿µ¹®+¼ýÀÚ+±âÈ£[:/?&=-_]Å°¸¸ Çã¿ë ÇÔ¼ö
///////////////////////////////////////////////
function checkKeyDownURL(e) {
	ev = (e||window.event);
	if(ev.srcElement) {
		var key = ev.keyCode;
		//trace(key);
		//alert(key);

		if (	(key >= 48 && key <= 57) // Å°º¸µå »ó´Ü ¼ýÀÚÅ°
				|| (key >= 65 && key <= 90) // ¿µ¹®
				|| (key >= 97 && key <= 122) // ¿µ¹®
				|| key == 58  // : Å°
				|| key == 47  // / Å°
				|| key == 63  // ? Å°
				|| key == 38  // & Å°
				|| key == 61  // = Å°
				|| key == 45  // - Å°
				|| key == 95  // _ Å°
				|| key == 8  // ¹é½ºÆäÀÌ½º Å°
				|| key == 37 // ¿ÞÂÊ È­»ìÇ¥ Å°
				|| key == 39 // ¿À¸¥ÂÊ È­»ìÇ¥ Å°
				|| key == 46 // DEL Å°
				|| key == 13 // ¿£ÅÍ Å°
				|| key == 9  // Tab Å°
	       )
			ev.returnValue=true;
		else
			ev.returnValue=false;
	}
}

