/** 
 * common.js 
 * °øÅë JavaScript ¶óÀÌºê·¯¸® 
 */
 
String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g,"") } ;
 
/**
 *   ºê¶ó¿ìÀúÀÇ ¹öÀüÀ» Ã¼Å©ÇÏ´Â ºÎºÐ 
 */
var IEYES = 0; 
var menufacture = navigator.appName; 
var version = navigator.appVersion; 
if( ( menufacture.indexOf('¸¶ÀÌÅ©·Î¼ÒÇÁÆ®') >= 0 || menufacture.indexOf('Microsoft') >= 0 ) 
   && (version.indexOf('4.0') >= 0 || version.indexOf('5.0') >= 0 
       || veirsioni.indexOf('6.0') >= 0 || veirsioni.indexOf('7.0') >= 0
       || veirsioni.indexOf('8.0') >= 0 || veirsioni.indexOf('9.0') >= 0 ) )
{ 
    IEYES = 1; 
}                                                                

/**
 *  Input¿¡ ³»¿ëÀÌ ¾øÀ¸¸é  true¸¦ returnÇÔ.                           
 */
function isNotNull(comp, str)                                        
{                                                                    
    comp.value = ltrim(comp.value);                                  
    if (comp.value == '')                                            
    {                                                                
        alert( str + 'Àº(´Â) ÇÊ¼ö ÀÔ·Â Ç×¸ñÀÔ´Ï´Ù.');                            
        if(!(comp.disabled || comp.readOnly)) comp.focus();                                                
        return false;                                                
    }else                                                            
        return true;                                                 
}                                                 

/**
 *  ¹®ÀÚ¿­ ÁÂÃøÀÇ °ø¹é Á¦°Å Ã³¸® ÇÔ¼ö
 */
function ltrim(para)  
{ 
    while(para.substring(0,1) == ' ')
        para = para.substring(1, para.length);
    return para;
}

/**
 *  ¹®ÀÚ¿­ Áß°£ÀÇ °ø¹é Á¦°Å Ã³¸® ÇÔ¼ö
 */
function mtrim(para) 
{
    for ( i = 0; i < para.length;)  
	if ( para.substring(i,i+1) == ' ' || para.substring(i,i+1) == unescape('%%0A') || para.substring(i,i+1) == unescape('%%0D') )  
	    para = para.substring(0, i) + para.substring(i+1, para.length); 
	else  i++; 
    return para; 
}

/**
 *   ¹®ÀÚ¿­ ¿ìÃøÀÇ °ø¹é Á¦°Å Ã³¸® ÇÔ¼ö
 */
function rtrim(para)  
{
    while(para.substring(para.length-1, para.length) == ' ')
	para = para.substring(0, i) + para.substring(i+1, para.length); 
    return para;
}


/**
 *   ¹®ÀÚ¿­°ø¹é Á¦°Å Ã³¸® ÇÔ¼ö
 */
function ignSpc(string)
{
	var temp = "";
	string = '' + string;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	temp += splitstring[i];
	return temp;
}


/**
 *   ¹®ÀÚ¿­¿¡¼­ ,¸¦ Ãß°¡ÇÏ´Â ÇÔ¼ö
 */
function Str2MoneyStr(t_in)
{
    var t_str = t_in.toString();  
    var t_length = t_str.length;
    for ( var i = t_length - 3; i > 0; i -= 3  ) 
        t_str = t_str.substring(0, i) + ',' + t_str.substring(i, t_str.length);

    if ( t_str.substring(0, 2) == '-,' )   //  -  Ã³¸®
	t_str = '-' + t_str.substring(2, t_str.length);

    return t_str;
}


/**
 *   ¼ýÀÚ ¹®ÀÚ¿­¿¡¼­ ,¸¦ Á¦°ÅÇÏ´Â ÇÔ¼ö
 */
function MoneyStr2Str(para)
{
	var i = 0;
	var ret ="";
	var str = para.toString();
	for ( i = 0 ; i < str.length ; i++ )
	{
		if ( str.substring(i,i+1) != ',' )
			ret = ret + str.substring(i,i+1);
	}
	return ret;
}


/**
 *   ¼ýÀÚ ¹®ÀÚ¿­¿¡¼­ -¸¦ Á¦°ÅÇÏ´Â ÇÔ¼ö
 */
function DashStr2Str(para)
{
	var i = 0;
	var ret ="";
	var str = para.toString();
	for ( i = 0 ; i < str.length ; i++ )
	{
		if ( str.substring(i,i+1) != '-' )
			ret = ret + str.substring(i,i+1);
	}
	return ret;
}


/**
 *   ¼ýÀÚ ¹®ÀÚ¿­¿¡¼­ ,¸¦ Á¦°ÅÇÏ´Â ÇÔ¼ö
 */
function rem_comma(para)
{
    while(para.substring(para.length-1, para.length) == ',')
        para = para.substring(0, para.length-1);
    return para;
}


/**
 *   ¼ýÀÚ¿¡ ÄÞ¸¶¸¦ ³Ö´Â ÇÔ¼ö
 */
function ret_comma(t_in)
{
    var t_str = t_in.toString();  
    var t_length = t_str.length;
    for ( var i = t_length - 3; i > 0; i -= 3  ) 
        t_str = t_str.substring(0, i) + ',' + t_str.substring(i, t_str.length);

    if ( t_str.substring(0, 2) == '-,' )   //  -  Ã³¸®
	t_str = '-' + t_str.substring(2, t_str.length);
    return t_str;
}

/**
 *   ¼ýÀÚÀÎ°¡¸¦ Ã¼Å©ÇÏ´Â ÇÔ¼ö 
 */
function IsInt(value) { 
    var    _intValue   = '0123456789'; 

    for(var j = 0; j < _intValue.length; j++) 
        if( value == _intValue.charAt(j) ) { 
	    return true; 
        }
    return false;
} 


function IsIntCheck(name,str,value) { 

	var fchk = 0;
	for (i = 0; i < value.length; i++) {
		if (value.charAt(i) >= '0' && value.charAt(i) <= '9') continue;
		fchk++; 
	}
	if(fchk>0){
		alert(str+"¿¡´Â ¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
		return value;
	}else{
		return value;
	}
}  


/**
 *  ¹®ÀÚ¿­ ±æÀÌ Ã¼Å© 
 *  @pram maxlength : ÃÖ´ë±æÀÌ °ª (¹ÙÀÌÆ®)
 *  @return	boolean
 *  input box¿¡¼­ »ç¿ë¹ý : 
 */
function CheckMaxLength(str,maxlen) 
{ 
    var strByte = 0; 
    var strLen = str.length; 

	for (k=0;k<strLen;k++)
	{
		onechar = str.charAt(k);
		if (escape(onechar).length > 4) { strByte += 2; } 
		else { strByte++; }
	}

	if(maxlen>=strByte) {
		return true;
	} else {
		return false;
	}
}
                                                                  
/** 
 *  ¼ýÀÚ·Î ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎ°¡¸¦ Ã¼Å©ÇÏ´Â ÇÔ¼ö 
 */ 
function check_digit(comp) 
{ 
    var    i; 
    var    str =  new String(comp); 
    for(i=0;i<str.length;i++) 
        if(!IsInt(str.charAt(i))) 
            return false; 
    return true; 
} 

/** 
 *  ÇÒÁõÀ² °è»ê 
 */ 
//function CalMoneyRate(t_in)
//{
//	t_in = eval(t_in);
//    if ( t_in == 10000)
//    {
//		t_in = t_in + (t_in * 0.01);
//    } else if ( t_in > 10000 && t_in <= 40000) {
//		t_in = t_in + (t_in * 0.02);
//    } else {
//		t_in = t_in + (t_in * 0.03);
//	}
//
//    var t_str = t_in.toString();  
//    var t_length = t_str.length;
//    for ( var i = t_length - 3; i > 0; i -= 3  ) 
//        t_str = t_str.substring(0, i) + ',' + t_str.substring(i, t_str.length);
//
//    if ( t_str.substring(0, 2) == '-,' )   //  -  Ã³¸®
//	t_str = '-' + t_str.substring(2, t_str.length);
//	if ( t_str == 'NaN')
//		t_str = '';
//    return t_str;
//}


/** 
 *  ½Ç¼ö·Î ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎ°¡¸¦ Ã¼Å©ÇÏ´Â ÇÔ¼ö 
 */ 
function check_float(comp)
{
    var    _floatValue   = '0123456789.-';
    var str = new String(comp.value);

    if ((str == '')||(comp.value.length == 0))
        return true;
    for( var j = 0; j < comp.value.length; j++)
	{
        var char_ok = false;
        for(var i = 0; i < _floatValue.length; i++)
            if(str.charAt(j) == _floatValue.charAt(i) ) {
                char_ok = true;
                break;
            }
        if ( char_ok == false )
            return false;
	}
    return true;
}

/** 
 *  ÁöÁ¤µÈ °´Ã¼ÀÇ ¹®ÀÚ¿­ÀÇ ±æÀÌ¸¦ °è»êÇÏ´Â ºÎºÐ 
 */
function CheckByte(str) 
{ 
    var strByte; 
    var strLen = str.length; 

    if(IEYES == 1)     // IE4.0 ÀÌ»ó 
    { 
        for(var i=0, strByte=0;i<strLen;i++) 
        { 
            if(str.charAt(i) >= ' ' && str.charAt(i) <= '~' ) 
                strByte++; 
            else 
                strByte += 2; 
        } 
        return strByte; 
    } 
    else               // NetscapeÀÏ °æ¿ì 
    { 
        return strLen; 
    } 
} 

/**
 *  ¹®ÀÚ¿­ÀÇ ±æÀÌ¿¡ µû¸¥ Ã³¸® ÇÔ¼ö 
 */
function check_length(comp, str, len)                                
{                                                                    
    if ( comp.value.length > len ) {  // ÀÌ¹Ì ÃÊ°ú ÇÏ¿´´Ù¸é...
        alert(str + ' ' + len + 'ÀÚ¸¦ ÃÊ°úÇÒ¼ö ¾ø½À´Ï´Ù.');
        if(!(comp.disabled || comp.readOnly)) comp.focus();                                                
        return false;                                                
    }                                                                
    complen = CheckByte(comp.value);                                 
    if ( complen > len)                                              
    {                                                                
        alert(str + ' ' + len + 'ÀÚ¸¦ ÃÊ°úÇÒ¼ö ¾ø½À´Ï´Ù. ÇöÀç ' + complen + '±ÛÀÚÀÔ´Ï´Ù.');
        if(!(comp.disabled || comp.readOnly)) comp.focus();                                                
        return false;                                                
    }                                                                
    return true;                                                     
}                               

/**
 *  ÇØ´ç ³â¿ùÀÇ ¸¶Áö¸· ³¯Â¥ ±¸ÇÏ´Â ÇÔ¼ö                               
 */
function lastday(calyear,calmonth)                                   
{
    var    dayOfMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);              
    if (((calyear %4 == 0) && (calyear % 100 != 0))||(calyear % 400 == 0))
        dayOfMonth[1] = 29;                                          
    var nDays = dayOfMonth[calmonth-1];                              
    return nDays;                                                    
}                                                                    
 
/**
 * ³¯Â¥ÀÇ À¯È¿¼º °Ë»ç 
 */
function isValidDate(comp)                                           
{         
 
    var t_date = new String(comp.value); 
    var delimiter = "-"; 
                                        
    if (t_date.search(/^\d{4}-\d{2}-\d{2}$/)!=0) {    // {'/', \/}                                       
        alert('³¯Â¥ÀÇ ÀÔ·ÂÇü½ÄÀÌ Æ²·È½À´Ï´Ù.(YYYY-MM-DD)');                          
        comp.focus();                                                
        return false;    
    }   
    
    var T = t_date.split('-');
                                    
    if (!validDate(T[0], T[1]-1, T[2])) {                                  
        alert('À¯È¿ÇÏÁö ¾ÊÀº ³¯Â¥ÀÔ´Ï´Ù.');   
        comp.focus();                                                
        return false;                                                
    }        
    return true;                                                     
}                                                                    


function validDate(y, m, d) { // m = 0..11 ; y m d integers, y!=0
    with (new Date(y, m, d))
    return (getMonth()==m && getDate()==d) /* was y, m */ 
}
 
   
/**
 * µÎ ³¯Â¥ »çÀÌÀÇ °ü°è´Â ¿Ã¹Ù¸£°Ô Á¤¸³µÇ¾î ÀÖ´Â°¡ ? 
 *  ³¯Â¥ÀÇ ¼¼ÆÃÀÌ Text·Î¸¸ ÀÌ·ç¾îÁ® ÀÖ´Â °æ¿ì 
 */
function isValidDateWith(s_date, e_date)                             
{           
    var fromDate = s_date.value.split('-');
    var toDate   = e_date.value.split('-'); 
    
    var fromInt = parseInt(fromDate[0] + fromDate[1] + fromDate[2] );
    var toInt = parseInt(toDate[0] + toDate[1] + toDate[2] );
    
    if (isValidDate(s_date) == false)                                
    {                                                                
        s_date.focus();                                              
        return false;                                                
    }                                                                
    if (isValidDate(e_date) == false)                                
    {                                                                
        e_date.focus();                                              
        return false;                                                
    }          
                                                
    if ( fromInt > toInt )                                         
    {                                                           
        alert('½ÃÀÛÀÏÀÌ Á¾·áÀÏº¸´Ù Å®´Ï´Ù.'); 
	    s_date.focus();
        return false;                                                
    }                                                                
    return true;                                                     
}  

/**
 *  ¶óµð¿À ¹öÆ°ÀÌ Ã¼Å©µÇ¾î ÀÕ´ÂÁö¸¦ È®ÀÎÇÑ´Â ÇÔ¼ö..
  */
function chk_radio(obj)
{
    var result = false
    for ( var i  = 0; i < obj.length; i++) {
      if ( obj[i].checked == true )
	    result = true;
		}
       if ( (obj.length == null ) && obj.checked == true )
          result = true;
    return result;
}

/**
 *  ¶óµð¿À ¹öÆ°¿¡¼­ ¼±ÅÃÇÑ °ªÀ» °¡Á®¿ÀÀÚ. 
 */
function get_radioVal(obj) 
{ 
    if ( obj.length == null ) {  
        if ( obj.checked == true ) 
            return obj.value ;
    }
    else {
      for ( var i = 0 ; i < obj.length; i++ ) {
           if ( obj[i].checked == true ) 
              return obj[i].value ;
      } 
    } 
   return '';
} 

/**
 *  ¶óµð¿À ¹öÆ°¿¡ Æ÷Ä¿½º¸¦ ÁÖÀÚ. 
 */
function focus_radio(obj) 
{ 
    if ( obj.length == null ) {  
        obj.focus();
	return ;
    }
    else {
	obj[0].focus();
	return  ;
    } 
   return ;
} 

/**
 *  ¶óµð¿À ¹öÆ°À» ±ú²ýÈ÷ ÇÏÀÚ.
 */
function clear_radio(obj) 
{ 
    if ( obj.length == null ) {  
        obj.checked = false;
	return  ;
    }
    else {
	for ( var i = 0 ; i < obj.length; i++ ) {
	    obj[i].checked = false  ;
	} 
	return  ;
    } 
    return ;
} 

///
//
//  ÀÌ ÀÌÈÄ´Â Àß ¸ð¸£°ÚÀ½...
//
///
                                                                  
/** 
 * ¸Þ¼¼Áö¸¦ »Ñ·ÁÁÖ°í Æ÷Ä¿½º ÀÌµ¿ÇÏ´Â  ÇÔ¼ö 
 */ 
function AlertFocus(argMessage,argObj)
{
    alert(argMessage)
    argObj.focus()
}

/**
 * ÁÖ¹Î¹øÈ£¸¦ È®ÀÎÇÏÀÚ. 
 */
function check_resno(comp)
{
    var str =  String(comp.value);
    var isNum = true;
    var ll_resno = 0
    var ll_temp = 0

    ll_resno = ll_resno + parseInt(str.substring(0,1),10) * 9
    ll_resno = ll_resno + parseInt(str.substring(1,2),10) * 8
    ll_resno = ll_resno + parseInt(str.substring(2,3),10) * 7
    ll_resno = ll_resno + parseInt(str.substring(3,4),10) * 6
    ll_resno = ll_resno + parseInt(str.substring(4,5),10) * 5
    ll_resno = ll_resno + parseInt(str.substring(5,6),10) * 4
    ll_resno = ll_resno + parseInt(str.substring(6,7),10) * 3
    ll_resno = ll_resno + parseInt(str.substring(7,8),10) * 2
    ll_resno = ll_resno + parseInt(str.substring(8,9),10) * 9
    ll_resno = ll_resno + parseInt(str.substring(9,10),10) * 8
    ll_resno = ll_resno + parseInt(str.substring(10,11),10) * 7
    ll_resno = ll_resno + parseInt(str.substring(11,12),10) * 6
    ll_temp = ll_resno % 11

        if (ll_temp == 0 ){
        ll_temp = 1 }
        if (ll_temp == 10 ){
        ll_temp = 0}
        if(ll_temp != parseInt(str.substring(12,13),10)){
        return false; }
        return true ;
}
                                 
/**
 *  ¹®ÀÚ¿­ÀÇ °ø¹éÀ» Ã³¸® 
 */
function ConvStr(src) {
    var    i, result;

    for(i=0, result='';i<src.length;i++) {
        if(src.charAt(i) == ' ')
            result += '%20';
        else
            result += src.charAt(i);
    }

    return result;
}

/**
 *  ¿À´Ã ÀÏÀÚ¸¦ YYYY-MM-DD ÇüÅÂ·Î ºÒ·¯¿Â´Ù
 */
function today() {
    var delimiter = "-";
    var today = new Date(); 
    var result;
    result = today.getYear() + delimiter + (today.getMonth()+1) + delimiter + today.getDate();
    
    return result;
}



/**
 *  TableÀ§¿¡ ¸¶¿ì½ºÀÇ Ä¿¼­°¡ ¿Ã¶ó°¡¸é Çà´ÜÀ§·Î Highlighting.                           
 */ 
function TGOver()
{
   var obj = event.srcElement.parentElement;
   if ( obj.tagName != 'TR')  return;
   if ( event.type == "mouseover" )
   {
      tmpColor = obj.bgColor;
      obj.bgColor = "#F9F9F9";
	  
   }
   else if ( event.type == "mouseout" ) obj.bgColor = tmpColor;
}



/**
 *  Table ¿¡ row ¸¦ Ãß°¡ÇÑ´Ù. ÇØ´çÈ­¸é¿¡ ¸Â°Ô ¼öÁ¤ÇÏ¿© »ç¿ëÇÑ´Ù.                               
 */ 
function addRow(id){
    var tbody = document.getElementById(id).getElementsByTagName("TBODY")[0];
    var row = document.createElement("TR")
    var td1 = document.createElement("TD")
    td1.appendChild(document.createTextNode("column 1"))
    var td2 = document.createElement("TD")   
    td2.appendChild (document.createTextNode("column 2"))
    row.appendChild(td1);
    row.appendChild(td2);
    tbody.appendChild(row);
}
 

 
 /**
 *  ¿ìÆí¹øÈ£ ¼±ÅÃÈ­¸éÀ» openÇÑ´Ù.                           
 */ 
function OpenZipcode(formName, zip1, zip2, address, focus) {
	window.open("./common.do?cmd=showAddress&formName="+formName+"&zip1="+zip1+"&zip2="+zip2+"&address="+address+"&focus="+focus,"ZipWin","width=600,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no");
} 



/**
 *  °í°´ ¸ñ·Ï È­¸éÀ» openÇÑ´Ù.                           
 */ 
function OpenCustomerWindow(formName, zip1, zip2, address, focus) {
	window.open("./common/showAddress.jsp?formName="+formName+"&zip1="+zip1+"&zip2="+zip2+"&address="+address+"&focus="+focus,"ZipWin","width=470,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no");
} 



/**
 *  ModalDialog(ºÎ¸ðÃ¢À¸·Î Focus ÀÌµ¿ ¾ÈµÊ) À¸·Î ¿ÀÇÂ
 */  
function openModalDialog(parent_object, popup_file_name, popup_width, popup_height)
{
    popup_style = "scroll:0;status:0;resizable:0;help:0;center:1;dialogWidth:" +
        popup_width + "px;dialogHeight:" + popup_height + "px;";

    return window.showModalDialog(popup_file_name, parent_object, popup_style);
}

/**
 *  ModelessDialog(Ç×»ó À§¿¡ ¶ß´Â Ã¢) À¸·Î ¿ÀÇÂ
 */  
function openModalessDialog(parent_object, popup_file_name, popup_width, popup_height, popup_scroll)
{
    popup_style = "scroll:" + popup_scroll + ";status:0;resizable:0;help:0;center:1;dialogWidth:" +
        popup_width + "px;dialogHeight:" + popup_height + "px;";

    return window.showModelessDialog(popup_file_name, parent_object, popup_style);
}
// }}}


/**
 *  ºê¶ó¿ìÀú ÆË¾÷Ã¢ ¿ÀÇÂ
 */
function openWindow(strUrl, win_name, Width, Height, Scroll, Resizable)
{
    var Pwidth = (Math.ceil(screen.width/2) - Math.ceil(Width/2));
    var Pheight = (Math.ceil(screen.height/2) - Math.ceil(Height/2));

    if(win_name!=null)
    {
        newWin = window.open('about:blank',win_name,'menubar=0, locationbar=0,toolbar=0,scrollbars='+Scroll+',resizable='+Resizable+',left='+Pwidth+',top='+Pheight+',width='+Width+',height='+Height);
    }
    else
    {
        newWin = window.open('about:blank','_blank','menubar=0, locationbar=1,toolbar=1,scrollbars=1,resizable=1');
    }

    if(newWin!=null)
    {
        try
        {
            newWin.document.location.replace(strUrl);
            newWin.focus();
        }
        catch(e)
        {
            if(e.number == -2147024891)
            {
                alert("ÀÌ¹Ì »õÃ¢ÀÌ ¶ç¿öÁ® ÀÖ½À´Ï´Ù.\nÃ¢À» ´Ý°í ´Ù½Ã ÀÛ¾÷ÇÏ½Ê½Ã¿ä!");
                newWin.close();

                if(win_name!=null)
                {
                    newWin = window.open('about:blank',win_name,'menubar=0, locationbar=0,toolbar=0,scrollbars='+Scroll+',resizable='+Resizable+',left='+Pwidth+',top='+Pheight+',width='+Width+',height='+Height);
                }
                else
                {
                    newWin = window.open('about:blank','_blank','menubar=0, locationbar=1,toolbar=1,scrollbars=1,resizable=1');
                }

                try
                {
                    newWin.document.location.replace(strUrl);
                    newWin.focus();
                }
                catch(e)
                {
                    alert("»õÃ¢À» ¶ç¿ì´ÂÁß ½Ã½ºÅÛ ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù!\nerror number : " + e.number + "\nerror description : " + e.description + "\nmessage : " + e.message);
                }
            }
            else
            {
                alert("»õÃ¢À» ¶ç¿ì´ÂÁß ½Ã½ºÅÛ ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù!\nerror number : " + e.number + "\nerror description : " + e.description + "\nmessage : " + e.message);
            }
        }
    }
}

/**
 *   "-" Á¦°Å
 *  @pram comp : textbox name
 *  @return CardNumber without '-'
 */
function rem_hyphen(comp) 
{  
    var para = comp.value;
    for ( i = 0; i < para.length;)  
	    if ( para.substring(i,i+1) == '-' || para.substring(i,i+1) == unescape('%%0A') || para.substring(i,i+1) == unescape('%%0D') )  
	        para = para.substring(0, i) + para.substring(i+1, para.length); 
	    else  i++; 
    var para_cardno = para;
    comp.value = para_cardno;
	return para_cardno;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function openPop(){
	window.open("./reload/reloadCaddGuide.html","reloadCaddGuide","left=200,top=140, height=470,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
}

function openPop1(){
	window.open("./transaction/receiptGuide.html","receiptGuide","left=200,top=140, height=520,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");
}

function openPop2(){
	window.open("./transaction/emailGuide.html","emailGuide","left=200,top=140, height=470,width=540,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
}

function openWin(num){
	if(num == '1') {
	  window.open("./service/headquarters1.html","headquarters1","left=200,top=140, height=470,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
	}
	
	if(num == '2') {
	  window.open("./service/headquarters2.html","headquarters2","left=200,top=140, height=470,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
	}
	
	if(num == '3') {
	  window.open("./service/headquarters3.html","headquarters3","left=200,top=140, height=470,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
	}
	
	if(num == '4') {
	  window.open("./service/headquarters4.html","headquarters4","left=200,top=140, height=470,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
	}
	
	if(num == '5') {
	  window.open("./service/headquarters5.html","headquarters5","left=200,top=140, height=470,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
	}
	
	if(num == '6') {
	  window.open("./service/headquarters6.html","headquarters6","left=200,top=140, height=470,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
	}
	
}
function OpenMap() {
	window.open('http://mail.ex.co.kr/routechart/national/main_map_all.html','Construction','left=0,top=0,width=740,height=540');
}
function OpenMap01() {
	window.open('http://mail.ex.co.kr/routechart/sudo/sudo.html','Construction1','left=0,top=0,width=741,height=540');
}
function OpenMap02() {
	window.open('http://www.ex.co.kr/jsp/cyberway/main.jsp', 'Construction2','left=0,top=0,scrollbars=yes');
}
function openEps(){
	window.open('./transaction.do?cmd=epsMonitoring','eps','left=0,top=0,width=920,height=760,location=no,resizable=no,scrollbars=yes');
}
function denialEmail() {	 //Email ¹«´Ü¼öÁý°ÅºÎ
	window.open("./common/Email.jsp","email","left=200,top=140, height=300,width=600,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");
}
/*
* 2007-09-13
* add by cus
* ½Å¿ëÄ«µå·Î ÃæÀü Á¦ÇÑ »çÀ¯
*/
function openPopPage(){
/*	window.open("http://www.hipassplus.co.kr/reload/reloadCaddGuide.html","reloadCaddGuide","left=200,top=140, height=470,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");		*/
	window.open("https://www.hipassplus.co.kr/reload/reloadCaddGuide.html","reloadCaddGuide","left=200,top=140, height=470,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
}
/*
* 2007-09-13
* add by cus
* Çö±Ý ¿µ¼öÁõ ¹× ºÎ°¡ÅëÇà·á Á¶Á¤¾È³»
*/
function openPopPage1(){
/*	window.open("http://www.hipassplus.co.kr/transaction/receiptGuide.html","receiptGuide","left=200,top=140, height=520,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");		*/
	window.open("https://www.hipassplus.co.kr/transaction/receiptGuide.html","receiptGuide","left=200,top=140, height=520,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");
}
/*
* 2007-09-13
* add by cus
* ÇÏÀÌÆÐ½º À§¹ÝÂ÷·® SMS, email ¹ß¼Û¾È³»
*/
function openPopPage2(){
/*	window.open("http://www.hipassplus.co.kr/transaction/emailGuide.html","emailGuide","left=200,top=140, height=470,width=540,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");		*/
	window.open("https://www.hipassplus.co.kr/transaction/emailGuide.html","emailGuide","left=200,top=140, height=470,width=540,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
}
