	//----------------------------------------------------------------------------------------
	function NewWindow(mypage, myname, w, h, scroll){
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresize';
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
	//----------------------------------------------------------------------------------------
	function New_Win(mypage, myname, w, h, t, l, scroll){
	//	var winl = (screen.width - w) / 2;
//		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+t+',left='+l+',scrollbars='+scroll+',noresize';
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}

	//----------------------------------------------------------------------------------------
	//ÇÑ±Û,¿µ¹®,¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÏ°Ô
	function checkWord(inValue){
		var deny_pattern = /[^(¤¡-ÆRa-zA-Z0-9)]/;
		if(deny_pattern.test(inValue)){
			alert("ÇÑ±Û,¿µ¹®,¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
		}
	}
	//----------------------------------------------------------------------------------------
	function numCheck(Str)
	{
		var Re=true;
		for(i=0;i<Str.length;i++){
			var a=Str.charCodeAt(i);
			if(a<48 || a>57)
				Re=false;
		}
		return Re;		
	}
	//----------------------------------------------------------------------------------------
	function updateChar(inputName,length_limit){
		var elementName = eval("document."+inputName);
		var length = calculate_msglen(elementName.value);
		//textlimit.innerText = length;
		if (length > length_limit) {
			alert("ÃÖ´ë " + length_limit + "byteÀÌ¹Ç·Î ÃÊ°úµÈ ±ÛÀÚ¼ö´Â ÀÚµ¿À¸·Î »èÁ¦µË´Ï´Ù.");
			elementName.value = elementName.value.replace(/\r\n$/, "");
			elementName.value = assert_msglen(elementName.value, length_limit);
		}
	}
	function calculate_msglen(message){
		var nbytes = 0;
		for (i=0; i<message.length; i++) {
			var ch = message.charAt(i);
			if(escape(ch).length > 4) {
				nbytes += 2;
			} else if (ch == '\n') {
				if (message.charAt(i-1) != '\r') {
					nbytes += 1;
				}
			} else if (ch == '<' || ch == '>') {
				nbytes += 4;
			} else {
				nbytes += 1;
			}
		}
		return nbytes;
	}
	function assert_msglen(message, maximum){
		var inc = 0;
		var nbytes = 0;
		var msg = "";
		var msglen = message.length;
		for (i=0; i<msglen; i++) {
			var ch = message.charAt(i);
			if (escape(ch).length > 4) {
				inc = 2;
			} else if (ch == '\n') {
				if (message.charAt(i-1) != '\r') {
					inc = 1;
				}
			} else if (ch == '<' || ch == '>') {
				inc = 4;
			} else {
				inc = 1;
			}
			if ((nbytes + inc) > maximum) {
				break;
			}
			nbytes += inc;
			msg += ch;
		}
		//textlimit.innerText = nbytes;
		return msg;
	}
	//----------------------------------------------------------------------------------------
	function plusComma(value){
		var obj		= value;
		var price	= "";
		var regexp	= /[\,]{1}/g;
		if(obj.search(',') != -1){				//°ª¿¡ ',' ÀÖÀ¸¸é »èÁ¦~
			obj		= obj.replace(regexp,'');
		}
		while (obj.length > 3){
			regexp		=/[\d]{3}$/g;			//³¡¿¡ 3ÀÚ¸®°¡ ¼ýÀÚ·Î ÀÌ·ç¾îÁü
			num			= obj.match(regexp);	//ÀÏÄ¡ÇÏ´Â ¹®ÀÚ ¹Þ±â
			val_replace = obj.replace(num,"");	//ÀÏÄ¡ÇÏ´Â ¹®ÀÚ »èÁ¦
			obj			= val_replace;
			price		= ','+num+price;
		}
		price = obj + price;
		return price;
	}
	//----------------------------------------------------------------------------------------
	//ÀÌ¸ÞÀÏÃ¼Å©
	function isEmail(str) {
	  var supported = 0;
	  if (window.RegExp) {
		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) supported = 1;
	  }
	  if (!supported) 
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	  return (!r1.test(str) && r2.test(str));
	}
	//----------------------------------------------------------------------------------------
	function fixElement(element, message) {
		alert(message);
		element.focus();
	}

		//--------------------------------------------------------------------------------------------------
	function validmail1(str)
	{
	var sum=0;
		for(j=0; j < str.length; j++){
			if (str.charAt(j) == "@"){sum = sum+1;}
		}
		if ((sum >= 2) || (sum == 0)){return false;}
		else {return true;}
	}
	//--------------------------------------------------------------------------------------------------
	function validmail2(str)
	{
	//alert(". Ã¼Å©ÀÔ´Ï´Ù");
	var sum=0;
	var sp = str.split("@");
	//alert(sp[0]);

	if (sp[0].indexOf(".")>=0){
	//alert("°ñ¹ðÀÌ ¾Õ¿¡ À¢Á¡!!");
	return false;
	}

	else if (str.charAt(0)=="@"){
	//alert("¸Ç¾Õ¿¡ À¢ °ñ¹ðÀÌ...¶È¹Ù·Î Âï¾î!!");
	return false;
	}
	//alert(sp[1].length); ¹®ÀÚ¿­ÀÇ ±æÀÌ´Â 1ºÎÅÍ ½ÃÀÛÇÑ´Ù. ±×·¡¼­ ¸Ç ¸¶Áö¸· ÀÚ¸®ÀÇ À§Ä¡°ªÀº ±æÀÌ¿¡¼­ 1À» »«´Ù
	else if ((sp[1].charAt(0)==".")||(sp[1].charAt(sp[1].length-1)==".")){
	//alert("ÀÌ»óÇÑµ¥ Á¡ ÂïÀ»·¡? Á¡ ¾È»©!!");
	return false;
	}

		for(j=0; j < sp[1].length; j++)
		{	
			if (sp[1].charAt(j) == ".") 
					{
					if(doubl == 1){alert("Á¡À» ¿¬¼ÓÀ¸·ÎÂï¾ú±º¿è");return false;}
						sum = sum+1;
						doubl = 1
					}
			else{
				doubl = 0
			}
	//alert(doubl);

		}

		if ((sum >= 3) || (sum == 0))
				{
				return false;
				}
		else {
		return true;
			}
	}
//-----------------------------------------------------------------------------------------------
	function onlyNumber(obj)
	{
		if(typeof obj != 'object' || obj.value == 'undefined')
			return;
		
		if(obj.value.replace(/[^0-9]/g, '') != obj.value)
		{
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			obj.value = obj.value.replace(/[^0-9]/g, '');
		}
	}
function nextIndex(obj, length, next_obj)
{
    if(typeof obj != 'object' || obj.value == 'undefined')
        return;
    
    if(obj.value.length == length)
        next_obj.focus();
}


	function NumObj(obj){

		if (event.keyCode >= 48 && event.keyCode <= 57) { //¼ýÀÚÅ°¸¸ ÀÔ·Â

			return true;

		} else {
			event.returnValue = false;
			}
		}

//---------ÁÖ¹Î¹øÈ£ Ã¼Å©--------------------------------------------------------------------------------------
function check_publicno(sno1, sno2) 
{ 
    var serialValue = sno1 + "-" + sno2;
    
    if(serialValue.length < 14)
        return false;
    var sex = serialValue.substring(7,8);
    if(sex != 1 && sex != 2 && sex != 3 && sex != 4)
        return false;
        
    //³¯Â¥ À¯È¿¼º °Ë»ç 
    birthYear = (serialValue.charAt(7) <= "2") ? "19" : "20"; 
    birthYear += serialValue.substr(0, 2); 
    birthMonth = serialValue.substr(2, 2) - 1; 
    birthDate = serialValue.substr(4, 2); 
    var birth = new Date(birthYear, birthMonth, birthDate); 
    if ((birth.getYear() % 100 != serialValue.substr(0, 2)) || 
        (birth.getMonth() != birthMonth) || 
        (birth.getDate() != birthDate))
    { 
        return false; 
    } 
    
    //ÄÚµå À¯È¿¼º °Ë»ç 
    var buf = new Array(13); 
    for (var i = 0; i < 6; i++)
        buf[i] = parseInt(serialValue.charAt(i)); 
    
    for (var i = 6; i < 13; i++)
        buf[i] = parseInt(serialValue.charAt(i + 1)); 

    var multipliers = [2,3,4,5,6,7,8,9,2,3,4,5]; 
    for (var i = 0, sum = 0; i < 12; i++)
        sum += (buf[i] *= multipliers[i]); 

    if ((11 - (sum % 11)) % 10 != buf[12])
        return false; 
    
    return true;
}

function body_blind(set)
{
    if(typeof move_quick == 'function')
    {
        move_quick();
    }
    
    var bodyCap_div = document.getElementById('bodyCap_div');
    // Body ¿µ¿ªÀÇ ÀüÃ¼ »çÀÌÁî
    var body_h = 0;
    var docElement = document.body || document.documentElement || null;
    
    if(!bodyCap_div)
    {
        var bodyCap_div = document.createElement("DIV");
        docElement.appendChild(bodyCap_div);
    }
    
    if(typeof(set) != 'boolean')
        set = true;
    
    bodyCap_div.id = "bodyCap_div";
    bodyCap_div.style.position = "absolute";
    bodyCap_div.style.top = "0px";
    bodyCap_div.style.left = "0px";
    
    try
    {
        var width = parseInt(window.scrollMaxX) + parseInt(docElement.clientWidth);
        var height = parseInt(window.scrollMaxY) + parseInt(docElement.clientHeight);
        
        bodyCap_div.style.width = width + 'px';
        bodyCap_div.style.height = height + 'px';
    }
    catch(e)
    {
        bodyCap_div.style.width = (docElement.scrollWidth > docElement.clientWidth)?  docElement.scrollWidth : docElement.clientWidth;
        bodyCap_div.style.height = (docElement.scrollHeight > docElement.clientHeight)?  docElement.scrollHeight : docElement.clientHeight;
    }
    
    //bodyCap_div.style.backgroundColor = "#00004f";
    bodyCap_div.style.backgroundColor = "#000000";
    bodyCap_div.style.zIndex = 10;
    
    if(set == true)
    {
        if(typeof bodyCap_div.style.MozOpacity == "string")
        {
            bodyCap_div.style.MozOpacity = 0.35;
        }
        else if(typeof bodyCap_div.style.filter == "string")
        {
             bodyCap_div.style.filter = "Alpha(opacity="+parseInt(100*0.35)+")";
        }
        else
        {
            bodyCap_div.style.opacity = 0.35;
        }
        bodyCap_div.style.visibility = "visible";
        
        window.onresize = body_blind;
    }
    else
    {
        bodyCap_div.style.width = "0px";
        bodyCap_div.style.height = "0px";
        bodyCap_div.style.visibility = "hidden";
        
        window.onresize = function(e) { return false; }
    }
}

