

ajax = false;
ajax1 = false;
ajax2 = false;
ajax3 = false;
ajax4 = false;
ajax5 = false;
ajax6 = false;
// IEÀÌ¿Ü


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 toTopBottom() {

             window.scrollTo(0, 0);

} 


function changepmake(){
 document.checklst.action="/product_html/product_view.asp"
document.checklst.submit();

//var ac_type = document.checklst.ac_type.value ;
//var ac_number = document.checklst.ac_number.value ;
//var bc_number = document.checklst.bc_number.value ;
//var cc_number = document.checklst.cc_number.value ;
//var dc_number = document.checklst.dc_number.value ;
//var product_make_company_number = document.checklst.product_make_company_number.value ;
//var list_type = document.checklst.list_type.value ;



//ajax_p_in_("/html_include/list_functions.asp?ac_type="+ ac_type +"&ac_number="+ ac_number + "&bc_number="+ bc_number +"&cc_number="+ cc_number +"&dc_number="+ dc_number +"&list_type="+ list_type +"&Product_Make_Company_number="+product_make_company_number + "" ,'product_view');""
//toTopBottom();
}


function dongho_s()//µ¿È£È¸ ¼±ÅÃ
{

	var show3 = window.open("/design_main/dongho_select.asp","dongho_select","width=860, height=500, top=50, left=50, scrollbars=yes,resizable=yes,")
	show3.focus();
 }


	 function gotopage(page_number,asc_type)//»óÇ°°Ë»ö
	{
		 document.myform.target="_self"
		 document.myform.action="product_view.asp?gotopage=" + page_number + "&asc_type=" + asc_type
		 document.myform.submit();
	  //  }
	}

	function go_product(loc){
	if (loc=="check"){
	document.checklst.action = "product_check_end.asp";
	}
	else {
	document.checklst.action = "../html_include/product_cart_in.asp";
	}
	document.checklst.submit();
	}
	function product_buy(loc,product_number,i){
		if (loc=="check"){
			document.checklst.action = "product_check_end.asp";
		}
		else {
			document.checklst.action = "../html_include/product_cart_in.asp?set_type=one&product_check=" + product_number 
			//document.checklst.product_check.checked = true;
	//		document.checklst.product_check.value = product_number;
//			for (j=1;j<=i;j++){
//				if (j == i){
//					document.checklst.product_check[i-1].click();
//				}
//			}		
		}
		document.checklst.submit();
	}


	function goto_ccbun(sel, targetstr)
	{
		var index = sel.selectedIndex;
		
		if (sel.options[index].value != '')
		{
			if (targetstr == 'blank')
			{
				window.open(sel.options[index].value, 'win1');
			}
			
			else
			{
				var frameobj;
				
				if ((frameobj = eval(targetstr)) != null)
				frameobj.location = sel.options[index].value;
			}
		}
	}




document.writeln('<div id="oDiv" style="background:white; margin:2; border: 1 solid buttonshadow; width:450; height:350; display:none; position:absolute; z-index:1">');
document.writeln('<span id="cart_temp1"></span>');
document.writeln('</div>');	



function product_ea_cart(product_number) { 

  // alert(product_number);
var serverURL = "/html_include/product_ea_cart.asp?product_number=" + product_number ;

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) {
               cart_temp1.innerHTML = ajax.responseText;
¡¡¡¡¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡}
¡¡¡¡¡¡ajax.send(null);

	
//	imgtarget = obj;															

   oDiv.style.setExpression("left", "document.body.clientWidth/2 - oDiv.offsetWidth/2"); // ·¹ÀÌ¾îÀÇ x Ãà À§Ä¡¸¦ ¼³Á¤ ÇÕ´Ï´Ù
   oDiv.style.setExpression("top", "document.body.clientHeight/2 - oDiv.offsetHeight/2"); // ·¹ÀÌ¾îÀÇ yÃà À§Ä¡¸¦ ¼³Á¤ ÇÕ´Ï´Ù

	cartView = document.all.oDiv;

//	document.all.myform.target="cartfrm"
 //   document.all.myform.action="/js/P_ImgView.asp?product_number=" + product_number
 //   document.all.myform.submit();
	
//	cartView.style.pixelTop = top  + topsize +obj.offsetHeight;
//	cartView.style.pixelLeft = left + leftsize;
	oDiv.style.display = '';
    toTopBottom();
}



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_ea_cart_close() { //°³¹ßÀå¹Ù±¸´Ï¼±ÅÃÇÑÇÑ ·¹ÀÌ¾î´Ý±â
    cart_temp1.innerHTML ="";
	oDiv.style.display = 'none';
//	location.href = "/order_html/order.asp"
//	self.close();

}




function grade_pop(grade) { //»óÇ° ÀÚ¼¼È÷º¸±â ÆË¾÷À¸·Î ¶ç¿ì±â
	var show = window.open("/design_main/grade_Pop.asp?grade=" + grade,"grade_pop","width=500, height=700, top=50, left=50")
	show.focus();
}





function bookmark(){
  window.external.AddFavorite('http://www.buyrc.co.kr', 'RC Àü¹®¼îÇÎ¸ô [¿ë»ê¾Ë¾¾]')
}

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 product_ea_order(product_number) { //»óÇ° Àç°í¿äÃ»
	var show = window.open("/design_main/product_ea_order.asp?product_number=" + product_number,"","scrollbars=no,resizable=no,width=500, height=400, top=50, left=50")
	show.focus();
}
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_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 m_price(product_number) { //ÃÖÀú°¡½Å°í
	var show = window.open("/design_main/m_price_list.asp?product_number=" + product_number,"","scrollbars=no,resizable=no,width=500, height=500, top=50, left=50")
	show.focus();
}

function pjum_view(product_number) { //ÆòÁ¡º¸±â
	var show = window.open("/design_main/pjum_view.asp?product_number=" + product_number,"","scrollbars=no,resizable=no,width=500, height=465, top=50, left=50")
	show.focus();
}

function pjum(product_number) { //ÆòÁ¡ÁÖ±â
	var show = window.open("/design_main/pjum.asp?product_number=" + product_number,"","scrollbars=no,resizable=no,width=500, height=300, top=50, left=50")
	show.focus();
}


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:675px; 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.must.checked) {alert("\n¾à°ü¿¡ µ¿ÀÇÇÏ¼Å¾ß µË´Ï´Ù.");document.frmParent.must.focus();}
	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;
	}

    else if (document.frmParent.ccheck1[1].checked) {
      alert("¾à°ü¿¡ µ¿ÀÇ ÇÏ¼Å¾ß ÇÕ´Ï´Ù.") ;
		return ;
	}


      

        document.frmParent.target="hidden_iframe";
		//document.frmParent.target="_self"
		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() {
	var Tprice	//¹è¼Û ±Ý¾×
	var Tot     //»óÇ° ÃÑ±Ý¾×
    	
	// ÀÏ´Ü ¹è¼Û¹æ½Ä ¼±ÅÃÀÌ µÇ¾ú³Ä.?
//	if (frmParent.tr_name.selectedIndex == "") {
//		alert("¹è¼Û¹æ½ÄÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä");		
//		return false;	
//	}
	
	// ¹è¼Û·á
	Tprice=document.frmParent.tr_name.value.split("-")[1]	
	//Tprice = document.frmParent.tr_name.value
	
	// ÀÏ´Ü »óÇ°ÃÑ±Ý¾×
	Tot = document.frmParent.Price.value	
	
	// ÀÏ´Ü ÇÕ°è¸¦ ±¸ÇÑ´Ù
	temp = parseInt(Tprice) + parseInt(Tot)
	
	if (document.frmParent.Point.value != "") {
		temp = temp - parseInt(document.frmParent.Point.value);		
	}
		
	// »óÇ°ÃÑÇÕ°è + ¹è¼Û·á
	document.frmParent.total_end_money.value = temp;
}

//ÆÄÀÏ ¾÷·Îµå Ã¼Å© ·çÆ¾
function CheckUploadFile()
{
	var upload_file = document.WriteForm.txtAttachFile.value.toLowerCase()
	if (upload_file.length>0) // ÆÄÀÏ¼±ÅÃÀ» ÇÑ °æ¿ì
	{
		if (((upload_file.indexOf("asp"))==-1) && ((upload_file.indexOf("exe"))==-1) && ((upload_file.indexOf("bat"))==-1) && ((upload_file.indexOf("com"))==-1))
			return true;
		else
			return false;
	}

	else // ÆÄÀÏ ¼±ÅÃÀ» ¾ÈÇÑ°æ¿ì
	{
		return true;
	}
}


function nPoint() {		
	var Tprice	//¹è¼Û ±Ý¾×
	var Tot     //»óÇ° ÃÑ±Ý¾×
	var point

	Point = document.frmParent.Point.value
	// ¼±ÅÃÀÌ µÇ°í³ª¼­ Æ÷ÀÎÆ® ±Ý¾×À» ÀÔ·ÂÇß³Ä.?
//	if (document.frmParent.Point.value == "0") {
//		alert("0º¸´Ù Å«¼ö¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
//		document.frmParent.Point.value = "";
//		document.frmParent.Point.focus();
//		return false;	
//	}

	// ¹è¼Û·á
	Tprice = document.frmParent.tr_name.value.split("-")[1]	
	
	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 = "0";
		document.frmParent.total_end_money.value = parseInt(document.frmParent.Price.value) + parseInt(document.frmParent.tr_name.value.split("-")[1]);
		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 = "0";
		document.frmParent.total_end_money.value = parseInt(document.frmParent.Price.value) + parseInt(document.frmParent.tr_name.value.split("-")[1]);
		document.frmParent.Point.focus();
		return false;	
	}
	document.frmParent.total_end_money.value = temp1;	
}

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 = '';
	}
}
