function bookmark(){
  window.external.AddFavorite('http://www.buylight.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_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{
		
		if (search_frm.search_code.value == "1"){
	 	  document.search_frm.action = "../product_html/product_m_search.asp";
		}else if (search_frm.search_code.value == "2"){
		  document.search_frm.action = "../product_html/product_search.asp";
		}else if (search_frm.search_code.value == "3"){
		  document.search_frm.action = "../product_html/product_song_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.must1.checked==false) { // ¾à°ü½ÂÀÎ Ã¼Å©..
			alert("\n\n°³ÀÎº¸È£Á¤Ã¥¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.    \n\n");
			document.myform.must1.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=350,height=230,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 if (document.frmParent.order_cash[1].checked == true){
		online_text1.style.display = 'none';
		online_text2.style.display = 'none';
		online_text3.style.display = 'none';
//		card_text1.style.display = '';
//		card_select_view();
	}else if (document.frmParent.order_cash[2].checked == true){
		online_text1.style.display = '';
		online_text2.style.display = '';
		online_text3.style.display = '';
//		card_text1.style.display = 'none';
//		card_text2.style.display = 'none';
	}

}
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();}

        var countn  = document.frmParent.countn.value
	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.order_cash[2].checked == true && document.frmParent.tprice.value >= 100000 && document.frmParent.tfg.value == 1) {

		if(document.frmParent.jumin_1.value == "" || document.frmParent.jumin_2.value == "") {

			alert(" ÁÖ¹Îµî·Ï¹øÈ£°¡ ÀÔ·ÂµÇÁö ¾Ê¾Ò½À´Ï´Ù.\n\n ÀÔ·ÂÇÏ½Å °³ÀÎÁ¤º¸´Â Áõ±Ç¹ß±ÞÀ» À§ÇØ\n\n ÇÊ¿äÇÑ Á¤º¸ÀÌ¸ç ´Ù¸¥ ¿ëµµ·Î »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.               ");
			return;
		}
	}

   		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
	






		for (i=0; i<frmParent.tr_name.length; i++)
		{
			if(frmParent.tr_name[i].checked == true)
			{
				tr_name = frmParent.tr_name[i].value;
                Tprice = tr_name.split("-")[1]	
				break;
			}
		}

  





	// ÀÏ´Ü »óÇ°ÃÑ±Ý¾×
	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]	
	

		for (i=0; i<frmParent.tr_name.length; i++)
		{
			if(frmParent.tr_name[i].checked == true)
			{
				tr_name = frmParent.tr_name[i].value;
                Tprice = tr_name.split("-")[1]	
				break;
			}
		}


	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(Tprice);
		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 = '';
	}
}


// ÀÔ·ÂÁ¤º¸ 
function usafe(usafe_fg) 
{
	if(usafe_fg != "1") 
	{ 
			document.frmParent.jumin_1.readOnly = true;
			document.frmParent.jumin_2.readOnly = true;
			document.frmParent.jumin_1.style.backgroundColor="#E3E3E3";
			document.frmParent.jumin_2.style.backgroundColor="#E3E3E3";
	}
	else {
			document.frmParent.jumin_1.readOnly = false;
			document.frmParent.jumin_2.readOnly = false;
			document.frmParent.jumin_1.style.backgroundColor="#FFFFFF";
			document.frmParent.jumin_2.style.backgroundColor="#FFFFFF";
	} 
}

function showPicture(src) {
  var imgObj = new Image();
  imgObj.src = src;
  var wopt = "scrollbars=no,status=no,resizable=no";
  wopt += ",width=" + imgObj.width;
  wopt += ",height=" + imgObj.height;
  var wbody = "<head><title>°³ÀÎÁ¤º¸ µ¿ÀÇ¾È³»</title>";
  wbody += "<"+"script language='javascript'>";
  wbody += "function finalResize(){";
  wbody += "  var oBody=document.body;";
  wbody += "  var oImg=document.images[0];";
  wbody += "  var xdiff=oImg.width-oBody.clientWidth;";
  wbody += "  var ydiff=oImg.height-oBody.clientHeight;";
  wbody += "  window.resizeBy(xdiff,ydiff);";
  wbody += "}";
  wbody += "</"+"script>";
  wbody += "</head>";
  wbody += "<body onLoad='finalResize()' style='margin:0'>";
  wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
  wbody += "</body>";
  winResult = window.open("about:blank","",wopt);
  winResult.document.open("text/html", "replace");
  winResult.document.write(wbody);
  winResult.document.close();
  return;
}

//	ÆË¾÷
function popup(width, height, left, top, url, name, scroll)
{
	window.open(url,name,'height='+ height +', width ='+ width +',left='+ left +',top='+ top +', scrollbars='+ scroll +',resizable=no,menubar=no,toolbar=no,location=no,status=yes');
}