/*******************************************
ÀÓ½Ã»ç¿ë (°Ë»ö¾î°¡ ½º³ë¿ì º¸µåÀÏ °æ¿ì¸¸ 1µª½º·Î ÀÌµ¿*/
	  
function chk_kw() {
	keyword = document.searchForm.kw.value;
	if (!keyword) {
		alert('°Ë»ö Å°¿öµå¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä');
		return false;
	} else {
		//if ( (keyword == '½º³ë¿ìº¸µå') || (keyword == '½º³ë¿ìº¸µå') || (keyword == '½º³ëº¸µå') || (keyword == 'º¸µå') || (keyword == '½º³ë¿ìº¸µåº¹') || (keyword == '½º³ëº¸µåº¹') || (keyword == 'µ¥Å©')) {
		if (keyword == '½º´ÏÄ¿Áî') {
			location.href="../shop/pdt_list.php?cCode=1578&kw="+keyword;
			return false;
		}
	}
}

/************************************************************************
* È¸¿ø °¡ÀÔ½Ã µ¿È£È¸ Ã¼Å© ½ºÅ©¸³Æ®
************************************************************************/
function sig_check(sig_type,opt_type) {
    if(sig_type == "sports25") {
        if(opt_type == "1") {
            document.member_info.etc_sig[0].disabled = true;
            document.member_info.etc_sig[1].disabled = true;
            document.member_info.sig_item.disabled = false;
            document.member_info.sig_name.disabled = false;
            document.member_info.etc_sig[0].checked = false;
            document.member_info.etc_sig[1].checked = false;
        } else {
            document.member_info.etc_sig[0].disabled = false;
            document.member_info.etc_sig[1].disabled = false;
            document.member_info.sig_item.disabled = true;
            document.member_info.sig_name.disabled = true;
        }
    } else {
        if(opt_type == "1") {
            document.member_info.sig_item.disabled = false;
            document.member_info.sig_name.disabled = false;
        } else {
            document.member_info.sig_item[0].selected = true;
            document.member_info.sig_item.disabled = true;
            document.member_info.sig_name.disabled = true;
            document.member_info.sig_name.value = '';
        }
    }
}





/************************************************************************
* flash¸¦ ÀÚ¹Ù½ºÅ©¸³Æ®·Î ºÒ·¯¿Í¼­ »Ñ·ÁÁÖ°í / ÆäÀÌÁöº° ¸Þ´º°íÁ¤ ¼Ò½º 
************************************************************************/

/*function flash(AMovie, AWMode, AWidth, AHeight) {
	document.write('<object id="setval" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + AWidth + '" height="' + AHeight + '">'
	+ '<param name="movie" value="' + AMovie + '?oneDepth=' + oneDepth + '&twoDepth='+twoDepth+'&threeDepth='+threeDepth+'&log_chk='+log_chk+'&user_id='+user_id+'&ss_mb_id='+ss_mb_id+'&ss_mb_pw='+ss_mb_pw+'&day_chk='+day_chk+'">'
	+ '<param name="wmode" value="' + AWMode + '">'
	//+ '<param name="flashvars" value="oneDepth=' + oneDepth + '&twoDepth='+twoDepth+'&threeDepth='+threeDepth+'">'
	+ '<embed src="' + AMovie + '?oneDepth=' + oneDepth + '&twoDepth='+twoDepth+'&threeDepth='+threeDepth+'&log_chk='+log_chk+'&user_id='+user_id+'&ss_mb_id='+ss_mb_id+'&ss_mb_pw='+ss_mb_pw+'&day_chk='+day_chk+'" id="setval" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + AWidth + '" height="' + AHeight + '"></embed>'
	+ '</object>');
}
*/


/************************************************************************
* flash¸¦ ÀÚ¹Ù½ºÅ©¸³Æ®·Î ºÒ·¯¿Í¼­ »Ñ·ÁÁÜ. (¸¶¼Ò¿¡¼­ flash¸¦ html¿¡¼­ ¸øºÒ·¯¿À°ÔÇØ¼­ ±×·¸´Ù°íÇÔ)
************************************************************************/
function setEmbed()
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspace = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 
  var clsid = new String;
  var codebase = new String;
  var pluginspage = new String;
  var embedType = new String;
  var getType = new String;
  var id = new String;
    
  this.init = function( getType , s ,w , h ) { 
  	this.getType = getType;
      
      if ( getType == "flash") 
      { 
        this.clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        this.codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
        this.pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        this.embedType = "application/x-shockwave-flash"; 
		  parameter += "<param name='movie' value='"+ s + "'>\n";  
		  parameter += "<param name='quality' value='high'>\n";    
      } 
      /* type Ãß°¡ 
      else if ( ) 
      { 
      } 
      */ 
            
      
      this.src = s; 
      this.width = w; 
      this.height = h; 
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  
  this.show = function() { 
      if ( this.getType == "flash" ) 
      { 
        obj = "<object classid=\"clsid:"+ this.clsid +"\" codebase=\""+ this.codebase +"\" width='"+ this.width +"' height='"+ this.height +"'>\n"; 
	  	embed = "<embed src='" + this.src + "' pluginspage='"+ this.pluginspage + "' type='"+ this.embedType + "' width='"+ this.width + "' height='"+ this.height +";border:1px solid gray'"+ allParameter +" ></embed>\n";
	  } else if ( this.getType == "object" ) {
        obj = "<object type='"+ this.embedType +"' id='"+ this.id +"' classid=\"clsid:"+ this.clsid +"\" codebase=\""+ this.codebase +"\" style='width:"+ this.width +"; height:"+ this.height +";border:1px solid gray'>\n"; 
	  }
      
      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      
      html = obj + parameter + embed;
	  
	  document.write( html );  
	  //alert(html);
  } 
  
} 

/************************************************************************
* flash¸¦ ÀÚ¹Ù½ºÅ©¸³Æ®·Î ºÒ·¯¿Í¼­ »Ñ·ÁÁÜ.
************************************************************************/
function setEmbed2()
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspace = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 
  var clsid = new String;
  var codebase = new String;
  var pluginspage = new String;
  var embedType = new String;
  var getType = new String;
  var id = new String;
    
  this.init = function( getType , s ,w , h ,oneDepth,twoDepth,threeDepth) { 
  	this.getType = getType;
      
      if ( getType == "flash") 
      { 
        this.clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        this.codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
        this.pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        this.embedType = "application/x-shockwave-flash"; 
		  parameter += "<param name='movie' value='"+ s +"?oneDepth="+oneDepth+"&twoDepth="+twoDepth+"&threeDepth="+threeDepth+"'>\n";  
		  parameter += "<param name='quality' value='high'>\n";    
      } 
      
      this.src = s; 
      this.width = w; 
      this.height = h; 
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  
  this.show = function() { 
      if ( this.getType == "flash" ) 
      { 
        obj = "<object classid=\"clsid:"+ this.clsid +"\" codebase=\""+ this.codebase +"\" width='"+ this.width +"' height='"+ this.height +"'>\n"; 
	  	embed = "<embed src='" + this.src + "' pluginspage='"+ this.pluginspage + "' type='"+ this.embedType + "' width='"+ this.width + "' height='"+ this.height +";border:1px solid gray'"+ allParameter +" ></embed>\n";
	  } else if ( this.getType == "object" ) {
        obj = "<object type='"+ this.embedType +"' id='"+ this.id +"' classid=\"clsid:"+ this.clsid +"\" codebase=\""+ this.codebase +"\" style='width:"+ this.width +"; height:"+ this.height +";border:1px solid gray'>\n"; 
	  }
      
      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      
      html = obj + parameter + embed;
	  
	  document.write( html );  
	  //alert(html);
  } 
  
} 


/************************************************************************
* Ajax¸¦ À§ÇÑ ±âº» ÀÎ½ºÅÏ½º »ý¼ºÇÔ¼ö(ÀÍ½ºÇÃ·Î·¯¿Í ¸ðÁú¶ó¸¦ ±¸º°ÇÏ¿© ÀÎ½ºÅÏ½º¸¦ »ý¼º)
************************************************************************/
function getXmlHttpRequest() {
	var xmlhttp = false;
	
	if( window.XMLHttpRequest ) {
		xmlhttp = new XMLHttpRequest();
	} else {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	return xmlhttp;
}

/************************************************************************
* blinkÅÂ±×¸¦ °¡´ÉÇÏ°Ô ¸¸µé¾îÁÜ.
************************************************************************/
function doBlink() {
  // Blink, Blink, Blink...
  var blink = document.all.tags("BLINK")
  for (var i=0; i < blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
}

function startBlink() {
  // Make sure it is IE4
  if (document.all)
    setInterval("doBlink()",500)
}
window.onload = startBlink;

/************************************************************************
* ºóÄ­ÀÌ¸é ÀÔ·ÂÇÏ¶ó°í ¾Ë¸².
************************************************************************/
function null_chk(obj,name) {
	str = obj.value;
	if( str == "" ) {
		alert(name+"Ç×¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		obj.value = "";
		obj.focus();
		return false;
	}
	return true;
}

/************************************************************************
* ÆË¾÷Ã¢ °¡¿îµ¥ ³õ±â.
************************************************************************/
function moveToCenter() {

}

/************************************************************************
* Step 1 Start
* ½Ç·ºÆ®¹Ú½º, checkbox, radio ¼±ÅÃ ½±°Ô ÇÏ±â
* <script>setSelect('name','value')</script>
************************************************************************/
function setValue(obj,value) {
	if( value ) {
		if( isObject(obj) ) {
			f = obj;
		} else {
			f = document.getElementById(obj);
		}
		switch( f.type ) {
			case "select-one":
			case "select-multiple":
				setSelect(obj,value);
				break;
			case "radio":
				setRadio(obj,value);
				break;
			case "checkbox":
				setCheckbox(obj,value);
				break;
		}
	}
}
function setSelect(obj,value){
	if(value){
		f = document.getElementById(obj);
		l = f.options.length;
		v = value.split(",");
		for( i=0; i<l; i++ ) {
			for( j=0;j<v.length;j++ ) {
				if( f[i].value == v[j] ) {
					f[i].selected = true;
				}
			}
		}
	}
}
function setCheckbox(obj,value){
	if(value){
		f = document.getElementsByName(obj);
		l = f.length;
		v = value.split(",");
		for( i=0; i<l; i++ ) {
			for( j=0;j<v.length;j++ ) {
				if( f[i].value == v[j] ) {
					f[i].checked = true;
				}
			}
		}
	}
}
function setRadio(obj,value){
	if(value) {
		f = document.getElementsByName(obj);
		l = f.length;
		for( i=0; i<l; i++ ) {
			if( f[i].value == value ) {
				f[i].checked = true;
			}
		}
	}
}
/*function setRadio(form,obj,value){
	if(value) {
		l = eval(form+"."+obj+".length");
		f = eval(form+"."+obj);
		for( i=0; i<l; i++ ) {
			if( f[i].value == value ) {
				f[i].checked = true;
				break;
			}
		}
	}
}*/
/************************************************************************
* Step1 End
************************************************************************/


/************************************************************************
* ÆäÀÌÁö³Ñ±â±â
************************************************************************/
/*function goPage( val) {
	var frm = document.paging;
	for(var i=0; i<frm.elements.length; i++) {
		var e = frm.elements[i];
		if(e.type == "hidden" && e.name == "page" ) e.value = val;
	}
	frm.submit();
}
*/
/************************************************************************
* ÀÌ¹ÌÁö¿¡ ¸Â°Ô Ã¢ ¶ç¿ì±â
************************************************************************/
function imgPop(src) {
	var imgObj = new Image();
	imgObj.src = src;
	if( imgObj.width >= screen.availWidth || imgObj.height >= screen.availHeight ) {
		var wopt = "scrollbars=yes,status=no,resizable=no";
	} else {
		var wopt = "scrollbars=no,status=no,resizable=no";
	}
	wopt += ",width=" + imgObj.width;
	wopt += ",height=" + imgObj.height;
	var wbody = "<head><title>ÀÌ¹ÌÁöº¸±â</title>";
	wbody += "<script language='javascript'>";
	wbody += "function finalResize(){";
	wbody += "  var oBody=document.body;";
	wbody += "  var oImg=document.images[0];";
	wbody += "  var xdiff=oImg.width-oBody.clientWidth;";
	wbody += "  var ydiff=oImg.height-oBody.clientHeight;";
	wbody += "  window.resizeBy(xdiff,ydiff);";
	wbody += "}";
	wbody += "moveTo('0','0');";
	wbody += "</"+"script>";
	wbody += "</head>";
	wbody += "<body onLoad='finalResize()' style='margin:0'>";
	wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
	wbody += "</body>";
	winResult = window.open("about:blank","",wopt);
	winResult.document.open("text/html", "replace");
	winResult.document.write(wbody);
	winResult.document.close();
	return;
}

/************************************************************************
* Step 2 Start
* Åä±Û¸Þ´º
************************************************************************/
function toggleMenu(currMenu) {
		if (document.all) {
			thisMenu = eval("document.all." + currMenu + ".style")
			if (thisMenu.display == "block") {
				thisMenu.display = "none"
			} else {
				thisMenu.display = "block"
			}
			return false
		} else {
			return true
		}
}

//Åä±Û¸Þ´º
function controlMenu(currMenu, tog) {
	if (document.all) {
		thisMenu = eval("document.all." + currMenu + ".style")
		thisMenu.display = tog;
		return false
	} else {
		thisMenu = eval("document.getElementById('" + currMenu + "').style")
		thisMenu.display = tog;
		return true
	}
}

//½º¹«µå Åä±Û
function smoothToggle(el) { 
	if (el.style.display == 'none'){ 
		el.filters.blendTrans.Apply(); 
		el.style.display = ''; 
		el.filters.blendTrans.Play() 
	} else { 
		el.filters.blendTrans.Apply(); 
		el.style.display = 'none'; 
		el.filters.blendTrans.Play() 
	} 
}
/*
<span id='sch' style='display:none;width:100%;filter:blendTrans(Duration=0.5)'>
<table border=0 cellspacing=0 cellpadding=2>
<form method=get name=search action=/zboard/zboard.php><input type=hidden name=id value=0yougame><input type=hidden name=select_arrange value=headnum><input type=hidden name=desc value=asc><input type=hidden name=page_num value=20><input type=hidden name=selected><input type=hidden name=exec><input type=hidden name=sn value="off"><input type=hidden name=ss value="on"><input type=hidden name=sc value="off"><input type=hidden name=category value="">
	<tr>
		<td></td>
	</tr>
</form>
</table>
</span>
*/
/************************************************************************
* Step 2 End
************************************************************************/


/************************************************************************
* ·Î±×¾Æ¿ô¹öÆ°
************************************************************************/
function logoutConfirm() {
	if( confirm('·Î±×¾Æ¿ôÇÏ½Ã°Ú½À´Ï±î?') ) {
		location.replace("/gshop/login/logout.php?lpt=logout");
	} else { } 
}


/************************************************************************
* ¿ìÆí¹øÈ£Ã£±â
************************************************************************/
function findZip(formName,fzip1,fzip2,faddr1,faddr2) {
	openWin("/member/zipCode.php?formName=" + formName + "&fzip1=" + fzip1 + "&fzip2=" + fzip2 + "&faddr1=" + faddr1 + "&faddr2=" + faddr2,"width=284,height=180,left=" + ( event.screenX - 200 ) + ",top=" + ( event.screenY - 200 ) + ",scrollbars=yes");
}


/************************************************************************
* ÆË¾÷Ã¢ ¿ÀÇÂ.
************************************************************************/
function openWin( url, arg ) {
	window.open( url, 'Win' , '' + arg );
	// resizeTo(), moveTo()
}

/************************************************************************
* ´ÙÀÌ¾ó·Î±×Ã¢À¸·Î ÆË¾÷(¸ð´ÞÆË¾÷)¶ç¿ì±â.
* ¿¹½Ã) doModal("/interpark/common/searchZipCode.html", "dialogWidth=800px; dialogHeight=600px; status=no; help=no");
************************************************************************/
window.hasModal = false;
var modal = null;

function doModal(url, windowStyle) {
	window.hasModal = true;

	var returnValue = showModalDialog(url, window, windowStyle);

	window.hasModal = false;
	return returnValue;
}

window.closeModal = function() {
	if(window.hasModal && modal != null)
	modal.closeDlg();
}
/************************************************************************
* ´ÙÀÌ¾ó·Î±×Ã¢À¸·Î ÆË¾÷(¸ð´ÞÆË¾÷)¶ç¿ì±â.
* ¿¹½Ã) doModal("/interpark/common/searchZipCode.html", "dialogWidth=800px; dialogHeight=600px; status=no; help=no");
************************************************************************/

/************************************************************************
* Step 3 Start
* ÀÚµ¿À¸·Î Æû ³Ñ°ÜÁÖ´Â°Å ( Form size¿¡ ÀÇÁ¸ ) 
* ±¸¹®ÀÇ ¿ëµµ¸¦ ÀßÆÄ¾ÇÇÏÁö¸øÇÔ
************************************************************************/
function autoskip( inputname, nextinputname) {

         if(inputname.type == 'text'){
                if((event.keyCode == 13) || (inputname.value.length >= inputname.size)) {

                        if(nextinputname.type == 'select-one' || nextinputname.type == 'select-multiple' || nextinputname.type == 'button'){
                        nextinputname.focus();
                        }else{
                        nextinputname.select();
                        }

                }
        }

		//ÆÄ¾Ç¸øÇÏ°Ô¾¸
        if(inputname.type == 'select-one' || inputname.type == 'select-multiple' || nextinputname.type == 'button'){
                if(event.keyCode == 13){
                  if(nextinputname.type == 'text'){
                  nextinputname.select();
                  }else{
                  nextinputname.focus();
                        }
                }
        }
        return;

}

/************************************************************************
* ÀÚµ¿À¸·Î Æû ³Ñ°ÜÁÖ´Â°Å ( Form maxlength¿¡ ÀÇÁ¸ )  
************************************************************************/
function autoskip2( inputname, nextinputname) {

         if(inputname.type == 'text'){
                if((event.keyCode == 13) || (inputname.value.length >= inputname.maxLength)) {

                        if(nextinputname.type == 'select-one' || nextinputname.type == 'select-multiple' || nextinputname.type == 'button'){
                        nextinputname.focus();
                        }else{
                        nextinputname.select();
                        }

                }
        }

        if(inputname.type == 'select-one' || inputname.type == 'select-multiple' || nextinputname.type == 'button'){
                if(event.keyCode == 13){
                  if(nextinputname.type == 'text'){
                  nextinputname.select();
                  }else{
                  nextinputname.focus();
                        }
                }
        }
        return;

}
/************************************************************************
* Step 3 End
************************************************************************/


/************************************************************************
* Step 4 Start
* ¼Ò¹®ÀÚ=> ´ë¹®ÀÚ·Î & autoskip
************************************************************************/
function upper_mask(inputname, nextinputname)   {

                var orig =  inputname.value;
                if (orig.length == 7){
                inputname.value = orig.toUpperCase();
                }
                autoskip(inputname, nextinputname);
        }
/************************************************************************
* ¼Ò¹®ÀÚ=> ´ë¹®ÀÚ·Î & autoskip
************************************************************************/

function upper_mask2(inputname, nextinputname)  {
                var orig =  inputname.value;

                if (orig.length == 6){
                inputname.value = orig.toUpperCase();
                }
                autoskip(inputname, nextinputname);
        }

/************************************************************************
* ³¯ÀÚ Çü½Ä(yymm) & autoskip (200101  ->  
************************************************************************/
function mon_mask(inputname, nextinputname)     {

                var orig =  setDeGrouping(inputname.value);

                if (orig.length == 6){
                inputname.value =  disp_mon(orig);
                }
                aptoskip(inputname, nextinputname);
        }
		
/************************************************************************
* ³¯ÀÚ Çü½Ä(yymmdd) & autoskip (200101  -> 2001/01
************************************************************************/
function date_mask(inputname, nextinputname)    {

                var orig =  setDeGrouping(inputname.value);
                if (orig.length == 8){
                    inputname.value =  disp_date(orig);

                    if( (event.keyCode == 50) || (event.keyCode == 51) ){

                    }else{
                       aptoskip(inputname, nextinputname);
                    }


                }

        }


/************************************************************************
* ¿ìÆí¹øÈ£ Çü½Ä & autoskip (111222  -> 111-222
************************************************************************/
function post_mask(inputname, nextinputname)    {

                var orig =  setDeHyphen(inputname.value);

                if (orig.length == 6){
                inputname.value =  disp_postNo(orig);
                }
                autoskip(inputname, nextinputname);
        }


/************************************************************************
* ÀÚ¿¬½º·¯¿î ³¯Â¥ ÀÔ·ÂÀ» À§ÇÑ modify autoskip
************************************************************************/
function aptoskip( inputname, nextinputname) {

        if(inputname.type == 'text'){
                if((event.keyCode == 13) && (inputname.value.length >= inputname.size)) {

                        if(nextinputname.type == 'select-one' || nextinputname.type == 'select-multiple' || nextinputname.type == 'button'){
                        nextinputname.focus();
                        }else{
                        nextinputname.select();
                        }

                }


        }

        if(inputname.type == 'select-one' || inputname.type == 'select-multiple' || nextinputname.type == 'button'){
                if(event.keyCode == 13){
                  if(nextinputname.type == 'text'){
                  nextinputname.select();
                  }else{
                  nextinputname.focus();
                        }
                }
        }
        return;

}

/************************************************************************
* Step 4 End
************************************************************************/


/************************************************************************
* ¿£ÅÍ¸¦ Ä¡°Å³ª  nputnameÀÌ lengthº¸´Ù Å©°Å³ª °°À¸¸é nextinputnameÀ¸·Î focus()ÀÌµ¿
************************************************************************/
function aptoskip2(inputname, nextinputname, length) {

		if((event.keyCode == 13) || (inputname.value.length >= length))
        	nextinputname.focus();

}

/************************************************************************
* "-" DeFormat
************************************************************************/
function setDeHyphen(str){

        if(str == null || str==" ") return "";
        if(str.indexOf("-") == -1) return str;
        var temp = "";
        for(var i = 0; i < str.length; i++){
                if((str.charAt(i) == '-')){

                continue;

                }else{

                temp += str.charAt(i);

                }
        }
        return temp;
}

/************************************************************************
* ³¯Â¥ DeFormat
************************************************************************/
function setDeGrouping(str){

        if(str == null || str==" ") return "";
        if(str.indexOf(",") == -1 && str.indexOf("/") == -1) return str;
        var temp = "";
        for(var i = 0; i < str.length; i++){
                if((str.charAt(i) == ',') || (str.charAt(i) == '/')){

                continue;

                }else{

                temp += str.charAt(i);

                }
        }
        return temp;
}

/************************************************************************
* Step 5 Start
* ³¯Â¥ value Á¸Àç¿Í À¯È¿°ª check
************************************************************************/
function IsDateCheck(object,obj_nm) {
		var obj = document.header.elements[object];
        var str =  setDeGrouping(obj.value);

        if(( str == "") || ( str == null )){
        	alert(obj_nm+"À» ÀÔ·Â ¹Ù¶ø´Ï´Ù.");
            obj.focus();
            return false;
        }else if(!isValidDay(str)) {
        	alert(obj_nm+"ÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù..");
            obj.focus();
            return false;
       }
       return true;

}


/************************************************************************
* ³¯Â¥ À¯È¿°ª check
************************************************************************/
function DateCheck(object,obj_nm) {
		var obj = document.header.elements[object];
        var str =  setDeGrouping(obj.value);

        if(!isValidDay(str)) {
        	alert(obj_nm+"ÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù..");
            obj.focus();
            return false;
      	}
      	return true;

}
/************************************************************************
* Step 5 End
************************************************************************/


/************************************************************************
* Step 6 Start
* NullÀÎÁö Ã¼Å©
************************************************************************/
function IsNull(object,obj_nm) {
		var  obj = document.header.elements[object];

        if(( obj.value == " ")||( obj.value == "") || ( obj.value == null )){
        	alert(obj_nm+" ÀÔ·Â ¹Ù¶ø´Ï´Ù.");
            obj.focus();
            return false;
        }
        return true;
}

function IsNullHidden(obj,obj_nm) {

		if(( obj.value == " ")||( obj.value == "") || ( obj.value == null )){
        	alert(obj_nm+" ÀÔ·Â ¹Ù¶ø´Ï´Ù.");
            obj.focus();
            return false;
        }
        return true;
}

/************************************************************************
* value Á¸Àç¿Í ±æÀÌ check
************************************************************************/
function IsLengthCheck(obj,leng,obj_nm) {
		// var obj = document.header.elements[object];

        if(( obj.value == " ") ||( obj.value == "") || ( obj.value == null )){
         	alert(obj_nm+"¸¦ ÀÔ·Â ¹Ù¶ø´Ï´Ù.");
            obj.focus();
            return false;
        }else if(obj.value.length < leng) {
        	alert(obj_nm+" "+leng+"ÀÚ¸®¸¦ ³Ö°í Á¶È¸¸¦ ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.");
            obj.focus();
            return false;
      	}
      	return true;
}

/************************************************************************
* ±æÀÌ check
************************************************************************/
function LengthCheck(obj,leng,obj_nm) {
		//var obj = document.header.elements[object];
        if(( obj.value == " ") ||( obj.value == "") || ( obj.value == null )){
        	obj.focus();
            return true;
		}else if(obj.value.length < leng) {
         	alert(obj_nm+" "+leng+"ÀÚ¸®¸¦ ³Ö°í Á¶È¸¸¦ ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.");
            obj.focus();
            return false;
        }
      	return true;
}
/************************************************************************
* Step 6 End
************************************************************************/

/************************************************************************
* ³â¿ùÀÏ À¯È¿°ª check [javascript callÇÔ¼ö]
************************************************************************/
function isValidDay(_day)
    {

	     MONTH = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) ;
         MAXDAY = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) ;
         var  year, mon, day ;

            if ( _day.length == 6 )
            _day += "01";

            if ( _day.length != 8 ) return false ;

            year = eval(_day.substring(0, 4));
            mon  = eval(_day.substring(4, 6));
            day  = eval(_day.substring(6, 8));

            if ( year <= 0 ) return false ;
            if ( mon <= 0 || mon > 12 ) return false ;
            if ( day <= 0 ) {
                return false ;
            } else if (  MAXDAY[mon - 1 ] < day ) {
                if ( isYoonYear(year) && mon == 2 && day < 30) return true ;
                else return false ;
            } else {
                return true ;
            }

}

/************************************************************************
* À±´Þ check [javascript callÇÔ¼ö]
* 4,100,400À¸·Î ³ª´©¾î¼­ 0ÀÌ¸é À±´ÞÀÓ
************************************************************************/
function isYoonYear(_year)
{

		if ( _year < 0 ) return false ;

		if (_year % 4 == 0)
			if (_year % 100 == 0)
				if (_year % 400 == 0)
					return true;
				else
					return false;
			else
				return true ;
		else
			return false ;

}

/************************************************************************
* Á¸ÀçÇÏ´ÂÁö ±×¸®°í °ø¹éÀÌ¾ø´Â ¼ýÀÚÀÎÁö  check
************************************************************************/
function IsNumCheck(object,obj_nm) {
		var obj = document.header.elements[object]; //¸ð¿¡¿ë??
        var str =  setDeGrouping(obj.value);

        if(( str == "") || ( str == null )){
        	alert(obj_nm+"À» ÀÔ·Â ¹Ù¶ø´Ï´Ù.");
            obj.focus();
            return false;
		}else if(!IsInteger(str)) {
         	alert(obj_nm+"¿¡ À¯È¿ÇÑ ¼ýÀÚ¸¦ ³Ö¾î ÁÖ¼¼¿ä.");
            obj.focus();
            return false;
        }
        return true;

}

/************************************************************************
*  ¼ýÀÚ°¡ À¯È¿ÇÑÁö¸¦ °Ë»ç
************************************************************************/
function IsInteger(st)
{
    if ( !IsEmpty(st) ){
          for (j=0; j<st.length; j++) {
             if (((st.substring(j, j+1) < "0") || (st.substring(j, j+1) > "9")))
                return false;
          }
    } else {
          return false ;
    }
    return true ;

}

/************************************************************************
* °ø¹éÃ¼Å©
************************************************************************/
function IsEmpty(toCheck)
{
     var chkstr = toCheck + "";
     var is_Space = true ;
     if ( ( chkstr == "") || ( chkstr == null ) )
           return false ;

     for ( j = 0 ; is_Space &&  ( j < chkstr.length ) ; j++){

             if( chkstr.substring( j , j+1 ) != " " )
               is_Space = false ;
     }

     return ( is_Space );
}


/************************************************************************
* rolloverÀÌ¹ÌÁö ±¸Çö
************************************************************************/
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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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];}
}

/************************************************************************
* Step 7 Start
* ÅëÈ­´ÜÀ§ Çü½ÄÀ¸·Î Ã³¸® (###,###,###)
************************************************************************/
function disp_digit(code)
{
		var rcode;
		var i = 0;
		var dat_num = 0;


		if(code.length ==0) return "";

		rcode="";

		dat_num=code.length;

		for(i=(code.length -1);i>=0;i--)
		{
				if((code.length -i-1) != 0)
				{
						if((code.length -i-1)%3 == 0)
						{
								if(code.charAt(i) != '-' && code.charAt(i+1) != '.' )
								{
										rcode = "," + rcode;
								}
						}
				}
				rcode= code.charAt(i) + rcode;
		}

		return rcode;
}

/************************************************************************
* ÅëÈ­´ÜÀ§ Çü½ÄÀ» Á¦°ÅÇß´Ù°¡ ´Ù½Ã ÅëÈ­´ÜÀ§ Çü½ÄÀ¸·Î Ã³¸®ÇÔ
* ¾î¶³¶§ »ç¿ëµÇ´ÂÁö ¸ð¸£°ÚÀ½
************************************************************************/
function dformat(form,code) {
	code = disp_notdigit(code);
	form.value = disp_digit(code);
}


/************************************************************************
* ÅëÈ­´ÜÀ§ Çü½ÄÀ» Á¦°Å (###,###,### -> #########)
************************************************************************/
function disp_notdigit(code)
{
		var rcode;
		var i,dat_num;

		if (code.length == 0 ) return "";

		rcode="";

		dat_num = code.length;

		for ( i=(dat_num-1) ; i >= 0 ; i--)
		{
				if( code.charAt(i) == ',' )
				{
										i--;
				}
				rcode= code.charAt(i) + rcode;
		}

		return rcode;
}
/************************************************************************
* Step 7 End
************************************************************************/

/************************************************************************
* Step 8 Start
* ³¯ÀÚ Çü½Ä  (20010101 -> 2001/01/01
************************************************************************/
function disp_date(date_type)
{

		var date_type;

		if (date_type.length >= 8 ) {
		date_type = date_type.substring(0,4)+"/"+date_type.substring(4,6)+"/"+date_type.substring(6,8);
		return date_type;
		}
		return "0"

}

/************************************************************************
* ³¯ÀÚ Çü½Ä  (200101  -> 2001/01
************************************************************************/
function disp_mon(date_mon)
{

		var date_mon;

		if (date_mon.length >= 6 ) {
		date_mon = date_mon.substring(0,4)+"/"+date_mon.substring(4,6);
		return date_mon;
		}
		return "0"

}
/************************************************************************
* Step 8 End
************************************************************************/


/************************************************************************
* °í°´¹øÈ£ Çü½Ä  (11112222  -> 1111-2222)
************************************************************************/
function disp_custNo(no)
{

		var no;

		if (no.length >= 8 ) {
		no = no.substring(0,4)+"-"+no.substring(4,8);
		return no;
		}
		return "0"

}


/************************************************************************
* ¿ìÆí¹øÈ£ Çü½Ä  (111222  -> 111-222)
************************************************************************/
function disp_postNo(no)
{

		var no;

		if (no.length >= 6 ) {
		no = no.substring(0,3)+"-"+no.substring(3,6);
		return no;
		}
		return "0"

}


/************************************************************************
* ÁÖ¹Î¹øÈ£ Çü½Ä  (7407041448817 -> 2001/01/01
************************************************************************/
function disp_jumin(jumin_type)
{
		var jumin_type;

		if (jumin_type.length == 13 ) {
		jumin_type = jumin_type.substring(0,6)+"-"+jumin_type.substring(6,13);
		return jumin_type;
		}
		return "0"

}


/************************************************************************
* ÁÖ¹Î¹øÈ£ Ã¼Å©  (20010515 -> 2001/01/01
************************************************************************/
function validJumin(juminno, textboxname)
{

		var obj = document.header.elements[textboxname];

		jumin = new Array();
		a = new Array();
		jumin = setDeHyphen(juminno) ;
		var j=1;

		for(var i=0;i<13;i++)
		a[i] = jumin.charAt(i);

		if(j)   {
				j=a[0]*2+a[1]*3+a[2]*4+a[3]*5+a[4]*6+a[5]*7+a[6]*8+a[7]*9+a[8]*2+a[9]*3+a[10]*4+a[11]*5;
				j=j%11;

				var k=11-j;
				if(k>9) k=k%10;

				j=a[12];

				if(j!=k) {
						alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ Æ²·È½À´Ï´Ù.!\n\nÁÖ¹Îµî·Ï¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¿©¾ß ÇÕ´Ï´Ù.!!");
						obj.focus();
						return false;
				}
		}
		return true;
}

/************************************************************************
* Step 9 Start
* ¼¿·ºÆ®¹Ú½º 
* true = color(white) ,°ªÀÔ·Â°¡´É , false = color(#cccccc) ÀÔ·ÂºÒ°¡´É
************************************************************************/
function dateAble( form,form2,type ) 
{
	if( type == true ) {
		form.style.backgroundColor = "white";
		form.disabled = false;
		form2.disabled = false;
	} else {
		form.style.backgroundColor = "#cccccc";
		form.disabled = true;
		form2.disabled = true;
	}
}

/************************************************************************
* ÅØ½ºÆ®¹Ú½º
* ÀÔ·Â°¡´É¿©ºÎ
************************************************************************/
function textAble( form, type ) 
{
	if( type == true ) {
		form.style.backgroundColor = "white";
		form.readOnly = false;
	} else {
		form.style.backgroundColor = "#cccccc";
		form.readOnly = true;
	}
}

/************************************************************************
* Ã¼Å©¹Ú½º
* Ã¼Å©°¡´É¿©ºÎ
************************************************************************/
function chkAble( form, type ) 
{
	if( type == true ) {
		form.disabled = false;
		form.checked = true;
	} else {
		form.disabled = true;
		form.checked = true;
	}
}
/************************************************************************
* Step 9 End
************************************************************************/

/************************************************************************
* °ø¹éÁ¦°Å
************************************************************************/
function trim(objValue) 
{
	var oval=objValue;
	
	var myre1=/^(\s)+(\S*)/g; //ltrim 
	var myre2=/(\S*)(\s+)$/g; //rtrim 
	
	oval=myre1.test(oval) ? oval.replace(myre1,"$2") : oval; 
	oval=myre2.test(oval) ? oval.replace(myre2,"$1") : oval; 
	
	return oval;
//document.all.tg.value=oval; 
}

/************************************************************************
* ¸ð¸£°ÚÀ½
************************************************************************/
function noQuot(obj5str) 
{
	var temp;
	var type=typeof(obj5str);
	var oval=type=="string" ? obj5str : obj5str.value;
	var temp=oval.replace(/'|"/g,'');
	if (type=="string") return temp;
	else obj5str.value=temp;
}

/************************************************************************
* ¸ð¸£°ÚÀ½
************************************************************************/
function noQuot2(obj5str) 
{
	var temp;
	var type=typeof(obj5str);
	var oval=type=="string" ? obj5str : obj5str.value;
	var temp=oval.replace(/'|"|\s/g,'');	//°ø¹é±îÁö
	if (type=="string") return temp;
	else obj5str.value=temp;
}


/************************************************************************
* ¼ýÀÚÃ¼Å©
************************************************************************/
function isNumber(formname) 
{
   var form = eval("document.reg_form." + formname);

  for(var i = 0; i < form.value.length; i++) {
	 var chr = form.value.substr(i,1);
	 if(chr < '0' || chr > '9') {            
		return false;
	 }
  }
  return true;   
}
function isNumeric(arg) 
{
   //var form = eval("document.reg_form." + formname);

  for(var i = 0; i < arg.length; i++) {
	 var chr = arg.substr(i,1);
	 if(chr < '0' || chr > '9') {            
		return false;
	 }
  }
  return true;   
}

/************************************************************************
* Step 10 Start
* °Ë»ö¾î ÀÔ·Â¿©ºÎ Ã¼Å©
************************************************************************/
function normalSearch( form ) 
{
	if( !form.kw.value ) {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		return false;
	}
	return true;
}

/************************************************************************
* °Ë»ö°¡¿ª ÀÔ·Á¿©ºÎ Ã¼Å©
************************************************************************/
function priceSearch( form ) 
{
	if( !form.price1.value || !form.price2.value ) {
		alert("°Ë»öÀ» ¿øÇÏ½Ã´Â °¡°Ý´ë¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		return false;
	}
	return true;
}
/************************************************************************
* Step 10 End
************************************************************************/

/************************************************************************
* Step 11 Start
* ¸¶ÀÌÅ©·ÎÅ¸ÀÓÀ¸·Î »öÀÌ ±ô¹Ú°Å¸®°Ô º¸ÀÌµµ·ÏÇÏ´Â ±â´É
************************************************************************/
function flashit( args ) 
{ 
	if (!document.all) { return }
	if (args.style.color == "white") { 
		args.style.color="red" 
	} else {
		args.style.color="white" 
	}
} 

function blink( args ) 
{
	setInterval("flashit(" + args + ")", 700) 
}
/************************************************************************
* Step 11 End
************************************************************************/

/************************************************************************
* Ä«ÇÇÇÒ°Í
************************************************************************/
function copyit(s){
    var doc = document.body.createTextRange();
    doc.moveToElementText(document.getElementById(s));
    doc.select();
    doc.execCommand('copy');
    alert('ÀúÀåµÇ¾ú½À´Ï´Ù.\nCtrl + V·Î ¿øÇÏ½Ã´Â °÷¿¡ ºÙ¿©³ÖÀ» ¼ö ÀÖ½À´Ï´Ù.');
}




function isAlien(a) {
   return isObject(a) && typeof a.constructor != 'function';
}
function isArray(a) {
    return isObject(a) && a.constructor == Array;
}
function isBoolean(a) {
    return typeof a == 'boolean';
}
function isEmpty(o) {
    var i, v;
    if (isObject(o)) {
        for (i in o) {
            v = o[i];
            if (isUndefined(v) && isFunction(v)) {
                return false;
            }
        }
    }
    return true;
}
function isFunction(a) {
    return typeof a == 'function';
}
function isNull(a) {
    return typeof a == 'object' && !a;
}
function isNumber(a) {
    return typeof a == 'number' && isFinite(a);
}
function isObject(a) {
    return (a && typeof a == 'object') || isFunction(a);
}
function isString(a) {
    return typeof a == 'string';
}
function isUndefined(a) {
    return typeof a == 'undefined';
}
