ajax = false;
ajax1 = false;
ajax2 = false;
ajax3 = false;
ajax4 = false;
ajax5 = false;
ajax6 = false;
// IEÀÌ¿Ü

document.writeln('<div id="oDiv" style="filter: Alpha(Opacity=100);background:white; margin:0;  width:860; height:350; display:none; position:absolute; z-index:1">');
//document.writeln('<div>');




document.writeln('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
document.writeln('<tr height="29">');
document.writeln('<Td width="24"><img src="/html_include_img/p_l_1.gif"></td>');
document.writeln('<Td background="/html_include_img/p_l_2.gif" class="handle" handlefor="oDiv" style="cursor: hand;"><font color="white"><b><span id="p_subject1"></span></b> <span id="p_subject2"></sapn></td>');
document.writeln('<Td width="28" onclick="javascript:ajax_in1_close();" style="cursor:hand;"><img src="/html_include_img/p_l_3.gif"></td>');
document.writeln('</tr>');
document.writeln('</table>');


document.writeln('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
document.writeln('<tr height="50">');
document.writeln('<Td width="3" background="/html_include_img/p_l_4.gif"></td>');
document.writeln('<Td valign="top"><span id="layer_temp"></span></td>');
document.writeln('<Td width="3" background="/html_include_img/p_l_5.gif"></td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<Td width="3"><img src="/html_include_img/p_l_6.gif"></td>');
document.writeln('<Td background="/html_include_img/p_l_7.gif"></td>');
document.writeln('<Td width="3"><img src="/html_include_img/p_l_8.gif"></td>');
document.writeln('</tr>');
document.writeln('</table>');



//document.writeln('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#0066AD"  class="handle" handlefor="oDiv" style="cursor: hand;">');
//document.writeln('<tr height="26">');
//document.writeln('<Td bgcolor="#409726" style="padding-left:10px;"><font color="white"><b><span id="p_subject1"></span></b> <span id="p_subject2"></sapn></td>');
//document.writeln('<Td bgcolor="#409726" width="80" align="center" onclick="javascript:ajax_in1_close();" style="cursor:hand;"><img src="/icon_img/close_button.gif"></td>');
//document.writeln('</tr>');
//document.writeln('</table>');


//document.writeln('</div>');
//document.writeln('<span id="layer_temp"></span>');
document.writeln('</div>');	

function ajax_in(serverURL,obj) {
// IEÀÌ¿Ü
if(window.XMLHttpRequest) {
¡¡¡¡¡¡ajax = new XMLHttpRequest();
// IE¿ë
} else if(window.ActiveXObject) {
¡¡¡¡¡¡try {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Msxml2.XMLHTTP");
¡¡¡¡¡¡} catch(e) {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Microsoft.XMLHTTP");
¡¡¡¡¡¡}
}

¡¡¡¡¡¡ajax.open("GET", serverURL, false);
¡¡¡¡¡¡ajax.onreadystatechange = function() {
¡¡¡¡¡¡¡¡¡¡¡¡if (ajax.readyState == 4 && ajax.status == 200) {
               document.getElementById(obj).innerHTML = ajax.responseText;
¡¡¡¡¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡}
¡¡¡¡¡¡ajax.send(null);
}


function ajax_ea_search(serverURL,prmet) {
var search_ea
// IEÀÌ¿Ü
if(window.XMLHttpRequest) {
¡¡¡¡¡¡ajax = new XMLHttpRequest();
// IE¿ë
} else if(window.ActiveXObject) {
¡¡¡¡¡¡try {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Msxml2.XMLHTTP");
¡¡¡¡¡¡} catch(e) {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Microsoft.XMLHTTP");
¡¡¡¡¡¡}
}


      serverURL = serverURL + prmet 
	  serverURL1 = "/admin/product/production/production_search_list.asp" + prmet 
      serverURL2 = "/admin/product/production/production_search_pop.asp" + prmet 

	//	  alert(serverURL1);
¡¡¡¡¡¡ajax.open("GET", serverURL, false);
¡¡¡¡¡¡ajax.onreadystatechange = function() {
¡¡¡¡¡¡¡¡¡¡¡¡if (ajax.readyState == 4 && ajax.status == 200) {
               search_ea = ajax.responseText;

          //     alert(search_ea);


                 
			   if (search_ea == 1)
			   {

				 ajax_in(serverURL1,'production_search_list')
                 document.myform.s_in_ea.focus();
				 }
			     else if (search_ea > 1)
			 {
	             //document.getElementById(obj).innerHTML =search_ea
				
                 ajax_in1(serverURL2,700,300)
					 
		   	   }
                    else if (search_ea == 0)
				{
					alert('°Ë»öµÈ »óÇ°ÀÌ ¾ø½À´Ï´Ù.');
				}

			   
¡¡¡¡¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡}
¡¡¡¡¡¡ajax.send(null);
}




	
function ajax_in1(serverURL,_subject1,_subject2,width_size,height_size) {
// IEÀÌ¿Ü
var sctop = document.body.scrollTop + 100

if(window.XMLHttpRequest) {
¡¡¡¡¡¡ajax = new XMLHttpRequest();
// IE¿ë
} else if(window.ActiveXObject) {
¡¡¡¡¡¡try {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Msxml2.XMLHTTP");
¡¡¡¡¡¡} catch(e) {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Microsoft.XMLHTTP");
¡¡¡¡¡¡}
}

¡¡¡¡¡¡ajax.open("GET", serverURL, false);
¡¡¡¡¡¡ajax.onreadystatechange = function() {
¡¡¡¡¡¡¡¡¡¡¡¡if (ajax.readyState == 4 && ajax.status == 200) {
               layer_temp.innerHTML = ajax.responseText;
               p_subject1.innerHTML = "<b>" + _subject1 + "</b>";
               p_subject2.innerHTML = _subject2;
			 
¡¡¡¡¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡}
¡¡¡¡¡¡ajax.send(null);

   oDiv.style.setExpression("left", "document.body.clientWidth/2 - oDiv.offsetWidth/2"); // ·¹ÀÌ¾îÀÇ x Ãà À§Ä¡¸¦ ¼³Á¤ ÇÕ´Ï´Ù
   //oDiv.style.setExpression("top", "document.body.clientHeight/2 - oDiv.offsetHeight/2"); // ·¹ÀÌ¾îÀÇ yÃà À§Ä¡¸¦ ¼³Á¤ ÇÕ´Ï´Ù
   oDiv.style.setExpression("top",sctop);


//  if (width_size =="")
 // {
   oDiv.style.width = width_size ; 
   oDiv.style.height = height_size ;
 // }

   oDiv.style.display = '';


 //  toTopBottom();
}

function ajax_in1_close()
{
    oDiv.style.display = "none";
}

var checkZIndex = true; 
var dragobject = null; 
var tx; 
var ty; 

var ie5 = document.all != null && document.getElementsByTagName != null; 

function getReal(el) { 
    temp = el; 

    while ((temp != null) && (temp.tagName != "BODY")) { 
        if ((temp.className == "moveme") || (temp.className == "handle")){ 
            el = temp; 
            return el; 
        } 
        temp = temp.parentElement; 
    } 
    return el; 
} 


function moveme_onmousedown() { 
    el = getReal(window.event.srcElement) 

    if (el.className == "moveme" || el.className == "handle") { 
        if (el.className == "handle") { 
            tmp = el.getAttribute("handlefor"); 
            if (tmp == null) { 
                dragobject = null; 
                return; 
            } 
            else 
                dragobject = document.all[tmp]; 
        } 
        else 
            dragobject = el; 

        if (checkZIndex) makeOnTop(dragobject); 

        ty = window.event.clientY - getTopPos(dragobject); 
        tx = window.event.clientX - getLeftPos(dragobject); 

        window.event.returnValue = false; 
        window.event.cancelBubble = true; 
    //    dragobject.filters.alpha.opacity=77; 
    } 
    else { 
        dragobject = null; 
    } 
} 

function moveme_onmouseup() { 
    if(dragobject) { 
     //   dragobject.filters.alpha.opacity=100; 
        dragobject = null; 
    } 
} 


function moveme_onmousemove() { 
    if (dragobject) { 
        if (window.event.clientX >= 0 && window.event.clientY >= 0) { 
            dragobject.style.left = window.event.clientX - tx + "px"; 
            dragobject.style.top = window.event.clientY - ty + "px"; 
     //       dragobject.filters.alpha.opacity=77; 
        } 
        window.event.returnValue = false; 
    } 
} 

function getLeftPos(el) { 
    if (ie5) { 
        if (el.currentStyle.left == "auto") 
            return 0; 
        else 
            return parseInt(el.currentStyle.left); 
    } 
    else { 
        return el.style.pixelLeft; 
    } 
} 

function getTopPos(el) { 
    if (ie5) { 
        if (el.currentStyle.top == "auto") 
            return 0; 
        else 
            return parseInt(el.currentStyle.top); 
    } 
    else { 
        return el.style.pixelTop; 
    } 
} 

function makeOnTop(el) { 
    var daiz; 
    var max = 0; 
    var da = document.all; 

    for (var i=0; i<da.length; i++) { 
        daiz = da[i].style.zIndex; 
        if (daiz != "" && daiz > max) 
            max = daiz; 
    } 

    el.style.zIndex = max + 1; 
} 

if (document.all) { //ÀÌ ºÎºÐÀº IE4 ÀÌ»ó ¹öÀü¿¡¼­¸¸ ÀÛµ¿µË´Ï´Ù. 
    document.onmousedown = moveme_onmousedown; 
    document.onmouseup = moveme_onmouseup; 
    document.onmousemove = moveme_onmousemove; 
} 

 //·¹ÀÌ¾îÀÌµ¿  ³¡


function replace_value(targetStr, searchStr, replaceStr) {
    var i=0,j=0;
    if (targetStr == null || searchStr == null || replaceStr == null) return "";
    
    var tmpStr = "";
    var tlen = targetStr.length;
    var slen = searchStr.length;
    var i=0;
    var j=0;
    
    while (i < tlen - slen+1) {
        j = i + slen;
        
        if (targetStr.substring(i,j) == searchStr) {
            tmpStr += replaceStr;
            i += slen;
        } else {
            tmpStr += targetStr.substring(i, i + 1);
            i++;
        }
    }
 
 tmpStr +=  targetStr.substring(i);
 
 return tmpStr;
}










//ajax = false;
function ajax_p_in_(serverURL,obj) {
// IEÀÌ¿Ü
if(window.XMLHttpRequest) {
¡¡¡¡¡¡ajax = new XMLHttpRequest();
// IE¿ë
} else if(window.ActiveXObject) {
¡¡¡¡¡¡try {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Msxml2.XMLHTTP");
¡¡¡¡¡¡} catch(e) {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Microsoft.XMLHTTP");
¡¡¡¡¡¡}
}

¡¡¡¡¡¡ajax.open("GET", serverURL, false);
¡¡¡¡¡¡ajax.onreadystatechange = function() {
¡¡¡¡¡¡¡¡¡¡¡¡if (ajax.readyState == 4 && ajax.status == 200) {
               document.getElementById(obj).innerHTML = ajax.responseText;
¡¡¡¡¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡}
¡¡¡¡¡¡ajax.send(null);




}

function ajax_point_xml(m_number) {
  var serverURL = "/html_include/user_point_check.asp?m_number=" + m_number
// IEÀÌ¿Ü
if(window.XMLHttpRequest) {
¡¡¡¡¡¡ajax = new XMLHttpRequest();
// IE¿ë
} else if(window.ActiveXObject) {
¡¡¡¡¡¡try {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Msxml2.XMLHTTP");
¡¡¡¡¡¡} catch(e) {
¡¡¡¡¡¡¡¡¡¡¡¡ajax = new ActiveXObject("Microsoft.XMLHTTP");
¡¡¡¡¡¡}
}

¡¡¡¡¡¡ajax.open("GET", serverURL, false);
¡¡¡¡¡¡ajax.onreadystatechange = function() {
 ¡¡¡¡¡¡¡¡¡¡¡¡if (ajax.readyState == 4 && ajax.status == 200) {
              var xmlDoc=ajax.responseXML.documentElement;
//              var xmlDoc= ajax.responseText;
              
               document.getElementById("NpointText").innerHTML=xmlDoc.getElementsByTagName("NpointText")[0].childNodes[0].nodeValue;
               //document.getElementById(obj).innerHTML = ajax.responseText;
¡¡¡¡¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡}
¡¡¡¡¡¡ajax.send(null);

}


//»õÃ¢¿­±â
function load(theURL,winName,features) {
window.open(theURL,winName,features); 
} 



function bookmark(){
  window.external.AddFavorite('http://thehobbyshop.co.kr', '´õÇÏºñ¼¥')
}
function log_ok(form) { // ·Î±×ÀÎ Ã¼Å© ºÎºÐ
   if (form.id.value=="") {alert("\nID¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");return (false);}
   if (form.password.value=="") {alert("\nÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");return (false)}
   form.action="../login_html/login_end.asp";
   form.submit();
}


function id_product(product_number,user_id,product_name) { //ºÏ¸¶Å© ÀúÀå
	var show = window.open("../design_main/id_product.asp?product_number=" + product_number + "&user_id=" + user_id + "&product_name=" + product_name,"product","width=400, height=300, top=250, left=250")
	show.focus();
}


function product_ea_cart(product_number,order_ea) { 
   var title1 = "¾È³» - ";
   var title2 = "Àå¹Ù±¸´Ï";
   var wsize = "620";
   var hsize = "250";
   ajax_in1("/html_include/product_ea_cart.asp?product_number=" + product_number + "&order_ea=" + order_ea ,title1,title2,wsize,hsize)

}

function cart_view() { //Àå¹Ù±¸´Ïº¸±â
//    cart_temp1.innerHTML ="";
//	oDiv.style.display = 'none';
	location.href = "/order_html/cart.asp"
//	self.close();

}
function order_view() { //ÁÖ¹®¼­ÀÛ¼º
//    cart_temp1.innerHTML ="";
//	oDiv.style.display = 'none';
	location.href = "/order_html/order.asp"
//	self.close();

}


function product_bookmark(product_number)
 {
   var title1 = "¾È³» - ";
   var title2 = "»óÇ° ºÏ¸¶Å©¾È³»";
   var wsize = "500";
   var hsize = "100";
   ajax_in1("/design_main/id_product.asp?product_number="+ product_number ,title1,title2,wsize,hsize)
 }



function product_pop(product_number) { //»óÇ° ÀÚ¼¼È÷º¸±â ÆË¾÷À¸·Î ¶ç¿ì±â
	var show = window.open("../design_main/Poduct_View_Pop.asp?product_number=" + product_number,"product","width=400, height=300, top=250, left=250")
	show.focus();
}

function Go_ProductMakeCompany(Product_Make_Company_Number) {
	location.href = "../product_html/productMakeCompany.asp?Product_Make_Company_Number="+ Product_Make_Company_Number;
}

function production_pop(pm_number) { //Á¦Á¶»ç º¸±â ÆË¾÷Ã¢
//	var show = window.open("/design_main/production_pop.asp?pm_number=" + pm_number,"","scrollbars=yes,resizable=yes,width=800, height=600, top=50, left=50")
//	show.focus();
	location.href = "/product_html/productMakeCompany.asp?Product_Make_Company_Number="+ pm_number;
}

function ok_info(info_number) { 
	var show = window.open("../design_main/product_info_view.asp?info_number="+info_number,"","width=400, height=425, top=250, left=250")
	show.focus();
}


function detail_search_pop() { 
	window.open("../design_main/detail_search.asp","","width=600, height=400, top=100, left=100")
}

function search_dir() { // Á¦Ç° Ã£±â ºÎºÐ - ¼öÁ¤
	if (search_frm.search_name.value == "") {
		alert("\n°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		document.search_frm.search_name.focus();
		return false;   
	}else{
		document.search_frm.action = "../product_html/product_search.asp";
		document.search_frm.submit();
	}
}

function search_dir2() { //Á¦Ç°Ã£±â 2 ±¸°ÇÈ¸

	if (search_frm.search_name.value == "") {
		alert("\n°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		document.search_frm.search_name.focus();
		return false;   
	}
	else {
		document.search_frm.action="/announce_html/announce_list.asp";
		document.search_frm.submit();
	}
}

//¿£ÅÍ½Ã Å¬¸¯ÇÏ±â
function insert_frm_onkeypress() {
	if (event.keyCode == 13) 
	{ 
		//alert("¹öÆ°À» Å¬¸¯ÇÏÀå");
		document.search_frm.btnClick.click();
	}
}

function sendit() {
var profile_code = document.myform.profile_code.value
var MemberGubunType = document.myform.MemberGubunType.value
	if (profile_code==0) { //È¸¿ø °¡ÀÔÀÏ °æ¿ì
		if (document.myform.must.checked==false) { // ¾à°ü½ÂÀÎ Ã¼Å©..
			alert("\n\n¾à°ü¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.    \n\n");
			document.myform.must.focus();
		return;
		}
	}

	if (document.myform.Member_Id.value.length==0) { // ¾ÆÀÌµð °ø¶õÃ¼Å©..
		alert("»ç¿ëÀÚ ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
		document.myform.Member_Id.focus();
		return;
	}

	if (document.myform.password1.value.length==0) { // ºñ¹Ð¹øÈ£ °ø¶õÃ¼Å©..
		alert("\n\nºñ¹Ð¹øÈ£´Â¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n")
		document.myform.password1.focus();
		return;
	}

	if ((document.myform.password1.value.length>10) || (document.myform.password1.value.length<4)) { // ºñ¹Ð¹øÈ£ ¼ýÀÚ Ã¼Å©..(4~10)
		alert("\n\nºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó 10ÀÚ ÀÌÇÏ¸¸ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.    \n\n");
		document.myform.password1.focus();
		document.myform.password1.select();
		return;
	}

	if (document.myform.password2.value.length==0) { // ºñ¹Ð¹øÈ£È®ÀÎ °ø¶õÃ¼Å©..
		alert("\n\nÈ®ÀÎÀ» À§ÇÏ¿© ºñ¹Ð¹øÈ£¸¦ ÇÑ¹ø´õ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.    \n\n");
		document.myform.password2.focus();
		return;
	}

	if (document.myform.password1.value!=document.myform.password2.value) { // ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏ´ÂÁö È®ÀÎ
		alert("\n\nºñ¹Ð¹øÈ£°¡ ¼­·Î Æ²¸³´Ï´Ù.    \n\n");
		document.myform.password1.focus();
		document.myform.password2.select();
		return
	}

	if (MemberGubunType==0) { // °³ÀÎÈ¸¿øÀÏ °æ¿ì

		if (document.myform.N_Name.value.length==0) { // ÀÌ¸§ °ø¶õÃ¼Å©..
			alert("\n\n¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Name.focus();
			return;
		}

		if (document.myform.N_JuminCode1.value.length==0) { // ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\nÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_JuminCode1.focus();
			return;
		}

		if (document.myform.N_JuminCode2.value.length==0) { // ÁÖ¹Îµî·Ï¹øÈ£ µÞºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\nÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_JuminCode2.focus();
			return;
		}

		if(!JuminCheck(document.myform.N_JuminCode1.value, document.myform.N_JuminCode2.value)){
			alert("\n\nÁÖ¹Îµî·Ï¹øÈ£°¡ Àß¸ø ÀÔ·ÂµÇ¾ú½À´Ï´Ù.    \n\n");
			document.myform.N_JuminCode1.focus();
			document.myform.N_JuminCode1.select();
			return;
		}

		if (document.myform.N_Email.value.length==0) { // E-mail °ø¶õÃ¼Å©..
			alert("\n\nE-mail ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Email.focus();
			return;
		}

		if (document.myform.N_Email.value) { // hanmail Ã¼Å©..
			var DEF_String = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTuVWXYZ-_.@"
			var String = document.myform.N_Email.value;
			for (i=0; i < String.length; i++) {
				if(DEF_String.indexOf(String.substring(i,i+1))<0) {
					alert("\n\nÀß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù.    \n\n");
					document.myform.N_Email.focus();
					return;
				}
			}
			if (String.indexOf(".") < 0) {
				alert("\n\nÀß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù.    \n\n");
				document.myform.N_Email.focus();
				return;
			} 
			var String_imsi = String.split("@");
			var String_imsi2 = String_imsi[1];
			var String_low = String_imsi2.toLowerCase() ;

			if (String_low == "hanmail.net" || String_low == "daum.net") {
				alert("\n\nhanmail.net ¶Ç´Â daum.net¿¡ ´ëÇÑ ¸ÞÀÏ¼Û½ÅÀº ºÒ°¡´É ÇÕ´Ï´Ù.    \n\n´Ù¸¥ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!\n\n");
				document.myform.N_Email.focus();
				return;
			}	
		}

		if (document.myform.N_Phone1.value.length==0) { // ÀüÈ­¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n¿¬¶ô¹ÞÀ» Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Phone1.focus();
			return;
		}
  
		if (document.myform.N_Phone2.value.length==0) { // ÀüÈ­¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n¿¬¶ô¹ÞÀ» ±¹¹øÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Phone2.focus();
			return;
		}
  
		if (document.myform.N_Phone3.value.length==0) { // ÀüÈ­¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n¿¬¶ô¹ÞÀ» ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Phone3.focus();
			return;
		}

		if ((document.myform.post1.value.length==0) || (document.myform.post2.value.length==0)) { // ¿ìÆí¹øÈ£ ¾ÕºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\n¿ìÆí¹øÈ£´Â ÇÊ¼ö ÀÔ·ÂÇ×¸ñÀÔ´Ï´Ù.    \n\n");
			document.myform.post1.focus();
			return;
		}

		if (document.myform.addr1.value.length==0) { // ÁÖ¼ÒÀÔ·Â µÞºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\nÁÖ¼Ò´Â ÇÊ¼ö ÀÔ·ÂÇ×¸ñÀÔ´Ï´Ù.    \n\n");
			document.myform.addr1.focus();
			return;
		}

	}else{ // ¾÷Ã¼È¸¿øÀÏ °æ¿ì

		if (document.myform.Com_Name.value.length==0) { // È¸»ç¸í °ø¶õÃ¼Å©..
			alert("\n\nÈ¸»ç¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_Name.focus();
			return;
		}

		if (document.myform.Com_OwenName.value.length==0) { // ´ëÇ¥ÀÚ¼º¸í °ø¶õÃ¼Å©..
			alert("\n\n´ëÇ¥ÀÚ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_OwenName.focus();
			return;
		}

		if (document.myform.Com_regNo1.value.length==0) { // »ç¾÷ÀÚ¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n»ç¾÷ÀÚ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_regNo1.focus();
			return;
		}

		if (document.myform.Com_regNo2.value.length==0) { // »ç¾÷ÀÚ¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n»ç¾÷ÀÚ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_regNo2.focus();
			return;
		}

		if (document.myform.Com_regNo1.value.length==0) { // »ç¾÷ÀÚ¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n»ç¾÷ÀÚ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_regNo1.focus();
			return;
		}

		if (document.myform.Com_regNo3.value.length==0) { // »ç¾÷ÀÚ¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n»ç¾÷ÀÚ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_regNo3.focus();
			return;
		}

		if (document.myform.Com_RegAcc1.value.length==0) { // ¾÷ÅÂ °ø¶õÃ¼Å©..
			alert("\n\n¾÷ÅÂ¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_RegAcc1.focus();
			return;
		}

		if (document.myform.Com_RegAcc2.value.length==0) { // Á¾¸ñ °ø¶õÃ¼Å©..
			alert("\n\nÁ¾¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.Com_RegAcc2.focus();
			return;
		}

		if ((document.myform.post1.value.length==0) || (document.myform.post2.value.length==0)) { // È¸»ç¿ìÆí¹øÈ£ ¾ÕºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\nÈ¸»ç¿ìÆí¹øÈ£´Â ÇÊ¼ö ÀÔ·ÂÇ×¸ñÀÔ´Ï´Ù.    \n\n");
			document.myform.post1.focus();
			return;
		}

		if (document.myform.addr1.value.length==0) { // È¸»çÁÖ¼ÒÀÔ·Â µÞºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\nÈ¸»çÁÖ¼Ò´Â ÇÊ¼ö ÀÔ·ÂÇ×¸ñÀÔ´Ï´Ù.    \n\n");
			document.myform.addr1.focus();
			return;
		}

		if (document.myform.N_Name.value.length==0) { // ´ã´çÀÚ¼º¸í °ø¶õÃ¼Å©..
			alert("\n\n´ç´çÀÚ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Name.focus();
			return;
		}


		if (document.myform.N_JuminCode1.value.length==0) { // ´ã´çÀÚ ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\n´ã´çÀÚ ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_JuminCode1.focus();
			return;
		}

		if (document.myform.N_JuminCode2.value.length==0) { // ´ã´çÀÚ ÁÖ¹Îµî·Ï¹øÈ£ µÞºÎºÐ °ø¶õÃ¼Å©..
			alert("\n\n´ã´çÀÚ ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_JuminCode2.focus();
			return;
		}

		if(!JuminCheck(document.myform.N_JuminCode1.value, document.myform.N_JuminCode2.value)){
			alert("\n\n´ã´çÀÚ ÁÖ¹Îµî·Ï¹øÈ£°¡ Àß¸ø ÀÔ·ÂµÇ¾ú½À´Ï´Ù.    \n\n");
			document.myform.N_JuminCode1.focus();
			document.myform.N_JuminCode1.select();
			return;
		}

		if (document.myform.N_Email.value.length==0) { // ´ã´çÀÚ E-mail °ø¶õÃ¼Å©..
			alert("\n\n´ã´çÀÚ E-mail ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Email.focus();
			return;
		}

		if (document.myform.N_Email.value) { // hanmail Ã¼Å©..
			var DEF_String = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTuVWXYZ-_.@"
			var String = document.myform.N_Email.value;
			for (i=0; i < String.length; i++) {
				if(DEF_String.indexOf(String.substring(i,i+1))<0) {
					alert("\n\nÀß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù.    \n\n");
					document.myform.N_Email.focus();
					return;
				}
			}
			if (String.indexOf(".") < 0) {
				alert("\n\nÀß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù.    \n\n");
				document.myform.N_Email.focus();
				return;
			} 
			var String_imsi = String.split("@");
			var String_imsi2 = String_imsi[1];
			var String_low = String_imsi2.toLowerCase() ;

			if (String_low == "hanmail.net" || String_low == "daum.net") {
				alert("\n\nhanmail.net ¶Ç´Â daum.net¿¡ ´ëÇÑ ¸ÞÀÏ¼Û½ÅÀº ºÒ°¡´É ÇÕ´Ï´Ù.    \n\n´Ù¸¥ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!\n\n");
				document.myform.N_Email.focus();
				return;
			}	
		}

		if (document.myform.N_Phone1.value.length==0) { // ´ã´çÀÚ ÀüÈ­¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n¿¬¶ô¹ÞÀ» Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Phone1.focus();
			return;
		}
  
		if (document.myform.N_Phone2.value.length==0) { // ´ã´çÀÚ ÀüÈ­¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n¿¬¶ô¹ÞÀ» ±¹¹øÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Phone2.focus();
			return;
		}
  
		if (document.myform.N_Phone3.value.length==0) { // ´ã´çÀÚ ÀüÈ­¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\n¿¬¶ô¹ÞÀ» ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Phone3.focus();
			return;
		}

		if (document.myform.N_Fax1.value.length==0) { // ÆÑ½º¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\nÆÑ½º¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Fax1.focus();
			return;
		}

		if (document.myform.N_Fax2.value.length==0) { // ÆÑ½º¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\nÆÑ½º¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Fax2.focus();
			return;
		}

		if (document.myform.N_Fax3.value.length==0) { // ÆÑ½º¹øÈ£ °ø¶õÃ¼Å©..
			alert("\n\nÆÑ½º¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.    \n\n");
			document.myform.N_Fax3.focus();
			return;
		}

	}
	document.myform.submit();
}//functin sendit() ¸¶Áö¸·..

		


function numcheck(frm) { //ÀÔ·Â¶õ¿¡ ¼ýÀÚ¸¸ µé¾î¿À°Ô Ã¼Å©---ÁÖ¹Îµî·Ï¹øÈ£,ÀüÈ­¹øÈ£, ÈÞ´ëÆù¹øÈ£..
	if ((event.keyCode<48) || (event.keyCode >57 )) {
		event.returnValue=false;
		alert("¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù..");
		frm.focus();
		return;
	}
}

// ¼ýÀÚ¸¸À» ¹ÞÀÚ
function onlyNumber() {
	if((event.keyCode<48) || (event.keyCode>57))
	event.returnValue=false;
}

// ÁÖ¹Îµî·Ï¹øÈ£¸¦ ½ÇÁ¦·Î Ã¼Å©ÇÏ´Â ·çÆ¾½ÃÀÛ.............................
function JuminCheck(jumin1, jumin2){
	var jm1=parseInt(jumin1.charAt(0));
	var jm2=parseInt(jumin1.charAt(1));
	var jm3=parseInt(jumin1.charAt(2));
	var jm4=parseInt(jumin1.charAt(3));
	var jm5=parseInt(jumin1.charAt(4));
	var jm6=parseInt(jumin1.charAt(5));
	var jm7=parseInt(jumin2.charAt(0));
	var jm8=parseInt(jumin2.charAt(1));
	var jm9=parseInt(jumin2.charAt(2));
	var jm10=parseInt(jumin2.charAt(3));
	var jm11=parseInt(jumin2.charAt(4));
	var jm12=parseInt(jumin2.charAt(5));
	var jm13=parseInt(jumin2.charAt(6));
	check=false;

	/*----¿¬»ê------*/
	var lastnum=11-((jm1*2+jm2*3+jm3*4+jm4*5+jm5*6+jm6*7+jm7*8+jm8*9+jm9*2+jm10*3+jm11*4+jm12*5)%11);
	if (lastnum>9) lastnum=lastnum % 10;

	/*----°á°ú Ã¢ º¸ÀÌ±â----*/
	if ( (jm3*10+jm4)<1 || (jm3*10+jm4)>12){
	check=false;
	}
	if ((jm5*10+jm6)<1){
		check=false;
	}
	var tempyear;
	tempyear=1900+jm1*10+jm2;
	if ( (jm5*10+jm6) > hasdays(jm3*10+jm4,tempyear) ){
		check=false;
	}
	if ( jm7!=1 && jm7!=2 )
	{
		check=false;
	}  
	if (lastnum==jm13){
		check=true;
	}
	if (lastnum!=jm13)
	{
		check=false;
	}
	return check;
}


function hasdays(monthtoknow,yeartoknow){
	switch(monthtoknow){
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
		return 31;
		break;
		case 4:
		case 6:
		case 9:
		case 11:
		return 30;
		break;
		case 2:
	//4·Î ³ª´©¾î ¶³¾îÁöÁö ¾Ê´Â ÇØ´Â À±³âÀÌ ¾Æ´Ï´Ù.
	//100À¸·Î ³ª´©¾î ¶³¾îÁö°í 400À¸·Î ³ª´©¾î ¶³¾îÁöÁö
	// ¾Ê´Â ÇØ´Â À±³âÀÌ ¾Æ´Ï´Ù. ÀÌ°Å ¸Â°ÚÁö...
		if (yeartoknow==0)
			return 29;
		if ((yeartoknow%4!=0) || ((yeartoknow%100==0)&&(yeartoknow%400!=0)) )
			return 28;
		else return 29;
	}
} 

//---¿ìÆí¹øÈ£..Ã¼Å© -------------------------------
function post_check(obj) {
	locate_top = screen.height/2-100;
	locate_left = screen.width/2-215
	window.open("../design_main/post1.asp?pri="+obj,"","width=450,height=430,top=" + locate_top + ",left=" + locate_left )
}

//---¿ìÆí¹øÈ£..Ã¼Å© -------------------------------
function post_check2() {
	locate_top = screen.height/2-100;
	locate_left = screen.width/2-215
	window.open("../design_main/post_search2.asp","","width=460,height=200,top=" + locate_top + ",left=" + locate_left )
}

//---ÁÖ¹Îµî·Ï¹øÈ£·Î »ý³â¿ùÀÏ¶õ¿¡ °ª³Ö±â...
function birthday_input() {
	var birthday_str = document.myform.jumin1.value
	document.myform.birthday_year.value="19" + birthday_str.substring(0,2)
	document.myform.birthday_month.value=birthday_str.substring(2,4)
	document.myform.birthday_day.value=birthday_str.substring(4)
}


//---id  °Ë»ö -------------------------------------
function id_search() {
	locate_top = screen.height/2-100;
	locate_left = screen.width/2-200
	window.open("../design_main/id_search.asp","","width=400,height=200,top=" + locate_top + " ,left=" + locate_left)
}

//---ÃßÃµÀÎ °Ë»ö ----------------------------------
function recom_search() {
	locate_top = screen.height/2-100;
	locate_left = screen.width/2-200
	window.open("../design_main/recom_search.asp","recom","width=400, height=200, top=" + locate_top + ", left=" + locate_left + ", scrollbars=yes, resizable=yes")
}

function rewrite() {
	document.myform.reset();
	document.myform.Member_Id.focus();
}

function img_show(product_number, img_number)//Å« ÀÌ¹ÌÁö º¸¿©ÁÖ±â
{
var show = window.open("/design_main/img_show.asp?product_number=" + product_number + "&img_number=" + img_number,"image","width=845, height=800, top=0, left=0")
show.focus();
} 
function modal_img_show(product_number, img_number)//Å« ÀÌ¹ÌÁö º¸¿©ÁÖ±â(¸ð´ÞÃ¢À¸·Î º¸ÀÌ±â)
{
var imgshowmodal = window.showModalDialog("/design_main/modal_img_show.asp?product_number=" + product_number + "&img_number=" + img_number,'image_show', 'dialogWidth:700px;dialogHeight:655px; center:yes; help:no; status:no; scroll:no; resizable:no'); 
} 



function img_showa(product_number, img_number,img_t)//Å« ÀÌ¹ÌÁö º¸¿©ÁÖ±â
{
var show = window.open("/design_main/img_show3.asp?product_number=" + product_number + "&img_number=" + img_number+"&img_t=" + img_t,"image","width=845, height=735, top=0, left=0")
show.focus();
} 
///////// »óÇ°ÀÚ¼¼È÷º¸±â ¼ö·® º¯°æ ///////
function minus() {
			if(this.document.product.ea.value <= 1) this.document.product.ea.value=1;
			else this.document.product.ea.value=this.document.product.ea.value-1;;
	}
	function plus() {
			if(this.document.product.ea.value > 98) this.document.product.ea.value=99;
			else this.document.product.ea.value=this.document.product.ea.value*1+1;;
	}
///////// »óÇ°ÀÚ¼¼È÷º¸±â ¼ö·® º¯°æ ³¡ ///////



function product_view(product_number) { //»óÇ° ÀÚ¼¼È÷ º¸±â
	var product = window.open("../product_html/product_detail.asp?product_number=" + product_number,'_self');
}

function product_cart_in(product_number) { //Àå¹Ù±¸´Ï ¹Ù·Î ³Ö±â
	var product_cart_in = window.open("../html_include/product_cart_in.asp?set_type=one&product_number=" + product_number,'_self');
}

function check(){
//	document.all.flag.value = 1;
	if (document.frmParent.order_cash[0].checked == true){
		online_text1.style.display = '';
		online_text2.style.display = '';
		online_text3.style.display = '';
//		card_text1.style.display = 'none';
//		card_text2.style.display = 'none';

	}else{
		online_text1.style.display = 'none';
		online_text2.style.display = 'none';
		online_text3.style.display = 'none';
//		card_text1.style.display = '';
//		card_select_view();
	}
}
function tax_check(){
	if (document.frmParent.tax_ok[0].checked == true){
		tax_ok_text.style.display = '';
	}else{
		tax_ok_text.style.display = 'none';
	}
}

//function card_select_view(){
//	if (document.frmParent.PAYTYPE[0].checked == true){
//		card_text2.style.display = 'none';
//	}else{
//		card_text2.style.display = '';
//	}
//}
function chkThisForm() {
//if (document.frmParent.tr_name.value=="") {
//	  alert("\n¹è¼Û¹æ½ÄÀ» ¼±ÅÃÇÏ¿© ÁÖ¼¼¿ä.");
//	 return;
//	  }


   var i;
   var count = 0;
    for (i = 0; i < document.frmParent.elements.length; i++) {
        if (document.frmParent.elements[i].name == "tr_name" &&
            document.frmParent.elements[i].checked == true) {
            count++;
       }
    }
    if (count == 0) {
	  alert("\n¹è¼Û¹æ½ÄÀ» ¼±ÅÃÇÏ¿© ÁÖ¼¼¿ä.");
	 return;
   }



	else if (document.frmParent.order_name.value=="") {
		 alert("\nÁÖ¹®ÇÏ½Ã´Â ºÐ ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		 document.frmParent.order_name.focus();
		 return;
	   }

	else if (document.frmParent.order_email.value=="") {
		alert("\nÁÖ¹®ÇÏ½Ã´Â ºÐ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.order_email.focus();
		 return;
		}
	else if (document.frmParent.order_phone1.value=="") {
		alert("\nÁÖ¹®ÇÏ½Ã´Â ºÐ Áö¿ª¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.order_phone1.focus();
		 return;
		}
	else if (document.frmParent.order_phone2.value=="") {
		alert("\nÁÖ¹®ÇÏ½Ã´Â ºÐ ÀüÈ­¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.order_phone2.focus();
		 return;
		}
	else if (document.frmParent.order_phone3.value=="") {
		alert("\nÁÖ¹®ÇÏ½Ã´Â ºÐ ÀüÈ­¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.order_phone3.focus();
		 return;
		}

	else if (document.frmParent.re_name.value=="") {
		alert("\n»óÇ° ¹ÞÀ¸½Ç ºÐ ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.frmParent.re_name.focus();
		 return;
		}
	else if (document.frmParent.re_email.value=="") {
		alert("\n»óÇ° ¹ÞÀ¸½Ç ºÐ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.re_email.focus();
		 return;
		}
	else if (document.frmParent.re_phone1.value=="") {
		alert("\n»óÇ° ¹ÞÀ¸½Ç ºÐ Áö¿ª¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.re_phone1.focus();
		 return;
		}
	else if (document.frmParent.re_phone2.value=="") {
		alert("\n»óÇ° ¹ÞÀ¸½Ç ºÐ ÀüÈ­¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.re_phone2.focus();
		 return;
	}
	else if (document.frmParent.re_phone3.value=="") {
		alert("\n»óÇ° ¹ÞÀ¸½Ç ºÐ ÀüÈ­¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.re_phone3.focus();
		 return;
		}
	else if (document.frmParent.post1.value=="") {
		alert("\n»óÇ° ¹ÞÀ¸½Ç °÷ÀÇ ¿ìÆí¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.post1.focus();
		 return;
		}
	else if (document.frmParent.post2.value=="") {
		alert("\n»óÇ° ¹ÞÀ¸½Ç °÷ÀÇ ¿ìÆí¹øÈ£¸¦ È®ÀÎÇØ ÁÖ¼¼¿ä.");
		document.frmParent.post2.focus();
		 return;
		}
	else if (document.frmParent.re_addr1.value=="") {
		alert("\nÁ¦Ç° ¹ÞÀ¸½Ç °÷ÀÇ ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
 	    document.frmParent.re_addr1.focus();
		 return;
	}
	else if (document.frmParent.re_addr2.value=="") {
		alert("\nÁ¦Ç° ¹ÞÀ¸½Ç °÷ÀÇ ³ª¸ÓÁö ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.frmParent.re_addr2.focus();
		 return;
	}


        document.frmParent.target="hidden_iframe";
		document.frmParent.action ="../html_include/product_pay_temp.asp";
		document.frmParent.submit();
//	}
}

function post_search() {
    window.open("../html/post_search1.asp", "postHome", "width=450,height=200,scrollbars=yes,resizable=yes");
}

function Re_copy() {
	form = this.document.frmParent;
	form.re_name.value = form.order_name.value;
	form.re_email.value = form.order_email.value;
	form.re_phone1.value = form.order_phone1.value;
	form.re_phone2.value = form.order_phone2.value;
	form.re_phone3.value = form.order_phone3.value;
	form.re_handphone1.value = form.order_handphone1.value;
	form.re_handphone2.value = form.order_handphone2.value;
	form.re_handphone3.value = form.order_handphone3.value;
}

function Tprice(num) {
	var Tprice	//¹è¼Û ±Ý¾×
	var Tname	//¹è¼ÛÀÌ¸§

var tr_temp = document.frmParent.tr_name[num].value
document.frmParent.tr_price_name.value = tr_temp.split("-")[0]	
document.frmParent.tr_price.value = tr_temp.split("-")[1]	
Tname = document.frmParent.tr_price_name.value 
Tprice = document.frmParent.tr_price.value 
alert(Tname + 'À»(¸¦) ¼±ÅÃÇÏ¼Ì½À´Ï´Ù.');

TotalPriceOk()
}




function nPoint() {		
	var Tprice	//¹è¼Û ±Ý¾×
	var Tot     //»óÇ° ÃÑ±Ý¾×
	var Point


	Point = document.frmParent.Point.value
	Tprice = document.frmParent.tr_price.value 

	// ¹è¼Û·á

	
	if (Tprice == "") {
		Tprice = 0;
	}
	
	// ÀÏ´Ü »óÇ°ÃÑ±Ý¾×
	Tot = document.frmParent.Price.value	
	
	// »óÇ°ÃÑÇÕ°è + ¹è¼Û·á
	// ÀÏ´Ü Á¤¼ö·Î ¸¸µé°í
	temp = parseInt(Tot) + parseInt(Tprice)


	if (document.frmParent.Point.value == "") {	
	temp1 = parseInt(temp)
	}
	else {
	temp1 = parseInt(temp) - parseInt(Point)
	}
	
	if (temp1 < 0) {
		alert("Àû¸³±ÝÀÌ ÃÑ °áÁ¦ÇÒ ±Ý¾×À» ÃÊ°úÇÏ¿´½À´Ï´Ù");
		document.frmParent.Point.value = "";
 	    TotalPriceOk()
		return false;
	}	
	// ¾µ·Á°í ÇÏ´Â Æ÷ÀÎÆ® ±Ý¾×ÀÌ ÃÑ »ç¿ëÇÒ¼ö ÀÖ´Â ±Ý¾×º¸´Ù ¸¹À¸¸é
	user_temp = Point
	user_bonus = document.frmParent.bonus.value

	user_temp1 = parseInt(user_temp)
	user_temp2 = parseInt(user_bonus)

	if (user_temp1 > user_temp2) {
		alert("»ç¿ëÇÒ Æ÷ÀÎÆ® Á¡¼ö°¡ ÇÑµµ¸¦ ³Ñ¾ú½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.frmParent.Point.value = "";
        TotalPriceOk()
		document.frmParent.Point.focus();
  		return false;	
	}

 //  	TotalPriceText = document.frmParent.total_end_money;
//	check_value(TotalPriceText)

TotalPriceOk()

}


function PPointOk(Num) {
var PPoint = document.frmParent.p_bonus.value ;

if (Num == 1) {
//		alert("»óÇ°¿¡ ´ëÇÑ Àû¸³±ÝÀ» Áö±Ý »ç¿ëÇÕ´Ï´Ù.");
		document.frmParent.MadePbonus.value = PPoint ;
       }
	else {
//		alert("»óÇ°¿¡ ´ëÇÑ Àû¸³±ÝÀ» Áö±Ý »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.");
        document.frmParent.MadePbonus.value ="0" ;
	}

TotalPriceOk()

}

function TotalPriceOk() {

var Tot // »óÇ° ÃÑ±Ý¾×
var NPoint // »ç¿ëÀÚ°¡ »ç¿ëÇÒ Æ÷ÀÎÆ®
var UNPoint // »ç¿ëÀÚ°¡ »ç¿ëÇÒ Áï½Ã Æ÷ÀÎÆ®
var PPoint  // »óÇ°¿¡ ´ëÇÑ ÀüÃ¼ Àû¸¯±Ý
var TPrice  // ÅÃ¹èºñ¿ë
var TotalPriceS // ÀüÃ¼ °áÁ¦ÇØ¾ß ÇÒ ±Ý¾× º¯¼ö
var TotalPrice // ÀüÃ¼ °áÁ¦ÇØ¾ß ÇÒ ±Ý¾×



    if (document.frmParent.Point.value == "") {	
	NPoint = 0 ;
	}
	else {
	NPoint = document.frmParent.Point.value  ;
	}



	Tot = document.frmParent.Price.value	
	PPoint = document.frmParent.MadePbonus.value  ;
	TPrice = document.frmParent.tr_price.value  ;


TotalPrice = parseInt(Tot) + parseInt(TPrice) - parseInt(NPoint) - parseInt(PPoint)



   document.all.TecPriceText.innerHTML = SScomma(TPrice) ;  //ÅÃ¹èºñ¿ë TEXT
   document.all.NpointText.innerHTML =   SScomma(NPoint) ;  //»ç¿ëÇÑ Àû¸³±Ý TEXT
   document.all.UNpointText.innerHTML = SScomma(PPoint) ; // »óÇ°¿¡ ´ëÇÑ Áï½Ã »ç¿ëÀû¸³±Ý TEXT



   
   document.all.PPP_text.innerHTML =  SScomma(String(parseInt(Tot) + parseInt(TPrice))) ;
   document.all.XXX_text.innerHTML = SScomma(String(parseInt(NPoint) + parseInt(PPoint))) ;

   document.frmParent.total_end_money.value = TotalPrice ;	// INPUT
   TotalPriceS = document.frmParent.total_end_money
   Scomma(TotalPriceS)



}






function moveFocus(move_type){
	if(move_type == 0){
		var str = document.frmParent.card_num1.value.length;
		if(str == 4){document.frmParent.card_num2.focus();}
	}else if(move_type == 1){
		var str = document.frmParent.card_num2.value.length;
		if(str == 4){document.frmParent.card_num3.focus();}
	}else if(move_type == 2){
		var str = document.frmParent.card_num3.value.length;
		if(str == 4){document.frmParent.card_num4.focus();}
	}
}

function ok_mn_product(mn_type){
	if(mn_type == "0"){
		mn_product_01.style.display = '';
		mn_product_02.style.display = 'none';
	}else if(mn_type == "1"){
		mn_product_01.style.display = 'none';
		mn_product_02.style.display = '';
	}
}




function numOnMask(me){ //text¾È¿¡ µé¾î°¡´Â°ÍÀÌ À½¼öÀÎÀÚ È®ÀÎ

 var tmpH		
	if(me.charAt(0)=="-"){//À½¼ö°¡ µé¾î¿ÔÀ»¶§ '-'¸¦ »©°íÀû¿ëµÇ°Ô..
		tmpH=me.substring(0,1);
		me=me.substring(1,me.length);
	}	//me.indexOf('-')
 	if(me.length > 3){
 		var c=0;
 		var myArray=new Array();
  		for(var i=me.length;i>0;i=i-3){
    			myArray[c++]=me.substring(i-3,i);
  	 	}
   		myArray.reverse();
  	 	me=myArray.join(",");
 	 }
 	 if(tmpH){
 	 	me=tmpH+me;
 	 }
return me
}
function numOffMask(me){
	    var tmp=me.split(",");
 	    tmp=tmp.join("");
	    return tmp;
}

function check_value(me){
	var myStr=numOffMask(me.value);
	me.value=numOnMask(myStr);
//    me.select ();
}

//-------------------------------------------------------------------------------
function SnumOnMask(IntStr){ //text¾È¿¡ µé¾î°¡´Â°ÍÀÌ À½¼öÀÎÀÚ È®ÀÎ

 var tmpH		

 
 if(IntStr.charAt(0)=="-"){//À½¼ö°¡ µé¾î¿ÔÀ»¶§ '-'¸¦ »©°íÀû¿ëµÇ°Ô..
		tmpH=IntStr.substring(0,1);
		IntStr=IntStr.substring(1,IntStr.length);

	}	//IntStr.indexOf('-')
 	if(IntStr.length > 3){
		
		var c=0;
 		var myArray=new Array();
  		for(var i=IntStr.length;i>0;i=i-3){
    			myArray[c++]=IntStr.substring(i-3,i);
  	 	}
   		myArray.reverse();
  	 	IntStr=myArray.join(",");
 	 }
 	 if(tmpH){
 	 	IntStr=tmpH+IntStr;
 	 }

return IntStr
}
function SnumOffMask(IntStr){
	    var tmp=IntStr.split(",");
 	    tmp=tmp.join("");
	    return tmp;
}

function Scomma(IntStr){

	var myStr=numOffMask(IntStr.value);
	IntStr.value=numOnMask(myStr);
	
}



function SScomma(num)
{
 var result ="";

if(num == ""){

result = "0" ;
return result;

}  else	{





 for(var i=0; i<num.length; i++) 
 {
  var tmp = num.length-(i+1)
  if(i%3==0 && i!=0) 
   result = ',' + result;
  result = num.charAt(tmp) + result;
 }
 return result;
}

}



  function go_production(production_number) { //Á¦Á¶»ç /ºê·£µå ¸®½ºÆ®
  location.href = "/product_html/ProductMakeCompany_List.asp?product_make_company_number="+ production_number ;
 }
