<!--
/* ie6¿¡¼­ bg ±ô¹Ú°Å¸² ¹æÁö ------------------------------------------- */
try {document.execCommand('BackgroundImageCache', false, true); } catch(e) {} 


// png24--------------------------------------------------------------------
function setPng24(obj) { 
    obj.width=obj.height=1; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

function msg(){
	alert ("¼­ºñ½º °³ÆíÁßÀÔ´Ï´Ù.");
	return;
}

function jsAlert(){
	alert ("ÁØºñÁßÀÔ´Ï´Ù.");
	return;
}



function flash(url,id,w,h){ 
var flashStr=
'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+w+'" height="'+h+'" id="'+id+'" align="middle">'+
'<param name="allowScriptAccess" value="sameDomain" />'+
'<param name="allowFullScreen" value="false" />'+
'<param name="movie" value="'+url+'" />'+
'<param name="quality" value="high" />'+
'<param name="wmode" value="transparent" />'+
'<embed wmode="transparent" src="'+url+'" quality="high" width="'+w+'" height="'+h+'" name="'+id+'" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
'</object>';
 document.write(flashStr);
}

// ±âº» ÇÃ·¡½Ã				
function flashObj(URL,SizeX,SizeY,LnkId,Frm,Flag) // quick
{
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('                    width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('            <param name="movie"     value="'+URL+'" />');
    document.write('            <param name="quality"   value="high" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('        <param name="wmode"     value="transparent"/>');
    }
 document.write('   <param name="allowScriptAccess" value="always"/> ');
 document.write('   <param name="base" value="." />');
    document.write('            <embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
  if ( Flag == null || Flag != 'N' )
    {
        document.write('         wmode="transparent" ');
    }
    document.write('             type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
 if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
  eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 }
}

/********»ó´Ü ÅÇ Ã³¸® ½ºÅ©¸³Æ®********/
function jsView(str){
 var table_num = "4";//div °¹¼öÁöÁ¤
 for(i=1; i<=table_num; i++){
  str1 = eval("document.all.ans" + i );
  if(i == str){
	str1.style.display = "block";
	//ChangeIMG(i, div_num)
  }else{
	str1.style.display = "none";
  }
 }
}

//POPUP
function popup(url, name, w, h){
	window.open(url, name, "width="+w+", height="+h);
}


/******¿µ¹® ¼ýÀÚ¸¸ ÀÔ·Â ¹Þ´Â Ã³¸®************/
/*
function checkIdNum();
var regexp = /^[A-Za-z0-9]{4,8}$/i;

 if(!regexp.member_id(strID))
 {    
  alert(" 4~8ÀÚÀÇ ¿µ¹®, ¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");   
 }

function checkPwNum();

var regexp = /^[A-Za-z0-9]{4,8}$/i;

 if(!regexp.member_pw(strID))
 {    
  alert(" 6~8ÀÚÀÇ ¿µ¹®, ¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");   
 }
*/

function setJumin(juminTxt, juminTxt2) {
	var jumin1 = juminTxt.substring(0, 2);
	var jumin2 = juminTxt.substring(2, 4);
	var jumin3 = juminTxt.substring(4);

	var jumin = "";


	if(jumin1.substring(0,1) == "0" || jumin1.substring(0,1) == "1") {
		jumin = "20" + jumin1;
	} else {
		jumin = "19" + jumin1;
	}

	if(juminTxt2.substring(0,1) == "1") {
		document.user_form.SEX.value = "1";
	} else if(juminTxt2.substring(0.1) == "2") {
		document.user_form.SEX.value = "2";
	}
	document.user_form.BIRTH_YEAR.value = jumin;
	document.user_form.BIRTH_MONTH.value = jumin2;
	document.user_form.BIRTH_DAY.value = jumin3;
}

/*
function setZipcode(code, address, popLayer) {
	var zipcode = code.split("-");
	document.user_form.address.value = address;
	document.user_form.zipcode1.value = zipcode[0];
	document.user_form.zipcode1.value = zipcode[1];
	//document.zipForm.dong.value = "";
	//document.getElementById("zipcode").innerHTML = "";
	//document.getElementById(popLayer).style.display = "none";
	//return false;
}
*/
/************************************************************************
ÇÔ¼ö¸í		: toInt()
ÀÛ¼º¸ñÀû	: ¼ýÀÚÇü½Ä¸¸ ÀÔ·ÂµÇµµ·Ï ÇÔ.
		  Parameter :
		  	txtMileage : TextBox
		  Return :
		  	true/false
ÀÛ ¼º ÀÚ	: 
ÃÖÃÊÀÛ¼ºÀÏ	: 2007.06.04
ÃÖÁ¾ÀÛ¼ºÀÏ	:
¼öÁ¤³»¿ª	:
*************************************************************************/
function toInt() 
{
    e = window.event; //À©µµ¿ìÀÇ event¸¦ Àâ´Â°ÍÀÔ´Ï´Ù. 
    
    //¼ýÀÚ¿­ 0 ~ 9 : 48 ~ 57, Å°ÆÐµå 0 ~ 9 : 96 ~ 105 ,8 : backspace, 46 : delete, 9 : tab Å°ÄÚµå°ªÀ» ±¸ºÐÇÕ´Ï´Ù.
    
    var keyValue = e.keyCode;
    
//    if(keyValue == 17 || keyValue == 86){
//        return;
//    }
    
    if(keyValue == 17){
        return;
    }
    
    if((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode >= 96 && e.keyCode <= 105) || e.keyCode == 8 || e.keyCode == 46 || e.keyCode == 9 )
    {
        /*
        if(e.keyCode == 48 || e.keyCode == 96)//0À» ´­·¶À»°æ¿ì

        {
            if(txtMileage.value == "" ) //¾Æ¹«°Íµµ ¾ø´Â»óÅÂ¿¡¼­ 0À» ´­·¶À»°æ¿ì

                e.returnValue=false;        //ÀÔ·ÂµÇÁö¾Ê´Â´Ù.
            else                
                return;             
        }
        else 
        */
        return; //ÀÔ·Â½ÃÅ²´Ù.
    }
    else //¼ýÀÚ°¡ ¾Æ´Ï¸é ³ÖÀ»¼ö ¾ø´Ù.
        e.returnValue=false;
    
}


/*******************************************************************
 * Á¤ÀÇ
 * ¹®ÀÚ¿­À» ÅëÈ­·® ÇüÅÂ·Î º¯È¯ÇÏ´Â ÇÔ¼ö
*******************************************************************/
String.prototype.toCurrency = function()
{
	var srcValue = this;
	var result = "";
	srcValue= this.replace(/(\,)/g,"");
    
	re = /(?:\d)(?=(\d\d\d)+(?!\d))/;
	while(re.exec(srcValue)){
	result = RegExp.$1 != "" ? ("," + RegExp.$1 + result) : result;
	srcValue = srcValue.substr(0,srcValue.length - 3)
	}
   
	return  (srcValue += result); 
}

/********************************************************************************************
    ÇÔ¼ö¸í      : getArgs()
    ÀÛ¼º¸ñÀû    : Äõ¸®½ºÆ®¸µÀ» ¹è¿­È­ ÇÑ´Ù.
                    Parameter
                        ¾ø´Ù.
                    Return
                        ¾ø´Ù.
    ÀÛ¼ºÀÚ      : ±è¿ìÁø
    ÃÖÃÊÀÛ¼ºÀÏ  : 2007-06-01
    ÃÖÁ¾ÀÛ¼ºÀÏ  :
    ¼öÁ¤³»¿ª    :
********************************************************************************************/
function getArgs()
{
    var args	= new Object();
    var query	= window.location.search.substring(1);
    var pairs	= query.split("&");
	
    for(var i=0; i<pairs.length; i++)
    {
        var pos = pairs[i].indexOf('=');
        if(pos == -1) continue;
		
        var argname = pairs[i].substring(0, pos);
        var value	= pairs[i].substring(pos+1);
        args[argname] = unescape(value);
    }
	
    return args;
}
var Args = getArgs();

//Äõ¸®½ºÆ®¸µ °ªÀ» º¯°æÇÑ urlÀ» ¹ÝÈ¯ÇÑ´Ù.
function changeSearch(key, value)
{
   var key_value = null;

    if(Args[key] == null)
    {
        if(window.location.href.indexOf('?') > 0)
        {
            return window.location.href + '&' + key + '=' + value;
        }
        else
        {
            return window.location.href + '?' + key + '=' + value;
        }
    }
    
    return window.location.href.replace(key + '=' + Args[key], key + '=' + value);
    
	
}

//Äõ¸®½ºÆ®¸µ °ªÀ» º¯°æÇÑ url·Î ÀÌµ¿ÇÑ´Ù.
function moveSearch(key, value)
{
    window.location.href = changeSearch(key, value);
}

//Äõ¸®½ºÆ®¸µÀ» »èÁ¦ÇÑ search¸¦ ¹ÝÈ¯ÇÑ´Ù.
function removeSearch(key)
{
	var search = window.location.search;
	
	if(window.location.search.indexOf('?' + key) >= 0)
	{
		search = search.replace('?' + key + '=' + eval('Args.'+key), '');
		
		if(search.length > 0)
		{
			search = search.replace('&', '?');
		}
	}
	else if(window.location.search.indexOf('&' + key) >= 0)
	{
		search = search.replace('&' + key + '=' + eval('Args.'+key), '');
	}
	
	return search;
}


//¸ð´ÞÃ¢ ¶ç¿ì±â
function showModal(src, width, height)
{
    var obj = new Object();
    obj.src = src
    window.showModalDialog('/Common/Popup/modal.htm', obj, "dialogWidth=" + width + "px;dialogHeight:" + height + "px;status:no;help:no;scroll:no; cneter:yes;");
    
    return obj;
}

function validateFile(control)
{
    var file_path = control.value;
    
    if(file_path == '')
    {
        return true;
    }
    
    var exts = file_path.split('.');
    var ext = exts[exts.length-1].toUpperCase();
    var list = 'EXE,SCR,CPL,COM,PIF,CMD,HTA,HTC,VBS,JS,WAV,ASF,WMV,SWF,SMI,SWF,WMA,HTML,HTM,ASP,ASPX';
    var lists = list.split(',');
    
    for(var i=0; i<lists.length; i++)
    {
        if(ext == lists[i])
        {
            alert('¼±ÅÃÇÏ½Å ÆÄÀÏÀº Ã·ºÎ°¡ ±ÝÁöµÈ ÆÄÀÏ·Î Ã·ºÎÇÒ ¼ö ¾ø½À´Ï´Ù.');
            return false;
        }
    }
    
    return true;
}

function scrap(control)
{
    window.clipboardData.setData('Text', control.innerHTML);
    alert('±Û³»¿ëÀÌ Å¬¸³º¸µå¿¡ º¹»çµÇ¾ú½À´Ï´Ù.');
}

/*******************************************************************
	Æ¯¼ö¹®ÀÚ¸¦ HTML¹®ÀÚ·Î ¹Ù²ã¼­ ¹ÝÈ¯ÇÑ´Ù.
*******************************************************************/
String.prototype.toHtmlString = function()
{
	var html_string = null;
	html_string		=  this.replace(/(\')/g,"&quot;");
	html_string		=  html_string.replace(/(\<)/g,"&lt;");
	html_string		=  html_string.replace(/(\>)/g,"&gt;");
	html_string		=  html_string.replace(/(\r\n)/g,"<br>");
	html_string		=  html_string.replace(/(\r)/g,"<br>");
	html_string		=  html_string.replace(/(\n)/g,"<br>");
	html_string		=  html_string.replace(/(\s)/g,"&nbsp;");
	
	return html_string;
}

/*******************************************************************
	HTML¹®ÀÚ¸¦ Æ¯¼ö¹®ÀÚ·Î ¹Ù²ã¼­ ¹ÝÈ¯ÇÑ´Ù.
*******************************************************************/
String.prototype.toLiteralString = function()
{
	var html_string = null;
	html_string		=  this.replace(/(\')/g,"&quot;");
	html_string		=  html_string.replace(/(\&lt;)/g,"<");
	html_string		=  html_string.replace(/(\&gt;)/g,">");
	html_string		=  html_string.replace(/(\<br>)/g,"\r");
	html_string		=  html_string.replace(/(\<br>)/g,"\n");
	html_string		=  html_string.replace(/(\&nbsp;)/g,"\s");
	
	return html_string;
}

/*********************************************************************
* ¹®ÀÚ¿­ÀÇ ¼±Çà °ø¹é°ú ÈÄÇà °ø¹éÀ» ºó¹®ÀÚ¿­·Î ¹Ù²Ù´Â ÇÔ¼ö¸¦ Ãß°¡ÇÑ´Ù 
* »ç¿ë¹ý : var s = " ¼±ÈÄÇà°ø¹éÀÌ ÀÖ´Â ¹®ÀÚ¿­ "
*              s.trim
*********************************************************************/
String.prototype.trim = function()
{
	//¼±Çà °ø¹é°ú ÈÄÇà °ø¹éÀ» ºó ¹®ÀÚ¿­·Î ½Î±×¸® ¹Ù²Û´Ù 
	return this.replace(/(^\s*)|(\s*$)/g, "");
}

function getDate()
{
  var d, s = "";
  d = new Date();
  s += (d.getMonth() + 1) + "-";
  s += d.getDate() + "-";
  s += d.getYear();
  return(s);
}

function getCookie(name)
{
    var cookies = document.cookie.split("; ");
    for (var i=0; i<cookies.length; i++)
    {
        cookie_idx = cookies[i].indexOf(name + "=");
        if (cookie_idx != -1)
        {
            var tmp = cookies[i].split("=");
            return unescape(tmp[1]);
        }
    }
        
    return null;
}

function setCookie(name, value, expires) 
{
    var per_day = 1000 * 60 * 60 * 24;
    var now = new Date();
    if(expires == null)
    {
        expires = 24;
    }
    var then = new Date(now.getTime() + expires * per_day);
    document.cookie = name + "=" + escape(value) + "; expires=" + then.toGMTString() + "; path=/";
}

/*******************************************************************
    ¼³  ¸í : ÆÄÀÏÀ» ¾÷·Îµå ÇÏ±â À§ÇÑ ÆË¾÷Ã¢À» ¿ÀÇÂ½ÃÅ²´Ù.
    ÆÄ¶ó¸ÞÅÍ :
            returnName - ¾÷·ÎµåµÈ ÆÄÀÏ¸íÀ» Ãâ·Â½ÃÅ² ÆûÇÊµå
            filePath - ¾÷·ÎµåÇÒ °æ·Î
    ÀÛ¼ºÀÚ : ±èÁ¾¹Î
*******************************************************************/
function upload(returnName, filePath) {
	window.open("/2009_NEW/include/pop_upload.asp?returnName=" + returnName + "&filePath=" + filePath, "upload", "width=355 height=150");
}

//-->