var isIE70 = ( navigator.appVersion.indexOf("MSIE 7") != -1 ) ? true : false;

/**********************************************************************************
* µå¸²À§¹ö ÇÔ¼ö
* »ç¿ë¹ý : 
**********************************************************************************/
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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

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_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 chgObject(id){
document.write(id.text);id.id='';
}

/******************************************************************************
*	Flash File View Script
*******************************************************************************/
function swf(src,w,h){
	html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
//	html += '<param name="wmode" value="window">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="menu" value="false">';
	html += '<param name="bgcolor" value="#000000">';
	html += '<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

/******************************************************************************
*	±âº» ½ºÅ©¸³Æ®
*******************************************************************************/
function unlock()
{
  check_attack.check.value=0;
}

function unlock2()
{
  pw_attack.pcheck.value=0;
}


//isEmpty(°ø¹é°Ë»çÇÔ¼ö)
function isEmpty( data )
{
   for ( var i = 0 ; i < data.length ; i++ )
   {
      if ( data.substring( i, i+1 ) != " " )
         return false;
   }
   return true;
}

//ÇÑ±ÛÀÔ·ÂÈ®ÀÎÇÏ±â
function CheckHangul(name) {
    strarr = new Array(name.value.length);
    schar = new Array('/','.','>','<',',','?','}','{',' ','\\','|','(',')','+','=');

    for (i=0; i<name.value.length; i++)
    {
        for (j=0; j<schar.length; j++)
        {
            if (schar[j] ==name.value.charAt(i))
            {
                //alert(escape(name.value.charAt(i)) );
                alert("ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
                name.focus();
                return false;
            }
            else
                continue;
        }

        strarr[i] = name.value.charAt(i)
        if ((strarr[i] >=0) && (strarr[i] <=9))
		{
            alert("ÀÌ¸§¿¡ ¼ýÀÚ°¡ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else if ((strarr[i] >='a') && (strarr[i] <='z'))
		{
            alert("ÀÌ¸§¿¡ ¾ËÆÄºªÀÌ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else if ((strarr[i] >='A') && (strarr[i] <='Z'))
		{
            alert("ÀÌ¸§¿¡ ¾ËÆÄºªÀÌ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else if ((escape(strarr[i]) > '%60') && (escape(strarr[i]) <'%80') )
		{
            alert("ÀÌ¸§¿¡ Æ¯¼ö¹®ÀÚ°¡ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else
        {
        //      alert(escape(strarr[i]) );
				continue;
        }

    }
        return true;
}

//ÀÔ·Â±æÀÌ Ã¼Å©ÇÔ¼ö(¹ÙÀÌÆ®ºñ±³)
function CheckLen(textname,bytesname){
	var t;
	var msglen;
	msglen=0; 
	l=textname.value.length; 
	for(k=0;k<l;k++){
		t=textname.value.charAt(k);
		if(escape(t).length>4) msglen+=2; 
		else msglen++;
	} 
	bytesname.value=msglen; 
}

//ÀÔ·Â±æÀÌÃ¼Å©ÇÏ±â ÇÔ¼ö(´Ü¼øºñ±³)
function CheckLen1(name,minlen,maxlen) {
        if (name.value.length < minlen)
        {
            // alert("ÀÔ·ÂµÈ °ªÀÇ ±æÀÌ°¡ Âª½À´Ï´Ù!");
            name.focus();
            return false;
        }
        else if (name.value.length > maxlen)
        {
            // alert("ÀÔ·ÂµÈ °ªÀÇ ±æÀÌ°¡ ³Ê¹« ±é´Ï´Ù!");
            name.focus();
            return false;
        }
        else
            return true;
}


// Æ¯¼ö¹®ÀÚ Ã¼Å©
function Check_nonChar(id_text)
{
	var nonchar = '~`!@#$%^&*()-_=+\|<>?,./;:"';
	var numeric = '1234567890';
	var nonkorean = nonchar+numeric; 
	
	var i ; 
	for ( i=0; i < id_text.length; i++ )  {
		if( nonkorean.indexOf(id_text.substring(i,i+1)) > 0) {
			break ; 
		}
	}
	
	if ( i != id_text.length ) {
		return false ; 
	}
	else{
		return true ;
	} 
	
	return false;
}

function TrimString(SrcString)
{



   /* ¿ÞÂÊ Æ®¸²   */
   len = SrcString.length;
   for(i=0;i<len;i++)
   {
      if(SrcString.substring(0,1) == " ")
      {
         SrcString = SrcString.substring(1);
      }
      else
      {
         break;
      }
   }

   /* ¿À¸¥ÂÊ Æ®¸²   */
   len = SrcString.length;
   for(i=len;i>0;i--)
   {
      if(SrcString.substring(i-1) == " ")
      {
         SrcString = SrcString.substring(0,i-1);
      }
      else
      {
         break;
      }
   }

   return SrcString;
}

function allblur() {
for (i = 0; i < document.links.length; i++)
document.links[i].onfocus = document.links[i].blur;
}

<!--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 swf(w,h,url,chk){
// try{
//  var swfW = w;  //width
//  var swfH = h; //height
//  var swfU = url;  //url
//  var swfUsechk = chk; //visible
//  if(swfUsechk == "Y"){
//   document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + swfW + '" height="' + swfH + '">');
//   document.writeln('<param name="movie" value="' + swfU + '">');
//   document.writeln('<param name="quality" value="high">');
//   document.writeln('<param name="menu" value="false">');
//   document.writeln('<PARAM NAME="wmode" VALUE="opaque">');
//   document.writeln('<PARAM NAME="wmode" VALUE="transparent">');
//   document.writeln('<embed src="' + swfU + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" type="application/x-shockwave-flash" width="' + swfW + '" height="' + swfH + '"></embed></object>');
//  }
// }catch(e){
// }
//}


var old_menu = '';
function menuclick(num) {
 var submenu = eval("document.getElementById('k_oc_" + num+"')");

 if(old_menu != submenu) {
  if(old_menu != '') old_menu.style.display = 'none';
  submenu.style.display = 'block';
  old_menu = submenu;
 } else {
  submenu.style.display = 'none';
  old_menu = '';
 }
}

function mTop(fstx,fsty,lstx,lsty) {
	var Timer;
	var winHeight = document.body.scrollTop;
	if(Timer) clearTimeout(Timer);
	
	startx = 0;
	starty = winHeight;
	if(!fstx || fstx < 0) fstx = 0;
	if(!fsty || fsty < 0) fsty = 0;
	
	var speed = 7;
	if(!lstx) lstx = 0 + startx;
	if(!lsty) lsty = 0 + starty;
	lstx += (fstx - startx) / speed;
	if (lstx < 0) lstx = 0;
	lsty += (fsty - starty) / speed;
	if (lsty < 0) lsty = 0;
	var posX = Math.ceil(lstx);
	var posY = Math.ceil(lsty);
	window.scrollTo(posX, posY);
	if((Math.floor(Math.abs(startx - fstx)) < 1) && (Math.floor(Math.abs(starty - fsty)) < 1)){
		clearTimeout(Timer);
		window.scroll(fstx,fsty);
	}
	else if(posX != fstx || posY != fsty){
		Timer = setTimeout("mTop("+fstx+","+fsty+","+lstx+","+lsty+")",15);
	}
	else{
		clearTimeout(Timer);
	}
}

/******************************************************************************
* ¿À¼Çºê¸´Áö ½Å±Ô Ãß°¡
*******************************************************************************/

var $ = function (Str) {
	return document.getElementById(Str);
}

var $$ = function (Str) {
	return document.getElementsByName(Str);
}

function searXh(category,keyword,Params,Msg) {
	category = $(category);
	keyword = $(keyword);
	if (!Msg) { Msg = "°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä"; }
	if (!keyword.value) {
		alert(Msg);
		return keyword.focus();
	}
	if (Params) { Params = "&" + Params; }
	location.href = "?category=" + category.value + "&keyword=" + keyword.value + Params;
}

function movePage(urls) {
	if (!urls) {
		return history.back();
	}
	location.href = urls;
}

function ImageRecover(Obj,Msg) {
	if (!Msg) { Msg = "<b>image</b>"; }
	var spanElement = document.createElement("SPAN");
	spanElement.innerHTML = Msg;
	Obj.parentNode.replaceChild(spanElement,Obj);
}

function defaultValues(Obj,Values) {
	Obj.value = (!Obj.value || Obj.value == Values) ? "" : Obj.value;
	//Obj.value = (!Obj.value || Obj.value == Values) ? Values : Obj.value;
}

function onlyNum(Obj) {
	try {
		if (isNaN(Obj.value) || Obj.value.match(" ")) {
			Obj.value = "";
		}
	} catch (e) {
		alert(e.number + " : " + e.description);
	}
}

function needNum(Obj) {
	Obj.value = (!Obj.value) ? 0 : Obj.value;
}

function is_Alnum(Values) {
	if (!Values.length) { return false; }
	var AlnumChk = new RegExp("( |!|@|#|\\$|%|\\^|&|\\*|\\(|\\)|\\\\|\\?|\\*|\\[|\\]|\\{|\\}|'|\"|\\+|/|\\.|,|=|:|;|[¤¡-ÆR])");
	return AlnumChk.test(Values);
}

function is_Email(Values) {
	if (!Values.length) { return false; }
	//var MailChk = new RegExp("^([0-9a-zA-Z]|_|-)+@([0-9a-zA-Z]|_|-)+(\\.[a-zA-Z]+){1,2}$");
	var MailChk = new RegExp("^([0-9a-zA-Z]|_|-)+@([0-9a-zA-Z]|_|-)+(\\.com|\\.net|\\.org|\\.biz|\\.info|\\.co\\.kr|\\.or\\.kr|\\.pe\\.kr|\\.ne\\.kr|\\.kr|\\.cc|\\.jp|\\.tv|\\.cn)$");
	return MailChk.test(Values);
}

function is_Chinese(Values) {
	if (!Values.length) { return false; }
	var tests = false;
	for (var i = 0; i < Values.length; i++) {
		if (escape(Values.substr(i,1)).substr(0,2) == "%u" && escape(Values.substr(i,1)).substr(2,1) >= 4) {
			tests = true;
		}
	}
	return tests;
}

function likeRadio() {
	if (!arguments.length) { return; }
	var EventId = document.activeElement.getAttribute("id");
	for (var i = 0; i < arguments.length; i++) {
		if (EventId == arguments[i]) {
			$(arguments[i]).checked = true;
		} else {
			$(arguments[i]).checked = false;
		}
	}
}

function likeF(e,gEI) {
	if (e.keyCode == 13) {
		$(gEI).click();
	}
}

function checkF(F,Msg) {
	if (!Msg) { Msg = "°¢ Ç×¸ñÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À."; }
	for (var i = 0; i < F.elements.length; i++) {
		if (F.elements[i].getAttribute("certainly") == "true") {
			if (!F.elements[i].value) {
				alert(Msg);
				F.elements[i].focus();
				return false;
			}
		}
	}
	F.submit();
}

function pagePrint(gEI) {
	var W = $(gEI).offsetWidth;		//screen.availWidth;
	var H = $(gEI).offsetHeight;		//screen.availHeight;
	var features = "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=" + W + ",height=" + H + ",left=0,top=0";
	var PrintPage = window.open("about:blank",gEI,features);
	PrintPage.document.write("<html><head><title></title><style type='text/css'>body, tr, td, input, textarea { font-family:Tahoma; font-size:9pt; }</style>\n</head>\n<body>" + $(gEI).innerHTML + "\n</body></html>");
	PrintPage.document.title = document.domain;
	PrintPage.print(PrintPage.location.reload());
}

function windowOpen(urls,thisid,features) {
	window.open(urls,thisid,features);
}

/**********************************************************************************/

function bluring() {
	
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG" || (event.srcElement.tagName=="INPUT" && event.srcElement.type=="checkbox") || (event.srcElement.tagName=="INPUT" && event.srcElement.type=="radio")) document.body.focus(); 
} 
document.onfocusin=bluring;

/**********************************************************************************
* ¿ìÆí¹øÈ£°Ë»öÃ¢ ¶ç¿ì±â
* »ç¿ë¹ý : forn name, ¿ìÆí¹øÈ£ ¾ÕÀÚ¸®, ¿ìÆí¹øÈ£ µÞÀÚ¸®, ±âº»ÁÖ¼Ò, »ó¼¼ÁÖ¼Ò
**********************************************************************************/
function post_chk(a,b,c,d,e)
{

	if ( isIE70 == true ) {
		height_length = 250;  //7.0¹öÀüÀÌ»óÀÏ¶§
	}else{
	 height_length = 250;  // ±×ÀÌÇÏÀÏ¶§.
	}

	
	url     = "/inc/popskin/post.php";
	R_URL= url+"?formname="+a+"&zip1="+b+"&zip2="+c+"&addr1="+d+"&addr2="+e;         
	window.open(R_URL, 'Window', 'width=400, height='+height_length+', left='+(screen.availWidth-400)/2+',top='+(screen.availHeight-280)/2+',fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,historycopy=0');  

}

/**********************************************************************************
* ¾ÆÀÌµðÁßº¹Ã¼Å©Ã¢ ¶ç¿ì±â
* »ç¿ë¹ý : ¾ÆÀÌµð
**********************************************************************************/
function id_chk(a, b)
{
	var form = eval("document."+a+"."+b);
	if ( isIE70 == true ) {
		height_length = 286;  //7.0¹öÀüÀÌ»óÀÏ¶§
	}else{
	 height_length = 256;  // ±×ÀÌÇÏÀÏ¶§.
	}

    var LEN = str_length(form);
		
		if ((LEN > 12) || (LEN < 4)) {
			alert('4~12ÀÚ »çÀÌÀÇ ¿µ¹®/¼ýÀÚ Á¶ÇÕÀ¸·Î ÀÔ·ÂÇÏ¼¼¿ä.');form.focus();
		}	
		else {
			if(!TypeCheck(form.value, ALPHA+NUM)){ alert('È¸¿ø¾ÆÀÌµð´Â ¿µ¹®,¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.');form.focus();}
			else if (!TypeCheck(form.value.substr(0, 1), ALPHA))	{alert('È¸¿ø¾ÆÀÌµð Ã¹±ÛÀÚ´Â ¿µ¹®ÀÌ¾î¾ß ÇÕ´Ï´Ù.');form.focus();}
			else {
			Userid = form.value;
			var R_URL="";
			url     = "/inc/popskin/id_check.php";
			Userid  = Userid;
			ret_url = '';


			R_URL= url+"?kind="+a+"&Userid="+Userid+"&ret_url="+ret_url;         
			window.open(R_URL, 'Window', 'width=400, height='+height_length+', left='+(screen.availWidth-400)/2+',top='+(screen.availHeight-280)/2+',fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,historycopy=0');  
		}
	}
}


/**********************************************************************************
* ±ÛÀÚ¼ö Ä«¿îÆ®
* »ç¿ë¹ý : ÀÔ·ÂÇÊµå
**********************************************************************************/
function str_length(a) {
	if ( navigator.appCodeName != 'Mozilla' ) {
		return a.value.length;
	}
	var len = 0; 
	for (var i=0; i<a.value.length; i++) {
		if ( a.value.substr(i, 1) > '~' ) {
			len+=2;
		} else {
			len++;
		}
	}
	return len;
}


/**********************************************************************************
* ÀÔ·Â¸ðµå È®ÀÎ (¼ýÀÚ, ¿µ¹®ÀÚ, ÇÏÀÌÇÂ
* »ç¿ë¹ý : ÀÔ·ÂÇÊµå
**********************************************************************************/
var NUM = "0123456789";
var SALPHA = "abcdefghijklmnopqrstuvwxyz";
var ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+SALPHA;	
var UNDER="-";

function TypeCheck (s, spc) {
		var i;

		for(i=0; i< s.length; i++) {
			if (spc.indexOf(s.substring(i, i+1)) < 0) {
				return false;
			}
		}        
		return true;
}

/**********************************************************************************
* ÆäÀÌÁö ÀÌµ¿ :onclick¿¡ »ç¿ë
* »ç¿ë¹ý : url
**********************************************************************************/
function Url(url) {
document.location.href=url;
}

/*********************************************************************
* inputCheck »ç¿ë¹ý : form name, ¿¤¸®¸ÕÆ®, ¼ýÀÚ¹®ÀÚ, ¼ýÀÚ±¸ºÐ, max length, min length, ÀÌ¸ÞÀÏÃ¼Å©
*********************************************************************/
function inputCheck(form_name, elm, msg, StrOrNum, Num_gubun, max_len, min_len, IsEmail) {
	var form = eval("document."+ form_name +"."+ elm);
	var inputStr = form.value;

	if (!inputStr) {
		alert(msg +"ÀÇ Ç×¸ñÀº ¹Ýµå½Ã ÀÔ·ÂÇÏ¼Å¾ß µË´Ï´Ù.");
		form.focus();
		return false;
	} else {

		if (StrOrNum=="Num") {
			if (!isNums(form_name, elm, msg)) { return false; }
		}
	}
	return true;
}


/*********************************************************************
* ¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.
* »ç¿ë¹ý : forn name, ¿¤¸®¸ÕÆ®
*********************************************************************/
function isNums(form_name, elm, msg) {
	var form = eval("document."+ form_name +"."+ elm);

  	for(i = 0; i < form.value.length; i++) {
		var ch = form.value.substr(i,1);
		if(ch < "0" || ch > "9") {
			alert(msg +" ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼Å¾ß µË´Ï´Ù.");
			form.value="";
			form.focus();
			return false;
		}
	}

	return true;
}

/*********************************************************************
* ÀÌ¸ÞÀÏ Çü½Ä °Ë»ç
* »ç¿ë¹ý IsEmail(ÆûÀÌ¸§, ¿¤¸®¸ÕÆ®ÀÌ¸§, Ç×¸ñ)
*********************************************************************/
function IsEmail(form_name,elm,msg) {
	var form = eval("document."+form_name+"."+elm);
	if ( isIE70 == true ) {
		height_length = 286;  //7.0¹öÀüÀÌ»óÀÏ¶§
	}else{
	 height_length = 256;  // ±×ÀÌÇÏÀÏ¶§.
	}

	var form = eval("document."+ form_name +"."+ elm);
	var inputStr = form.value
	if (inputStr=='')
	{
		alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä")
		form.focus();
		return false;
	}
	emailchk = 0
	for (var j=0; j < inputStr.length ; j++ ) {
		var ch= inputStr.substring(j,j+1);
		if (ch == "@" | ch== "." ) {
			emailchk = emailchk + 1;
		}
	}
	if (emailchk < 2 ) {
		alert(msg+" ¸ÞÀÏÁÖ¼Ò°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
		form.value="";
		form.focus();
		return false;
	}
	email = form.value;
	var R_URL="";
	url     = "/inc/skin/mail.asp";
	email  = email;
	ret_url = '';


	R_URL= url+"?kind="+form_name+"&email="+email+"&ret_url="+ret_url;         
	window.open(R_URL, 'Window', 'width=400, height='+height_length+', left='+(screen.availWidth-400)/2+',top='+(screen.availHeight-280)/2+',fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,historycopy=0');  
	return true;

}


/*********************************************************************
* diabled true±â´É
* »ç¿ë¹ý : forn name, ¿¤¸®¸ÕÆ®
*********************************************************************/
function DisabledTure(form_name, elm) {
	var form = eval("document."+ form_name +"."+ elm);

	form.disabled = true;
	form.style.background='eeeeee';
}


/*********************************************************************
* diabled false
* »ç¿ë¹ý : forn name, ¿¤¸®¸ÕÆ®
*********************************************************************/
function DisabledFalse(form_name, elm) {
	var form = eval("document."+ form_name +"."+ elm);

	form.disabled = false;
	form.style.background='ffffff';
}


/*********************************************************************
* ¼¿·ºÆ®¹Ú½º ÀÔ·Â°ª À¯¹«Ã¼Å©ÇÑÈÄ °æ°íÃ¢ ¶Ù¿ì±â
* »ç¿ë¹ý : "ÆûÀÌ¸§", "¿¤¸®¸ÕÆ®ÀÌ¸§", "Ç×¸ñ"
*********************************************************************/
function selectCheck(form_name, elm, msg){

	var form = eval("document."+ form_name +"."+ elm);
	var inputStr = form.options[form.selectedIndex].value
	
	if (inputStr==''){
		alert(msg + " Ç×¸ñÀº ¹Ýµå½Ã ¼±ÅÃÇÏ¼Å¾ß µË´Ï´Ù.");
		form.value="";
		form.focus();
		return false;
	}
	return true;
}



/*********************************************************************
* ·¹µð¿À ÀÔ·Â°ª À¯¹«Ã¼Å©ÇÑÈÄ °æ°íÃ¢ ¶Ù¿ì±â
* »ç¿ë¹ý : "ÆûÀÌ¸§", "¿¤¸®¸ÕÆ®ÀÌ¸§", "Ç×¸ñ"
*********************************************************************/
function radioCheck(form_name, elm, msg){

	var form = eval("document."+ form_name +"." + elm);
	chkCount = 0;
	
	for (var i=0; i<form.length; i++) {
		if (form[i].checked) {
			chkCount++;
			break;
		}
	}

	if (chkCount==0) {
		alert(msg + " Ç×¸ñÀº ¹Ýµå½Ã ¼±ÅÃÇÏ¼Å¾ß µË´Ï´Ù.");
		return false;
	}
	return true;
}

/*********************************************************************
* Ã¼Å©¹Ú½º ÀÔ·Â°ª À¯¹«Ã¼Å©ÇÑÈÄ °æ°íÃ¢ ¶Ù¿ì±â
* »ç¿ë¹ý : "ÆûÀÌ¸§", "¿¤¸®¸ÕÆ®ÀÌ¸§", "Ç×¸ñ"
*********************************************************************/
function checkboxCheck(byname,msg) {
	var obj = document.getElementsByName(byname);
	chkCount = 0;

	for (var i =0 ; i < obj.length ; i++ ) {
		if (obj[i].checked)
		{
			chkCount++;
			break;
		}
	}
	if (chkCount==0) {
		alert(msg + " Ç×¸ñÀº ¹Ýµå½Ã ¼±ÅÃÇÏ¼Å¾ß µË´Ï´Ù.");
		return false;
	}
	return true;
}

/*********************************************************************
* ÇÊµåÀÌµ¿
* »ç¿ë¹ý : "ÇöÀçÇÊµå", "´ÙÀ½ÇÊµå", "±ÛÀÚ¼ö"
*********************************************************************/
var tabnext = true;
var curr_value = null;
function autonext(curfocus, next, maxSize)
{
	num = curfocus.value;
	curSize = num.length;
	numFlag = Number(num);

	if(!numFlag && curSize > 1 && num != '00' &&  num != '000')
	{
		alert('¼ýÀÚ¸¦ ³Ö¾îÁÖ¼¼¿ä');
		curfocus.focus();
		return false;
	}

	if( curSize == maxSize) {
			if(tabnext || curr_value != curfocus.value)
			{
				curr_value = curfocus.value;
				tabnext = false;
				next.focus();
			}
			return true;
	}
	tabnext = true;
}

/*********************************************************************
* Ã¼Å©¹Ú½º ÀüÃ¼ ¼±ÅÃ
* »ç¿ë¹ý : "ÀüÃ¼", "Ã¼Å©¹Ú½º ÀÌ¸§"
*********************************************************************/
function doCheckAll(all, byname) {
		var obj = document.getElementsByName(byname);
		var val = true;

		if( all.checked == false ) {        // °ªÀÌ Ã¼Å©°¡ ¾ÈµÇ¾îÁ®ÀÖÀ¸¸é
			val = false;                            // ÀüÃ¼¼±ÅÃÀ» ÇØÁ¦ ÇÏ°Ô..
		}

		for (var i =0 ; i < obj.length ; i++ ) {
			obj[i].checked = val;
		}
	}

/*********************************************************************
* ±âº» ¸ÞÀÏ ¼±ÅÃ
* »ç¿ë¹ý : "ÆûÀÌ¸§"
*********************************************************************/
function check_mailSelect(a)
{
	var jform = eval("document."+a);
	if(jform.select_mail[jform.select_mail.selectedIndex].value != '')
	{
		jform.email2.value = jform.select_mail[jform.select_mail.selectedIndex].value;
		jform.email2.readOnly = true;
		jform.email2.style.backgroundColor = 'F8F8F8';
	}
	else
	{
		jform.email2.readOnly = false;
		jform.email2.style.backgroundColor = 'FFFFFF';
		jform.email2.value = '';
		jform.email2.focus();

	}
	
}

/*********************************************************************
* Æû Ã¼Å©
* »ç¿ë¹ý : "ÆûÀÌ¸§"
*********************************************************************/
	function Submit_Check(form){
		if (form == "join")	{
			theForm = document.join;

			
			if (!inputCheck(form, "user_id", "¾ÆÀÌµð", "", "", "", "", "")) {theForm.user_id.focus(); return false; }
			if (!theForm.uid_check.value) {
				alert("¾ÆÀÌµð Áßº¹Ã¼Å©¸¦ Å¬¸¯ÇÏ¿© ÁÖ¼¼¿ä");
				return false;
			}	
			if (theForm.user_id.value != theForm.uid_tmp.value) {
				alert("Áßº¹µÈ ¾ÆÀÌµð°¡ ÀÖ°Å³ª ¾ÆÀÌµð Áßº¹Ã¼Å©¸¦ Å¬¸¯ÇÏ¿© ÁÖ¼¼¿ä.");
				return false;
			}
			if (!inputCheck(form, "p_key", "ºñ¹Ð¹øÈ£", "", "", "", "", "")) {theForm.p_key.focus(); return false; }
			if(!TypeCheck(theForm.p_key.value, ALPHA+NUM)){ alert('ºñ¹Ð¹øÈ£´Â ¿µ¹®,¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.'); theForm.p_key.focus();return false;}
			if (!inputCheck(form, "re_key", "ºñ¹Ð¹øÈ£È®ÀÎ", "", "", "", "", "")) {theForm.re_key.focus(); return false; }  
			if (theForm.p_key.value != theForm.re_key.value){
				alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
				theForm.p_key.value = "";
				theForm.re_key.value = "";
				theForm.p_key.focus();
				return false;
			} 

			if (!inputCheck(form, "name", "ÀÌ¸§", "", "", "", "", "")) {theForm.name.focus(); return false; }

			if(!CheckHangul(theForm.name))
			{
				return false;
			}


			if (!inputCheck("join", "jumin1", "ÁÖ¹Îµî·Ï¹øÈ£", "", "", "", "", "")) { return false; }
			if (!inputCheck("join", "jumin2", "ÁÖ¹Îµî·Ï¹øÈ£", "", "", "", "", "")) { return false; }
			if(!CheckResidentID("join","jumin1","jumin2"))
			{
				return false;
			}

			if (!inputCheck(form, "zip1", "¿ìÆí¹øÈ£", "", "", "", "", "")) {post_chk('join', 'zip1', 'zip2', 'addr', 'addr1'); return false; }  
			if (!inputCheck(form, "zip2", "¿ìÆí¹øÈ£", "", "", "", "", "")) {post_chk('join', 'zip1', 'zip2', 'addr', 'addr1'); return false; } 
			if (!inputCheck(form, "addr", "ÁÖ¼Ò", "", "", "", "", "")) {post_chk('join', 'zip1', 'zip2', 'addr', 'addr1'); return false; }  
			if (!inputCheck(form, "addr1", "»ó¼¼ÁÖ¼Ò", "", "", "", "", "")) {theForm.addr1.focus(); return false; } 


			if (!inputCheck(form, "tel1", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.tel1.focus(); return false; }
			if (!inputCheck(form, "tel2", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.tel2.focus(); return false; }
			if (!inputCheck(form, "tel3", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.tel3.focus(); return false; }

			if (!inputCheck(form, "hp1", "ÈÞ´ëÆù", "Num", "", "", "", "")) {theForm.hp1.focus(); return false; }
			if (!inputCheck(form, "hp2", "ÈÞ´ëÆù", "Num", "", "", "", "")) {theForm.hp2.focus(); return false; }
			if (!inputCheck(form, "hp3", "ÈÞ´ëÆù", "Num", "", "", "", "")) {theForm.hp3.focus(); return false; }		
			
			if (!inputCheck(form, "email1", "¸ÞÀÏ", "", "", "", "", "")) {theForm.email1.focus(); return false; }
			if (!inputCheck(form, "email2", "¸ÞÀÏ", "", "", "", "", "")) {theForm.email2.focus(); return false; }
			if (is_Email(theForm.email1.value+"@"+theForm.email2.value) == false) { alert("ÀÌ¸ÞÀÏÀ» ¿Ã¹Ù·Î ÀÔ·ÂÇÏ½Ê½Ã¿À"); theForm.email1.focus(); return false;}

			return true;
		}else if (form == "login") {
			theForm = document.login;
			if (!inputCheck(form, "userId", "¾ÆÀÌµð", "", "", "", "", "")) {theForm.userId.focus(); return false; }
			if (!inputCheck(form, "userPass", "ºñ¹Ð¹øÈ£", "", "", "", "", "")) {theForm.userPass.focus(); return false; }
			
			/*if(theForm.saveid.checked) {
				saveID(theForm.userId.value);
			} else {
				saveID("");
			}*/
			return true;
		}else if (form == "board") {
			theForm = document.board;
			if (!inputCheck(form, "b_name", "ÀÌ¸§", "", "", "", "", "")) {theForm.b_name.focus(); return false; }
			if (!inputCheck(form, "b_pass", "ºñ¹Ð¹øÈ£", "", "", "", "", "")) {theForm.b_pass.focus(); return false; }
			if(!TypeCheck(theForm.b_pass.value, ALPHA+NUM)){ alert('ºñ¹Ð¹øÈ£´Â ¿µ¹®,¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.'); theForm.b_pass.focus();return false;}
			if(theForm.b_pass.length < 4){ alert('ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó 12ÀÚÀÌÇÏ¸¸ °¡´ÉÇÕ´Ï´Ù..'); theForm.b_pass.focus();return false;}
			if (!inputCheck(form, "b_title", "Á¦¸ñ", "", "", "", "", "")) {theForm.b_title.focus(); return false; }
			//if (!inputCheck(form, "b_comment", "³»¿ë", "", "", "", "", "")) {return false; }
			if(!TrimString(theForm.b_comment.value)){ alert('³»¿ëÀÇ Ç×¸ñÀº ¹Ýµå½Ã ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.');return false;}
			return true;
		}else if (form == "password"){
			theForm=document.password;
			if (!inputCheck(form, "pass", "ºñ¹Ð¹øÈ£", "", "", "", "", "")) {theForm.pass.focus(); return false; }
			if(!TypeCheck(theForm.pass.value, ALPHA+NUM)){ alert('ºñ¹Ð¹øÈ£´Â ¿µ¹®,¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.'); theForm.pass.focus();return false;}
			if(theForm.pass.length < 4){ alert('ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó 12ÀÚÀÌÇÏ¸¸ °¡´ÉÇÕ´Ï´Ù..'); theForm.pass.focus();return false;}
			return true;
		}else if (form == "idseek"){
			theForm=document.idseek;
			if (!inputCheck(form, "name", "ÀÌ¸§", "", "", "", "", "")) {theForm.name.focus(); return false; }
			if (!inputCheck(form, "jumin1", "ÁÖ¹Îµî·Ï¹øÈ£", "", "", "", "", "")) { theForm.jumin1.focus();return false; }
			if (!inputCheck(form, "jumin2", "ÁÖ¹Îµî·Ï¹øÈ£", "", "", "", "", "")) { theForm.jumin2.focus();return false; }
			return true;
		}else if (form == "pwseek"){
			theForm=document.pwseek;
			if (!inputCheck(form, "user_id", "¾ÆÀÌµð", "", "", "", "", "")) {theForm.user_id.focus(); return false; }
			if (!inputCheck(form, "name", "ÀÌ¸§", "", "", "", "", "")) {theForm.name.focus(); return false; }
			if (!inputCheck(form, "jumin1", "ÁÖ¹Îµî·Ï¹øÈ£", "", "", "", "", "")) { theForm.jumin1.focus();return false; }
			if (!inputCheck(form, "jumin2", "ÁÖ¹Îµî·Ï¹øÈ£", "", "", "", "", "")) { theForm.jumin2.focus();return false; }
			return true;
		}else if (form == "category"){
			theForm=document.category;
			if (!inputCheck(form, "sh_name", "Ä«Å×°í¸®¸í", "", "", "", "", "")) {theForm.sh_name.focus(); return false; }
			if (!radioCheck(form, "sh_all", "Àü½Ã¿©ºÎ")) {return false; }
			return true;
		}else if (form == "goods"){
			theForm=document.goods;
			theForm.detail_text.value = SubmitHTML();
			if (!selectCheck(form, 'cat1', '1Â÷Ä«Å×°í¸®')) {theForm.cat1.focus(); return false;}
			if (!inputCheck(form, "it_name", "»óÇ°¸í", "", "", "", "", "")) {theForm.it_name.focus(); return false; }
			return true;
		}else if (form == "online")	{
			theForm=document.online;
			if (!inputCheck(form, "name", "ÀÌ¸§", "", "", "", "", "")) {theForm.name.focus(); return false; } 
			if (!inputCheck(form, "title", "Á¦¸ñ", "", "", "", "", "")) {theForm.title.focus(); return false; } 
			if(!inputCheck("online", "email1", "ÀÌ¸ÞÀÏ", "", "", "", "", "")) {theForm.email1.focus(); return false; }	
			if(!inputCheck("online", "email2", "ÀÌ¸ÞÀÏ", "", "", "", "", "")) {theForm.email2.focus(); return false; }	
			if (is_Email(theForm.email1.value+"@"+theForm.email2.value) == false) { alert("ÀÌ¸ÞÀÏÀ» ¿Ã¹Ù·Î ÀÔ·ÂÇÏ½Ê½Ã¿À"); theForm.email1.focus(); return false; }
			if (!inputCheck(form, "phone1", "¿¬¶ôÃ³", "Num", "", "", "", "")) {theForm.phone1.focus(); return false; }
			if (!inputCheck(form, "phone2", "¿¬¶ôÃ³", "Num", "", "", "", "")) {theForm.phone2.focus(); return false; }
			if (!inputCheck(form, "phone3", "¿¬¶ôÃ³", "Num", "", "", "", "")) {theForm.phone3.focus(); return false; }
			if (!inputCheck(form, "comment", "³»¿ë", "", "", "", "", "")) {theForm.comment.focus(); return false; } 
			return true;
		}else if (form == "order"){
			theForm=document.order;
				 
			if(!inputCheck(form, "name", "ÁÖ¹®ÇÏ½Ã´Â ºÐ", "", "", "", "", "")) {theForm.name.focus(); return false; }
			if(!inputCheck(form, "tel1", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.tel1.focus(); return false; }
			if(!inputCheck(form, "tel2", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.tel2.focus(); return false; }
			if(!inputCheck(form, "tel3", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.tel3.focus(); return false; }
			if(!inputCheck(form, "hp1", "ÈÞ´ëÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.hp1.focus(); return false; }
			if(!inputCheck(form, "hp2", "ÈÞ´ëÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.hp2.focus(); return false; }
			if(!inputCheck(form, "hp3", "ÈÞ´ëÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.hp3.focus(); return false; }
			if(!inputCheck(form, "email", "ÀÌ¸ÞÀÏ", "", "", "", "", "")) {theForm.email.focus(); return false; }	
			if(!inputCheck(form, "email", "ÀÌ¸ÞÀÏ", "", "", "", "", "")) {theForm.hp3.focus(); return false; }
			if (!inputCheck(form, "zip1", "¿ìÆí¹øÈ£", "", "", "", "", "")) {post_chk('order', 'zip1', 'zip2', 'addr', 'addr1'); return false; }  
			if (!inputCheck(form, "zip2", "¿ìÆí¹øÈ£", "", "", "", "", "")) {post_chk('order', 'zip1', 'zip2', 'addr', 'addr1'); return false; } 
			if (!inputCheck(form, "addr", "ÁÖ¼Ò", "", "", "", "", "")) {post_chk('order', 'zip1', 'zip2', 'addr', 'addr1'); return false; }  
			if (!inputCheck(form, "addr1", "»ó¼¼ÁÖ¼Ò", "", "", "", "", "")) {theForm.addr1.focus(); return false; }  

			if(!inputCheck(form, "t_name", "¹ÞÀ¸½Ã´Â ºÐ", "", "", "", "", "")) {theForm.t_name.focus(); return false; }
			if(!inputCheck(form, "t_tel1", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.t_tel1.focus(); return false; }
			if(!inputCheck(form, "t_tel2", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.t_tel2.focus(); return false; }
			if(!inputCheck(form, "t_tel3", "ÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.t_tel3.focus(); return false; }
			if(!inputCheck(form, "t_hp1", "ÈÞ´ëÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.t_hp1.focus(); return false; }
			if(!inputCheck(form, "t_hp2", "ÈÞ´ëÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.t_hp2.focus(); return false; }
			if(!inputCheck(form, "t_hp3", "ÈÞ´ëÀüÈ­¹øÈ£", "Num", "", "", "", "")) {theForm.t_hp3.focus(); return false; }
		  	if (!inputCheck(form, "t_zip1", "¿ìÆí¹øÈ£", "", "", "", "", "")) {post_chk('order', 't_zip1', 't_zip2', 't_addr', 't_addr1'); return false; }  
			if (!inputCheck(form, "t_zip2", "¿ìÆí¹øÈ£", "", "", "", "", "")) {post_chk('order', 't_zip1', 't_zip2', 't_addr', 't_addr1'); return false; } 
			if (!inputCheck(form, "t_addr", "ÁÖ¼Ò", "", "", "", "", "")) {post_chk('order', 't_zip1', 't_zip2', 't_addr', 't_addr1'); return false; }  
			if (!inputCheck(form, "t_addr1", "»ó¼¼ÁÖ¼Ò", "", "", "", "", "")) {theForm.t_addr1.focus(); return false; }  

			
			
			if(parseInt(theForm.point_ac.value) >  parseInt(theForm.user_point.value)) {
					alert("Àû¸³±ÝÀ» »ç¿ë°¡´É¾× º¸´Ù ¸¹ÀÌ ÀÔ·ÂÇÏ¿´½À´Ï´Ù.");
					return false;
			}

			if(theForm.card_pg.value=="INICIS") {
				if(theForm.paySelect.length>1) {
					if(theForm.paySelect[1].checked){
						return true;
			
					}else if(theForm.paySelect[0].checked) {
						if (!selectCheck(form, 'receive_online', 'ÀÔ±ÝÇÒ ÀºÇà')) {theForm.receive_online.focus(); return false;}	
						if (!inputCheck(form, "receive_name", "ÀÔ±ÝÀÚ¸í", "", "", "", "", "")) {theForm.receive_name.focus(); return false; }  

						theForm.action ="order_ok.php";
						theForm.submit();
					}
				} else {
					 if(theForm.paySelect.checked) {
						if (!selectCheck(form, 'receive_online', 'ÀÔ±ÝÇÒ ÀºÇà')) {theForm.receive_online.focus(); return false;}	
						if (!inputCheck(form, "receive_name", "ÀÔ±ÝÀÚ¸í", "", "", "", "", "")) {theForm.receive_name.focus(); return false; }  

						theForm.action ="order_ok.php";
						theForm.submit();

					}
				}
			} else { 
				if(theForm.paySelect.length>1) {
					if(theForm.paySelect[1].checked){
						 var url = "/card/kcp/connect.php";
						 var widths = 560;
						 var heights = 500;
						 theForm.action = url;
						 theForm.target = "kcppayment";				 

					}else if(theForm.paySelect[0].checked) {
						if (!selectCheck(form, 'receive_online', 'ÀÔ±ÝÇÒ ÀºÇà')) {theForm.receive_online.focus(); return false;}	
						if (!inputCheck(form, "receive_name", "ÀÔ±ÝÀÚ¸í", "", "", "", "", "")) {theForm.receive_name.focus(); return false; }  

						theForm.action ="order_ok.php";
					}
				} else {
					 if(theForm.paySelect.checked) {
						if (!selectCheck(form, 'receive_online', 'ÀÔ±ÝÇÒ ÀºÇà')) {theForm.receive_online.focus(); return false;}	
						if (!inputCheck(form, "receive_name", "ÀÔ±ÝÀÚ¸í", "", "", "", "", "")) {theForm.receive_name.focus(); return false; }  

						theForm.action ="order_ok.php";
					}
				}
			}
/*		}else if (form == "board_cfg"){
			  theForm=document.board_cfg;
			  if(!inputCheck(form, "bd_id", "°Ô½ÃÆÇ ÄÚµå", "", "", "", "", "")) {theForm.bd_id.focus(); return false; }
			  if(!TypeCheck(theForm.bd_id.value, ALPHA+NUM)){ alert("°Ô½ÃÆÇÄÚµå´Â ¿µ¹®,¼ýÀÚ Á¶ÇÕÀ¸·Î ÀÔ·ÂÇÏ¼¼¿ä"); theForm.bd_id.focus();return false;}
			  if(!inputCheck(form, "bd_name", "°Ô½ÃÆÇ ÄÚµå", "", "", "", "", "")) {theForm.bd_name.focus(); return false; }
			  if(!inputCheck(form, "bd_per", "ÆäÀÌÁö´ç Ãâ·ÂÇà¼ö", "", "", "", "", "")) {theForm.bd_per.focus(); return false; }
			  if(!TypeCheck(theForm.bd_per.value, NUM) || theForm.bd_per.value < 1){ alert("Ãâ·ÂÇà¼ö´Â 1ÀÌ»óÀÇ ¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù."); theForm.bd_per.focus();return false;}
			  if(!inputCheck(form, "bd_length", "ÆäÀÌÁö´ç Ãâ·ÂÇà¼ö", "", "", "", "", "")) {theForm.bd_length.focus(); return false; }
			  if(!TypeCheck(theForm.bd_length.value, NUM) || theForm.bd_length.value < 1){ alert("¸®½ºÆ® Á¦¸ñ±æÀÌ´Â 1ÀÌ»óÀÇ ¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù."); theForm.bd_length.focus();return false;}
			  if(!inputCheck(form, "upsize", "¾÷·Îµå °¡´É¿ë·®", "Num", "", "", "", "")) {theForm.upsize.focus(); return false; }
			  if(theForm.upsize.value > <?=$upload_size;?>){ alert("¾÷·Îµå ¿ë·®Àº ÃÖ°íÇÑµµÀÎ <?=$upload_size;?> byte¸¦ ³ÑÀ»¼ö ¾ø½À´Ï´Ù."); theForm.upsize.focus();return false;}

			  return true;*/
		}
	}

/*********************************************************************
* ÁÖ¹®¹öÆ°
* »ç¿ë¹ý : "ÆûÀÌ¸§"
*********************************************************************/
	function order(form){
		theForm = eval("document."+form);

		if (!inputCheck(form, "buynum", "¼ö·®", "", "", "", "", "")) {theForm.buynum.focus(); return false; }

		if (theForm("opt1")){
			if (!selectCheck(form, 'opt1', '¿É¼Ç')) {theForm.opt1.focus(); return false;}			
		}
		if (theForm("opt2")){
			if (!selectCheck(form, 'opt2', '¿É¼Ç')) {theForm.opt2.focus(); return false;}
		}
		if (theForm("opt3")){			
			if (!selectCheck(form, 'opt3', '¿É¼Ç')) {theForm.opt3.focus(); return false;}
		}
		if (theForm("opt4")){			
			if (!selectCheck(form, 'opt4', '¿É¼Ç')) {theForm.opt4.focus(); return false;}
		}
		if (theForm("opt5")){			
			if (!selectCheck(form, 'opt5', '¿É¼Ç')) {theForm.opt5.focus(); return false;}
		}


		if (theForm("opt1")){
			theForm.opt1_price.value = theForm.opt1.options[theForm.opt1.selectedIndex].value;
			theForm.opt1.options[theForm.opt1.selectedIndex].value = theForm.opt1.options[theForm.opt1.selectedIndex].text;			
		}
		if (theForm("opt2")){
			theForm.opt2_price.value = theForm.opt2.options[theForm.opt2.selectedIndex].value;
			theForm.opt2.options[theForm.opt2.selectedIndex].value = theForm.opt2.options[theForm.opt2.selectedIndex].text;
		}
		if (theForm("opt3")){			
			theForm.opt3_price.value = theForm.opt3.options[theForm.opt3.selectedIndex].value;
			theForm.opt3.options[theForm.opt3.selectedIndex].value = theForm.opt3.options[theForm.opt3.selectedIndex].text;
		}
		if (theForm("opt4")){			
			theForm.opt4_price.value = theForm.opt4.options[theForm.opt4.selectedIndex].value;
			theForm.opt4.options[theForm.opt4.selectedIndex].value = theForm.opt4.options[theForm.opt4.selectedIndex].text;
		}
		if (theForm("opt5")){			
			theForm.opt5_price.value = theForm.opt5.options[theForm.opt5.selectedIndex].value;
			theForm.opt5.options[theForm.opt5.selectedIndex].value = theForm.opt5.options[theForm.opt5.selectedIndex].text;
		}

	    theForm.action = "/pro/shop/save_ok.php";
		theForm.submit();
	}

/*********************************************************************
* Àå¹Ù±¸´Ï¹öÆ°
* »ç¿ë¹ý : "ÆûÀÌ¸§"
*********************************************************************/
	function cart(form){
		theForm = eval("document."+form);
		if (!inputCheck(form, "buynum", "¼ö·®", "", "", "", "", "")) {theForm.buynum.focus(); return false; }

		if (theForm("opt1")){
			if (!selectCheck(form, 'opt1', '¿É¼Ç')) {theForm.opt1.focus(); return false;}			
		}
		if (theForm("opt2")){
			if (!selectCheck(form, 'opt2', '¿É¼Ç')) {theForm.opt2.focus(); return false;}
		}
		if (theForm("opt3")){			
			if (!selectCheck(form, 'opt3', '¿É¼Ç')) {theForm.opt3.focus(); return false;}
		}
		if (theForm("opt4")){			
			if (!selectCheck(form, 'opt4', '¿É¼Ç')) {theForm.opt4.focus(); return false;}
		}
		if (theForm("opt5")){			
			if (!selectCheck(form, 'opt5', '¿É¼Ç')) {theForm.opt5.focus(); return false;}
		}


		if (theForm("opt1")){
			theForm.opt1_price.value = theForm.opt1.options[theForm.opt1.selectedIndex].value;
			theForm.opt1.options[theForm.opt1.selectedIndex].value = theForm.opt1.options[theForm.opt1.selectedIndex].text;			
		}
		if (theForm("opt2")){
			theForm.opt2_price.value = theForm.opt2.options[theForm.opt2.selectedIndex].value;
			theForm.opt2.options[theForm.opt2.selectedIndex].value = theForm.opt2.options[theForm.opt2.selectedIndex].text;
		}
		if (theForm("opt3")){			
			theForm.opt3_price.value = theForm.opt3.options[theForm.opt3.selectedIndex].value;
			theForm.opt3.options[theForm.opt3.selectedIndex].value = theForm.opt3.options[theForm.opt3.selectedIndex].text;
		}
		if (theForm("opt4")){			
			theForm.opt4_price.value = theForm.opt4.options[theForm.opt4.selectedIndex].value;
			theForm.opt4.options[theForm.opt4.selectedIndex].value = theForm.opt4.options[theForm.opt4.selectedIndex].text;
		}
		if (theForm("opt5")){			
			theForm.opt5_price.value = theForm.opt5.options[theForm.opt5.selectedIndex].value;
			theForm.opt5.options[theForm.opt5.selectedIndex].value = theForm.opt5.options[theForm.opt5.selectedIndex].text;
		}

		theForm.action = "/pro/shop/cart_ok.php";
		theForm.submit();
	}

/*********************************************************************
* Àå¹Ù±¸´Ï ¼ö·® º¯°æ
* »ç¿ë¹ý : "¾×¼Ç", "ÆûÀÌ¸§"
*********************************************************************/
	 function count_change(act,form)
	 {
	   theForm = eval("document."+form);
	   var count=parseInt(theForm.buynum.value);
	   if(act=="up"){
		  count++;
	   }else if(act=="down"){
		  if(count> 1) count--;
	   }
	   theForm.buynum.value=count;
	  theForm.submit();
	 }

/*********************************************************************
* ÁÖ¹®Á¤º¸ º¹»ç
* »ç¿ë¹ý : "ÆûÀÌ¸§"
*********************************************************************/
	function samedata() {

		var theForm=document.order;
        if(theForm.samecheck.checked == true) {
            theForm.t_name.value = theForm.name.value;
            theForm.t_tel1.value  = theForm.tel1.value;
			theForm.t_tel2.value  = theForm.tel2.value;
			theForm.t_tel3.value  = theForm.tel3.value;
			theForm.t_hp1.value  = theForm.hp1.value;
			theForm.t_hp2.value  = theForm.hp2.value;
			theForm.t_hp3.value  = theForm.hp3.value;
			theForm.t_zip1.value = theForm.zip1.value;
            theForm.t_zip2.value = theForm.zip2.value;
            theForm.t_addr.value = theForm.addr.value;
			theForm.t_addr1.value = theForm.addr1.value;
        } else {
            theForm.t_name.value = '';
            theForm.t_tel1.value  = '';
			theForm.t_tel2.value  = '';
			theForm.t_tel3.value  = '';
			theForm.t_hp1.value   = '';	
			theForm.t_hp2.value   = '';
			theForm.t_hp3.value   = '';
            theForm.t_zip1.value = '';
            theForm.t_zip2.value = '';
            theForm.t_addr.value ='';
			theForm.t_addr1.value ='' ;
        }		
    }
/*********************************************************************
* »èÁ¦ ¾È³»
* »ç¿ë¹ý : "ÆûÀÌ¸§"
*********************************************************************/
function Really(){
	if(confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n»èÁ¦ÇÏ½Ã¸é º¹±¸°¡ ºÒ°¡´ÉÇÕ´Ï´Ù.')) return true;
	return false;
}

/*********************************************************************
* »èÁ¦ ¾È³»
* »ç¿ë¹ý : "ÄÄ¸¶"
*********************************************************************/
function comma(n) { 
    var reg = /(^[+-]?\d+)(\d{3})/; 
    n += ''; 
    while (reg.test(n)) n = n.replace(reg, '$1' + ',' + '$2'); 
    return n; 
} 

/*********************************************************************
* ÆË¾÷Ã¢
*********************************************************************/
function seekWin(URL) {
		window.open(URL,'openSeek','resizable=no,scrollbars=no,status=0,width=450,height=300');
}
function getCookie( name ) {
		   var nameOfCookie = name + "="; 
		   var x = 0; 
		   while ( x <= document.cookie.length ) 
		   { 
				   var y = (x+nameOfCookie.length); 
				   if ( document.cookie.substring( x, y ) == nameOfCookie ) { 
						   if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 
								   endOfCookie = document.cookie.length; 
						   return unescape( document.cookie.substring( y, endOfCookie ) ); 
				   } 
				   x = document.cookie.indexOf( " ", x ) + 1; 
				   if ( x == 0 ) 
						   break; 
		   } 
		   return ""; 
}

/*********************************************************************
* Ã·ºÎÆÄÀÏ(ÀÌ¹ÌÁö) È®ÀÎ
*********************************************************************/
 function extCheck(filename) { 
     if(filename.match(/\.(jpg|gif|bmp|jpeg)$/i)) return true; 
     else return false; 
	 }

	function checkFile(obj) { 
	 if(!obj.value) return;
  
	 var ext=extCheck(obj.value); 
	 if(!ext) { 
		 alert('jpg, gif, bmp, jpeg ÆÄÀÏ¸¸  ¾÷·Îµå ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.'); 
		 document.getElementById(obj.name).select(); 
		 document.selection.clear(); 
		 return; 
	 } 
	 return; 
	}


/*********************************************************************
* ¾à°üµ¿ÀÇ È®ÀÎ
*********************************************************************/
function agree_chk(){
	if(document.reg.sel1[0].checked==false) { alert("È¸¿ø°¡ÀÔ ¾à°ü¿¡ µ¿ÀÇÇÏ¼Å¾ß¸¸ °¡ÀÔÀÌ °¡´ÉÇÕ´Ï´Ù."); return false;}
	if(document.reg.sel2[0].checked==false) { alert("°³ÀÎÁ¤º¸ ¼öÁý¿¡ µ¿ÀÇÇÏ¼Å¾ß¸¸ °¡ÀÔÀÌ °¡´ÉÇÕ´Ï´Ù."); return false;}
	return true;
}


/*********************************************************************
* ÁÖ¹Î¹øÈ£ À¯È¿¼º °Ë»ç
* »ç¿ë¹ý : "ÆûÀÌ¸§,ÁÖ¹Î¹øÈ£ ÇÊµå 1, ÁÖ¹Î¹øÈ£ ÇÊµå 2"
*********************************************************************/

function CheckResidentID(a,b,c)
	{
		var resident1 = eval("document."+ a +"."+ b +".value");
		var resident2 = eval("document."+ a +"."+ c +".value");

		var residentNum=resident1+resident2;

		a = new Array(13);

		for (var i=0; i < 13; i++) {

			a[i] = parseInt(residentNum.charAt(i));

		}

		var 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;
		var j = j % 11;
		var k = 11 - j;

		if (k > 9) {
			k = k % 10
		}

		if (k != a[12])
		{
			alert ("ÁÖ¹Îµî·Ï¹øÈ£ Çü½ÄÀÌ Æ²¸³´Ï´Ù.");
			return false;
		}
		return true;
	}



/******************************************************************************
*	POP_RESIZE
*******************************************************************************/

function resizeWin(maxX,maxY,speed,delay,win){
	this.obj = "resizeWin" + (resizeWin.count++);
	eval(this.obj + "=this");
	if (!win)     this.win = self;    else this.win = eval(win);
	if (!maxX)    this.maxX = 400;    else this.maxX = maxX;
	if (!maxY)    this.maxY = 300;    else this.maxY = maxY;
	if (!speed)   this.speed = 1/4;   else this.speed = 1/speed;
	if (!delay)   this.delay = 0;    else this.delay = delay;
	this.doResize = (document.all || document.getElementById);
	this.stayCentered = false;
	
	this.initWin = 	function(){
		if (this.doResize){
			this.resizeMe();
			}
		else {
			this.win.resizeTo(this.maxX + 10, this.maxY - 20);
			}
		}

	this.resizeMe = function(){
		this.win.focus();
		this.updateMe();
		}
	
	this.resizeTo = function(x,y){
		this.maxX = x;
		this.maxY = y;
		this.resizeMe();
		}
		
	this.stayCentered = function(){
		this.stayCentered = true;
		}

	this.updateMe = function(){
		this.resizing = true;
		var x = Math.ceil((this.maxX - this.getX()) * this.speed);
		var y = Math.ceil((this.maxY - this.getY()) * this.speed);
		if (x == 0 && this.getX() != this.maxX) {
			if (this.getX() > this.maxX) x = -1;
			else  x = 1;
			}
		if (y == 0 && this.getY() != this.maxY){
			if (this.getY() > this.maxY) y = -1;
			else y = 1;
			}
		if (x == 0 && y == 0) {
			this.resizing = false;
    		}
		else {
			this.win.top.resizeBy(parseInt(x),parseInt(y));
			if (this.stayCentered == true) this.win.moveTo((screen.width - this.getX()) / 2,(screen.height - this.getY()) / 2);
			setTimeout(this.obj + '.updateMe()',this.delay)
			}
		}
		
	this.write =  function(text){
		if (document.all && this.win.document.all["coords"]) this.win.document.all["coords"].innerHTML = text;
		else if (document.getElementById && this.win.document.getElementById("coords")) this.win.document.getElementById("coords").innerHTML = text;
		}
		
	this.getX =  function(){
		if (document.all) return (this.win.top.document.body.clientWidth + 10)
		else if (document.getElementById)
			return this.win.top.outerWidth;
		else return this.win.top.outerWidth - 12;
	}
	
	this.getY = function(){
		if (document.all) return (this.win.top.document.body.clientHeight + 29)
		else if (document.getElementById)
			return this.win.top.outerHeight;
		else return this.win.top.outerHeight - 31; 
	}
	
	this.onResize =  function(){
		if (this.doResize){
			if (!this.resizing) this.resizeMe();
			}
		}

	return this;
}
resizeWin.count = 0;



function index_onoff(a){
if(a == "1"){
		MM_swapImage('Image35','','/skin/images/box_t031_on.gif',1)
		MM_swapImage('Image36','','/skin/images/box_t032_off.gif',1)
		tab01Div.style.display='block';
		tab02Div.style.display='none';
		
	} else if(a == "2"){
		MM_swapImage('Image35','','/skin/images/box_t031_off.gif',1)
		MM_swapImage('Image36','','/skin/images/box_t032_on.gif',1)
		tab01Div.style.display='none';
		tab02Div.style.display='block';
	} 
}



/*********************************************************************
* Ã¼Å© ¹Ú½º Ã¼Å© µ¥ÀÌÅÍ °¡Á®¿À±â
* »ç¿ë¹ý : "Ã¼Å©¹Ú½º ÀÌ¸§"
*********************************************************************/
function get_string(byname)
{
	var obj = document.getElementsByName(byname);
	chkCount = 0;
	getstr = "";
	for (var i =0 ; i < obj.length ; i++ ) {
		if (obj[i].checked)
		{
			chkCount++;
			if (chkCount==1)
				getstr = "?" + byname + "=" + obj[i].value;
			else if(chkCount>1)
				getstr += "," + obj[i].value;
		}
	}
	return getstr;
}


// ·Î±×ÀÎ Á¤º¸ ÀúÀå  Æß ½ºÆÄÀÌ´õ // ¼¼ºÎÁÖ¼® »èÁ¦..
function confirmSave(checkbox) {
var isRemember;

if(checkbox.checked) {
	isRemember = confirm("ÀÌ PC¿¡ ·Î±×ÀÎ Á¤º¸¸¦ ÀúÀåÇÏ½Ã°Ú½À´Ï±î? \n\n°ø°øÀå¼Ò¿¡¼­´Â °³ÀÎÁ¤º¸°¡ À¯ÃâµÉ ¼ö ÀÖÀ¸´Ï ÁÖÀÇÇØÁÖ½Ê½Ã¿À.");
   
	if(!isRemember)
		checkbox.checked = false;
	}
}

// ÄíÅ°°ª °¡Á®¿À±â
function getCookie(key) {
	var cook = document.cookie + ";";
	var idx =  cook.indexOf(key, 0);
	var val = "";
 
	if(idx != -1) {
		cook = cook.substring(idx, cook.length);
		begin = cook.indexOf("=", 0) + 1;
		end = cook.indexOf(";", begin);
		val = unescape( cook.substring(begin, end) );
	}
 
	return val;
}

// ÄíÅ°°ª ¼³Á¤
function setCookie(name, value, expiredays) {
	var today = new Date();
	today.setDate( today.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"
}

// ÄíÅ°¿¡¼­ ·Î±×ÀÎ Á¤º¸ °¡Á®¿À±â
function getLogin() {
	theForm = document.login;
	var id = getCookie("userid");
 
 // °¡Á®¿Â ÄíÅ°°ªÀÌ ÀÖÀ¸¸é
	if(id != "") {
		theForm.userId.value = id;
		theForm.saveid.checked = true;
	}
	
}


// ÄíÅ°¿¡ ·Î±×ÀÎ Á¤º¸ ÀúÀå
function saveID(id) {
	if(id != "") {
		setCookie("userid", id, 365);
	} else {
		setCookie("userid", id, -1);
	}
}


/**********************************************************************************
* ºä ½º¿Ò
* »ç¿ë¹ý : 
**********************************************************************************/
function view_onoff(a){
if(a == "1"){
		MM_swapImage('tab01','','/skin/images/ttl_detail_01_c.gif',1);
		MM_swapImage('tab02','','/skin/images/ttl_detail_04.gif',1);
		MM_swapImage('tab03','','/skin/images/ttl_detail_03.gif',1);
		MM_swapImage('tab04','','/skin/images/ttl_detail_02.gif',1);
		tab01Div.style.display='block';
		tab02Div.style.display='none';
		tab03Div.style.display='none';
		tab04Div.style.display='none';
		
	} else if(a == "2"){
		MM_swapImage('tab01','','/skin/images/ttl_detail_01.gif',1);
		MM_swapImage('tab02','','/skin/images/ttl_detail_04_c.gif',1);
		MM_swapImage('tab03','','/skin/images/ttl_detail_03.gif',1);
		MM_swapImage('tab04','','/skin/images/ttl_detail_02.gif',1);
		tab01Div.style.display='none';
		tab02Div.style.display='block';
		tab03Div.style.display='none';
		tab04Div.style.display='none';		
		ifrmResize2(document.getElementById("shopFrame")); /* reload */
	} else if(a == "3"){
		MM_swapImage('tab01','','/skin/images/ttl_detail_01.gif',1);
		MM_swapImage('tab02','','/skin/images/ttl_detail_04.gif',1);
		MM_swapImage('tab03','','/skin/images/ttl_detail_03_c.gif',1);
		MM_swapImage('tab04','','/skin/images/ttl_detail_02.gif',1);
		tab01Div.style.display='none';
		tab02Div.style.display='none';
		tab03Div.style.display='block';
		tab04Div.style.display='none';
	}	
	else if(a == "4"){
		MM_swapImage('tab01','','/skin/images/ttl_detail_01.gif',1);
		MM_swapImage('tab02','','/skin/images/ttl_detail_04.gif',1);
		MM_swapImage('tab03','','/skin/images/ttl_detail_03.gif',1);
		MM_swapImage('tab04','','/skin/images/ttl_detail_02_c.gif',1);
		tab01Div.style.display='none';
		tab02Div.style.display='none';
		tab03Div.style.display='none';
		tab04Div.style.display='block';

	}	
}

function ifrmResize2(obj) {
    var Body;
    var H, Min;
    Min = 150;
    Body = (obj.contentWindow.document.getElementsByTagName('BODY'))[0];
    H = parseInt(Body.scrollHeight);
    obj.style.height = (H<Min?Min:H) + 'px';
}

	function calculate(opt,  point, point_type, point_all){		
		theForm = document.goods;
		theOpt =  eval("document.goods."+opt);
		buynum = theForm.buynum.value;
		price = parseInt(theForm.price.value);


		if(theOpt){
			if(theOpt.value) { 
				option=  parseInt(theOpt.value);
			} else {
				option = 0;
			}
		
		} else {
			option = 0;
		}

		if(theForm.opt1){
			if(theForm.opt1.value) { 
				option1 =  parseInt(theForm.opt1.value);
			} else {
				option1 = 0;
			}
		} else {
			option1 = 0;
		}
		if(theForm.opt2){
			if(theForm.opt2.value) { 
				option2 =  parseInt(theForm.opt2.value);
			} else {
				option2 = 0;
			}
		} else {
			option2 = 0;
		}
		if(theForm.opt3){
			if(theForm.opt3.value) { 
				option3 =  parseInt(theForm.opt3.value);
			} else {
				option3 = 0;
			}
		} else {
			option3 = 0;
		}
		if(theForm.opt4){
			if(theForm.opt4.value) { 
				option4 =  parseInt(theForm.opt4.value);
			} else {
				option4 = 0;
			}
		} else {
			option4 = 0;
		}
		if(theForm.opt5){
			if(theForm.opt5.value) { 
				option5 =  parseInt(theForm.opt5.value);
			} else {
				option5 = 0;
			}
		} else {
			option5 = 0;
		}


		if(opt=="opt1"){
			price2 = ( price + option + option2 + option3 + option4 + option5 ) * buynum;
		}else if(opt=="opt2"){
			price2 =  ( price + option + option1 + option3 + option4 + option5) * buynum;
		}else if(opt=="opt3"){
			price2 =  ( price + option + option1 + option2+ option4 + option5) * buynum;
		}else if(opt=="opt4"){
			price2 =  ( price + option + option1 + option2+ option3 + option5) * buynum;
		}else if(opt=="opt5"){
			price2 =  ( price + option + option1 + option2+ option3 + option4) * buynum;
		}else {
			price2 =  ( price * buynum );
		}

		price3 = price2 / buynum;
		
		if(point_type=="1") {
			total_point = point;
		}else if(point_type=="2") {
			total_point = price3 * point * 0.01;
		}else if(point_type=="3") {
			total_point =  price * point * 0.01 ;
		}else if(point_type=="4") {
			total_point = price3 * point_all * 0.01;
		}else if(point_type=="5") {
			total_point = price * point_all * 0.01 ;
		}
		

		if(price==0) { 
			document.getElementById('view_price').innerHTML =  "°¡°Ý¹ÌÁ¤";
		} else { 
			document.getElementById('view_price').innerHTML =  comma(price2)+"¿ø";
		}
		
		document.getElementById('view_point').innerHTML =  comma(total_point  * buynum)+" P";
		theForm.point.value= total_point;
	}


	function calculate2(point, point_type, point_all){			
		theForm = document.goods;
		buynum = theForm.buynum.value;
		price = parseInt(theForm.price.value);
		total_point = 0;

		if(theForm.opt1){
			if(theForm.opt1.value) { 
				option1 =  parseInt(theForm.opt1.value);
			} else {
				option1 = 0;
			}
		} else {
			option1 = 0;
		}
		if(theForm.opt2){
			if(theForm.opt2.value) { 
				option2 =  parseInt(theForm.opt2.value);
			} else {
				option2 = 0;
			}
		} else {
			option2 = 0;
		}
		if(theForm.opt3){
			if(theForm.opt3.value) { 
				option3 =  parseInt(theForm.opt3.value);
			} else {
				option3 = 0;
			}
		} else {
			option3 = 0;
		}
		if(theForm.opt4){
			if(theForm.opt4.value) { 
				option4 =  parseInt(theForm.opt4.value);
			} else {
				option4 = 0;
			}
		} else {
			option4 = 0;
		}
		if(theForm.opt5){
			if(theForm.opt5.value) { 
				option5 =  parseInt(theForm.opt5.value);
			} else {
				option5 = 0;
			}
		} else {
			option5 = 0;
		}
		
		price2 =  ( price + option1 + option2+ option3 + option4 + option5) * buynum;
		if(point_type=="1") {
			total_point = point;
		}else if(point_type=="2") {
			total_point = ( price + option1 + option2+ option3 + option4 + option5)* point * 0.01;
		}else if(point_type=="3") {
			total_point =  price * point * 0.01 ;
		}else if(point_type=="4") {
			total_point = ( price + option1 + option2+ option3 + option4 + option5)* point_all * 0.01;
		}else if(point_type=="5") {
			total_point = price * point_all * 0.01 ;
		}
		

		if(price==0) { 
			document.getElementById('view_price').innerHTML =  "°¡°Ý¹ÌÁ¤";
		} else { 
			document.getElementById('view_price').innerHTML =  comma(price2)+"¿ø";
		}

		document.getElementById('view_point').innerHTML =  comma(total_point  * buynum)+" P";
		theForm.point.value= total_point;
	}
