function productStep1(str){
	var theForm = document.form;
	var frmSpace = /^\s/;
	var str

	if(theForm.a_curCatName.value==false)
	{
		alert("Ä«Å×°í¸®¸¦ ¼±ÅÃ ÇØÁÖ¼¼¿ä.")
		theForm.code1.focus();
		return;
	}
	
	if ((childcategoryCheck1!=0) && (childcategoryCheck2!=0) && (b2==0))
	{
		alert('2Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code2.focus();
		return;
	}
	if ((childcategoryCheck2!=0) && (childcategoryCheck3!=0) && (b3==0))
	{
		alert('3Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code3.focus();
		return;
	}
	if ((childcategoryCheck3!=0) && (childcategoryCheck4!=0) && (b4==0))
	{
		alert('4Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code4.focus();
		return;
	}

	if(theForm.a_title.value==false)
	{
		alert("°­ÀÇ Á¦¸ñÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_title.focus();
		return;
	}	

	if(theForm.a_lec_date.value==false)
	{
		alert("¼ö°­ ±â°£À» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_lec_date.focus();
		return;
	}	

	if(theForm.a_lec_sum.value==false)
	{
		alert("°­ÀÇ °³¼ö¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä")
		theForm.a_lec_sum.focus();
		return;
	}	

	if(theForm.a_lec_price.value==false)
	{
		alert("¼ö°­·á¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_lec_price.focus();
		return;
	}	

	if(theForm.a_teacher.value==false)
	{
		alert("´ã´ç °­»ç¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.")
		theForm.a_teacher.focus();
		return;
	}	


	if(theForm.a_media_server.value==false)
	{
		alert("¹Ìµð¾î¼­¹ö¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_media_server.focus();
		return;
	}	

	if(theForm.a_media_start.value==false)
	{
		alert("°Ô½ÃÁöÁ¡À» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_media_start.focus();
		return;
	}	

	if(theForm.a_curCatCode.value==false)
	{
		alert("Ä«Å×°í¸®¸¦ ¼±ÅÃ ÇØÁÖ¼¼¿ä.")
		theForm.code1.focus();
		return;
	}

	theUniqueID = (new Date()).getTime() % 1000000000;
	theForm.action = "lecture_control_proc.asp?Input_Type="+str
	theForm.submit();
}


function productStep2(str){
	var theForm = document.form;
	var frmSpace = /^\s/;
	var str

	if(theForm.a_curCatName.value==false)
	{
		alert("Ä«Å×°í¸®¸¦ ¼±ÅÃ ÇØÁÖ¼¼¿ä.")
		theForm.code1.focus();
		return;
	}
	
	if ((childcategoryCheck1!=0) && (childcategoryCheck2!=0) && (b2==0))
	{
		alert('2Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code2.focus();
		return;
	}
	if ((childcategoryCheck2!=0) && (childcategoryCheck3!=0) && (b3==0))
	{
		alert('3Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code3.focus();
		return;
	}
	if ((childcategoryCheck3!=0) && (childcategoryCheck4!=0) && (b4==0))
	{
		alert('4Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code4.focus();
		return;
	}

	if(theForm.a_title.value==false)
	{
		alert("°­ÀÇ Á¦¸ñÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_title.focus();
		return;
	}	

	if(theForm.a_lec_date.value==false)
	{
		alert("¼ö°­ ±â°£À» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_lec_date.focus();
		return;
	}	

	if(theForm.a_lec_price.value==false)
	{
		alert("¼ö°­·á¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_lec_price.focus();
		return;
	}	

	if(theForm.a_teacher.value==false)
	{
		alert("´ã´ç °­»ç¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.")
		theForm.a_teacher.focus();
		return;
	}	


	if(theForm.a_media_server.value==false)
	{
		alert("¹Ìµð¾î¼­¹ö¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_media_server.focus();
		return;
	}	

	if(theForm.a_media_start.value==false)
	{
		alert("°Ô½ÃÁöÁ¡À» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_media_start.focus();
		return;
	}	

	if(theForm.a_curCatCode.value==false)
	{
		alert("Ä«Å×°í¸®¸¦ ¼±ÅÃ ÇØÁÖ¼¼¿ä.")
		theForm.code1.focus();
		return;
	}

	theUniqueID = (new Date()).getTime() % 1000000000;
	theForm.action = "lecture_plist_proc2.asp?Input_Type="+str
	theForm.submit();
}


function productStep3(str){
	var theForm = document.form;
	var frmSpace = /^\s/;
	var str

	if(theForm.a_curCatName.value==false)
	{
		alert("Ä«Å×°í¸®¸¦ ¼±ÅÃ ÇØÁÖ¼¼¿ä.")
		theForm.code1.focus();
		return;
	}
	
	if ((childcategoryCheck1!=0) && (childcategoryCheck2!=0) && (b2==0))
	{
		alert('2Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code2.focus();
		return;
	}
	if ((childcategoryCheck2!=0) && (childcategoryCheck3!=0) && (b3==0))
	{
		alert('3Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code3.focus();
		return;
	}
	if ((childcategoryCheck3!=0) && (childcategoryCheck4!=0) && (b4==0))
	{
		alert('4Â÷ Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
		theForm.code4.focus();
		return;
	}

	if(theForm.a_name.value==false)
	{
		alert("±³Àç¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_name.focus();
		return;
	}	

	if(theForm.a_auth.value==false)
	{
		alert("ÀúÀÚ¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_auth.focus();
		return;
	}	

	if(theForm.a_lec_price.value==false)
	{
		alert("°¡°ÝÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_lec_price.focus();
		return;
	}	

	if(theForm.a_curCatCode.value==false)
	{
		alert("Ä«Å×°í¸®¸¦ ¼±ÅÃ ÇØÁÖ¼¼¿ä.")
		theForm.code1.focus();
		return;
	}

	theUniqueID = (new Date()).getTime() % 1000000000;
	theForm.action = "lecture_book_proc.asp?Input_Type="+str
	theForm.submit();
}


function a_sort(str){
	var theForm = document.form;
	var frmSpace = /^\s/;
	var str

//	if(theForm.a_sort.value==false)
//	{
//		alert("Á¤·Ä ¼ø¼­¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
//		theForm.a_sort.focus();
//		return;
//	}

	theForm.action = "lecture_control_proc.asp?Input_Type="+str
	theForm.submit();
}


function productStep4(str){
	var theForm = document.form;
	var frmSpace = /^\s/;
	var str

	if(theForm.t_id.value==false)
	{
		alert("¾ÆÀÌµð¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.")
		theForm.t_id.focus();
		return;
	}	

	if(theForm.t_name.value==false)
	{
		alert("°­»ç¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.t_name.focus();
		return;
	}	

	if(theForm.t_career.value==false)
	{
		alert("ÁÖ¿ä°æ·ÂÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.t_career.focus();
		return;
	}	

	theUniqueID = (new Date()).getTime() % 1000000000;
	theForm.action = "lecture_teacher_proc.asp?Input_Type="+str
	theForm.submit();
}


function isNumber(obj) {
    if (isNaN(obj.value)) {
        alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.");
        obj.focus();
        obj.select();
    }
}

function ChkMoney()
{
	var lec_price = document.form.a_lec_price.value;
	var lec_dis = document.form.a_lec_dis.value;
	var lec_sale = document.form.a_lec_sale.value;

	if(lec_price == "") lec_price = 0;
	if(lec_dis == "") lec_dis = 0;
	if(lec_sale == "") lec_sale = 0;

	if(CheckNum(lec_price) == false) 
	{
		alert("ÆÇ¸Å°¡¸¦ ¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		document.form.a_lec_price.focus();
		document.form.a_lec_price.select();
		return false;
	}

	if(CheckNum(lec_dis) == false) 
	{
		alert("¸¶ÁøÀ²Àº ¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		document.form.a_lec_dis.focus();
		document.form.a_lec_dis.select();
		return false;
	}

	if(lec_price == 0) lec_sale = 0;
	else lec_sale = parseInt(lec_price) - ((parseInt(lec_price)/100)*parseInt(lec_dis))
     lec_sale = parseInt(lec_sale/100 )*100;
	 document.form.a_lec_sale.value = lec_sale ;
}

function CheckNum(Data) {
	var nochk='01234567890.'

	for (i=0; i<Data.length; i++){
	if(nochk.indexOf(Data.substring(i,i+1)) < 0)
	{
		return false;
		}
	}
}

function a_sub(str)
{

	var theForm = document.ifForm;
	var frmSpace = /^\s/;
	var str

	if(theForm.a_submenu.value==false)
	{
		alert("°ú¸ñÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_submenu.focus();
		return;
	}	

	if(theForm.a_code.value==false)
	{
		alert("ÄÚµå¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_code.focus();
		return;
	}	

	if(theForm.a_num.value==false)
	{
		alert("Á¤·Ä¼ø¼­¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
		theForm.a_num.focus();
		return;
	}	

	theForm.action = "lecture_control_proc.asp?Input_Type="+str
	theForm.submit();
}


