
	function moveValue(srcEle,targetEle) {
		var len = srcEle.options.length;
		var len2 = targetEle.options.length;
		for(i = 0 ; i < len ; i++) {
			if(srcEle.options[i].selected) {
				new_option = new Option(srcEle.options[i].text,srcEle.options[i].value);
				targetEle.options[len2]=new_option;
				len2++;
			}
		}
		remValue(srcEle);
	}

	function remValue(ele) {

		var len = ele.options.length;
		
		for(i = len-1 ; i >= 0 ; i--) {
			
			if(ele.options[i].selected) {
				ele.options[i] = null;
			}
		}
		
	}

	function open_win(u,t,w,h) {
		
		w = window.open(u, t ,"width="+w+",height="+h+",titlebar=no,status=no,toolbar=no,resizable=no,scrollbars=1, menubar=no")
		w.focus();
		
	}

	
	function setCheckBox(obj){
		if (!obj) 
			return;
		for(i=0;i<obj.length;i++) {
			
			if(obj[i].checked == true) {
				if (obj[i].value == "Y")
					obj[i].value="Y";
			} else {
				obj[i].value="N";
				obj[i].checked=true;
			}
		}
	}
	function setCheckBox2(obj){
		if (!obj) 
			return;
		for(i=0;i<obj.length;i++) {
			
			if(obj[i].checked == true) {
				//obj[i].value="Y";
			} else {
				obj[i].value="";
				obj[i].checked=true;
			}
		}
	}
	function check_form(thisform){
		var chk = true;

		for (var i=0; i<thisform.elements.length; i++) {

			ele = thisform.elements[i];
				
			if(ele.ob == "Y" && ele.value == "") {
				//alert("Enter "+ele.tag_name + " please ");
				
				alert("Fill out the form please ");
				ele.focus(); 
				chk = false;
				break;
				
			}	
				
		}
		return chk;
	}
	function checkJB(thisform){
		
		if(thisform.jb_cnt.value =="0") {
			alert('°øµ¿±¸¸Å ÃÑ ¼ö·®Àº 0 º¸´Ù Ä¿¾ß ÇÕ´Ï´Ù.');
			thisform.jb_cnt.focus();
			return false;	
		}
		
		var start_date = thisform.start_date_year.value +"-"+ thisform.start_date_month.value +"-"+ thisform.start_date_day.value +"-"+ thisform.start_date_hour.value +"-"+ thisform.start_date_min.value;
		var end_date = thisform.end_date_year.value +"-"+ thisform.end_date_month.value +"-"+ thisform.end_date_day.value +"-"+ thisform.end_date_hour.value +"-"+ thisform.end_date_min.value;
		if(thisform.cmd.value == "insert") {
			if(thisform.today.value > start_date) {
				alert('°øµ¿±¸¸Å ½ÃÀÛ ½Ã°£Àº ÇöÀç ½Ã°£ ÀÌÈÄ¿©¾ß ÇÕ´Ï´Ù');
				thisform.start_date_day.focus();
				return false;	
			}
			if(thisform.today.value > end_date) {
				alert('°øµ¿±¸¸Å ¸¶°¨ ½Ã°£Àº ÇöÀç ½Ã°£ ÀÌÈÄ¿©¾ß ÇÕ´Ï´Ù');
				thisform.start_date_day.focus();
				return false;	
			}
		}
		if(start_date >= end_date) {
			alert('°øµ¿±¸¸Å ¸¶°¨½Ã°£Àº ½ÃÀÛ½Ã°£ ÀÌÈÄ¿©¾ß ÇÕ´Ï´Ù. ');
			thisform.end_date_day.focus();
			return false;	
		}
		
		thisform.start_date.value=start_date;
		thisform.end_date.value= end_date;
		
//		if((thisform.start_cnt1.value == "") || (thisform.end_cnt1.value =="") || (thisform.sell_price1.value =="") || (thisform.start_cnt1.value == "") || (thisform.end_cnt1.value =="") || (thisform.sell_price1.value =="") ) {
//			alert("°¡°Ýº¯µ¿ Á¤º¸¸¦ ÀÔ·ÂÇÏ¼¼¿ä, ÃÖ¼ÒÇÑ µÎ°¡Áö ÀÌ»óÀ» ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
//			thisform.end_cnt1.focus();
//		    thisform.end_cnt1.select();
//		    return false;
//		}
//		
//		if( (thisform.start_cnt2.value != "") || (thisform.end_cnt2.value != "") || (thisform.sell_price2.value != "") ) {
//			if( (thisform.start_cnt2.value == "") || (thisform.end_cnt2.value == "") || (thisform.sell_price2.value == "") ) {
//		
//				alert("ºü¶ß¸° Ç×¸ñÀÌ ÀÖ½À´Ï´Ù.");
//				thisform.end_cnt2.focus();
//			    thisform.end_cnt2.select();
//			    return false;
//		    }
//		   
//		}
//		if( (thisform.start_cnt3.value != "") || (thisform.end_cnt3.value != "") || (thisform.sell_price3.value != "") ) {
//			if( (thisform.start_cnt3.value == "") || (thisform.end_cnt3.value == "") || (thisform.sell_price3.value == "") ) {
//		
//				alert("ºü¶ß¸° Ç×¸ñÀÌ ÀÖ½À´Ï´Ù.");
//				thisform.end_cnt3.focus();
//			    thisform.end_cnt3.select();
//			    return false;
//		    }
//		   
//		}
////		if( (thisform.start_cnt4.value != "") || (thisform.end_cnt4.value != "") || (thisform.sell_price4.value != "") ) {
////			if( (thisform.start_cnt4.value == "") || (thisform.end_cnt2.value == "") || (thisform.sell_price4.value == "") ) {
////		
////				alert("ºü¶ß¸° Ç×¸ñÀÌ ÀÖ½À´Ï´Ù.");
////				thisform.end_cnt4.focus();
////			    thisform.end_cnt4.select();
////			    return false;
////		    }
////		   
////		}
//		if( (thisform.start_cnt1.value != "") && isNaN(thisform.start_cnt1.value)) {
//			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
//			thisform.start_cnt1.focus();
//		    thisform.start_cnt1.select();
//		    return false;
//		}
//		if( (thisform.start_cnt2.value != "") && isNaN(thisform.start_cnt2.value)) {
//			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
//			thisform.start_cnt2.focus();
//		    thisform.start_cnt2.select();
//		    return false;
//		}
//		if( (thisform.start_cnt3.value != "") && isNaN(thisform.start_cnt3.value)) {
//			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
//			thisform.start_cnt3.focus();
//		    thisform.start_cnt3.select();
//		    return false;
//		}
////		if( (thisform.start_cnt4.value != "") && isNaN(thisform.start_cnt4.value)) {
////			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
////			thisform.start_cnt4.focus();
////		    thisform.start_cnt4.select();
////		    return false;
////		}
//		if( (thisform.end_cnt1.value != "") && isNaN(thisform.end_cnt1.value)) {
//			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
//			thisform.end_cnt1.focus();
//		    thisform.end_cnt1.select();
//		    return false;
//		}
//		if( (thisform.end_cnt2.value != "") && isNaN(thisform.end_cnt2.value)) {
//			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
//			thisform.end_cnt2.focus();
//		    thisform.end_cnt2.select();
//		    return false;
//		}
//		if( (thisform.end_cnt3.value != "") && isNaN(thisform.end_cnt3.value)) {
//			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
//			thisform.end_cnt3.focus();
//		    thisform.end_cnt3.select();
//		    return false;
//		}
////		if( (thisform.end_cnt4.value != "") && isNaN(thisform.end_cnt4.value)) {
////			alert("¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä");
////			thisform.end_cnt4.focus();
////		    thisform.end_cnt4.select();
////		    return false;
////		}
//		
//		
//		if( (thisform.start_cnt2.value !="") && (   parseInt(document.form.end_cnt1.value)+1 != thisform.start_cnt2.value) ) {
//			alert("¼ö·® ¹üÀ§°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
//			thisform.end_cnt2.focus();
//		    thisform.end_cnt2.select();
//		    return false;
//		}
//		
//		if( (thisform.start_cnt3.value !="") && (   parseInt(document.form.end_cnt2.value)+1 != thisform.start_cnt3.value) ) {
//			alert("¼ö·® ¹üÀ§°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
//			thisform.end_cnt3.focus();
//		    thisform.end_cnt3.select();
//		    return false;
//		}
////		if( (thisform.start_cnt4.value !="") && (   parseInt(document.form.end_cnt3.value)+1 != thisform.start_cnt4.value) ) {
////			alert("¼ö·® ¹üÀ§°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
////			thisform.end_cnt4.focus();
////		    thisform.end_cnt4.select();
////		    return false;
////		}
////		
//		if( (thisform.start_cnt1.value !="") && (thisform.end_cnt1.value !="") ) {
//			if(parseInt(thisform.start_cnt1.value) >= parseInt(thisform.end_cnt1.value) ) {
//				alert("¼ö·® ¹üÀ§°¡ Àß¸ø µÇ¾ú½À´Ï´Ù.");
//				thisform.end_cnt1.focus();
//			    thisform.end_cnt1.select();
//			    return false;
//			}
//		}
//		if( (thisform.start_cnt2.value !="") && (thisform.end_cnt2.value !="") ) {
//			if(parseInt(thisform.start_cnt2.value) >= parseInt(thisform.end_cnt2.value) ) {
//				alert("¼ö·® ¹üÀ§°¡ Àß¸ø µÇ¾ú½À´Ï´Ù.");
//				thisform.end_cnt2.focus();
//			    thisform.end_cnt2.select();
//			    return false;
//			}
//		}
//		if( (thisform.start_cnt3.value !="") && (thisform.end_cnt3.value !="") ) {
//			if(parseInt(thisform.start_cnt3.value) >= parseInt(thisform.end_cnt3.value) ) {
//				alert("¼ö·® ¹üÀ§°¡ Àß¸ø µÇ¾ú½À´Ï´Ù.");
//				thisform.end_cnt3.focus();
//			    thisform.end_cnt3.select();
//			    return false;
//			}
//		}
////		if( (thisform.start_cnt4.value !="") && (thisform.end_cnt4.value !="") ) {
////			if(parseInt(thisform.start_cnt4.value) >= parseInt(thisform.end_cnt4.value) ) {
////				alert("¼ö·® ¹üÀ§°¡ Àß¸ø µÇ¾ú½À´Ï´Ù.");
////				thisform.end_cnt4.focus();
////			    thisform.end_cnt4.select();
////			    return false;
////			}
////		}
//		
//		
//		
//		if( (thisform.sell_price1.value !="") && (thisform.sell_price2.value !="") ) {
//			if(parseInt(thisform.sell_price1.value) <= parseInt(thisform.sell_price2.value) ) {
//				alert("ÆÇ¸Å ¼ö·®ÀÌ ¸¹À» ¼ö·Ï °¡°ÝÀº ³»·Á°¡¾ß ÇÕ´Ï´Ù.");
//				thisform.sell_price2.focus();
//			    thisform.sell_price2.select();
//			    return false;
//			}
//		}
//		if( (thisform.sell_price2.value !="") && (thisform.sell_price3.value !="") ) {
//			if(parseInt(thisform.sell_price2.value) <= parseInt(thisform.sell_price3.value) ) {
//				alert("ÆÇ¸Å ¼ö·®ÀÌ ¸¹À» ¼ö·Ï °¡°ÝÀº ³»·Á°¡¾ß ÇÕ´Ï´Ù.");
//				thisform.sell_price3.focus();
//			    thisform.sell_price3.select();
//			    return false;
//			}
//		}
////		if( (thisform.sell_price3.value !="") && (thisform.sell_price4.value !="") ) {
////			if(parseInt(thisform.sell_price3.value) <= parseInt(thisform.sell_price4.value) ) {
////				alert("ÆÇ¸Å ¼ö·®ÀÌ ¸¹À» ¼ö·Ï °¡°ÝÀº ³»·Á°¡¾ß ÇÕ´Ï´Ù.");
////				thisform.sell_price4.focus();
////			    thisform.sell_price4.select();
////			    return false;
////			}
////		}
//		
//		if(  (thisform.end_cnt1.value != "") && (parseInt(thisform.end_cnt1.value) > parseInt(thisform.jb_cnt.value) ) ) {
//			alert(thisform.end_cnt1.value+"ÆÇ¸Å ¼ö·® ¹üÀ§´Â ÃÑ °øµ¿±¸¸Å ¼ö·®º¸´Ù Å¬ ¼ö ¾ø½À´Ï´Ù."+thisform.jb_cnt.value);
//			thisform.end_cnt1.focus();
//		    thisform.end_cnt1.select();
//		    return false;
//		}
//		if(  (thisform.end_cnt2.value != "") && (parseInt(thisform.end_cnt2.value) > parseInt(thisform.jb_cnt.value) ) ) {
//			alert("ÆÇ¸Å ¼ö·® ¹üÀ§´Â ÃÑ °øµ¿±¸¸Å ¼ö·®º¸´Ù Å¬ ¼ö ¾ø½À´Ï´Ù.");
//			thisform.end_cnt2.focus();
//		    thisform.end_cnt2.select();
//		    return false;
//		}
//		if(  (thisform.end_cnt3.value != "") && (parseInt(thisform.end_cnt3.value) > parseInt(thisform.jb_cnt.value) ) ) {
//			alert("ÆÇ¸Å ¼ö·® ¹üÀ§´Â ÃÑ °øµ¿±¸¸Å ¼ö·®º¸´Ù Å¬ ¼ö ¾ø½À´Ï´Ù.");
//			thisform.end_cnt3.focus();
//		    thisform.end_cnt3.select();
//		    return false;
//		}
////		if(  (thisform.end_cnt4.value != "") && (parseInt(thisform.end_cnt4.value) > parseInt(thisform.jb_cnt.value) ) ) {
////			alert("ÆÇ¸Å ¼ö·® ¹üÀ§´Â ÃÑ °øµ¿±¸¸Å ¼ö·®º¸´Ù Å¬ ¼ö ¾ø½À´Ï´Ù.");
////			thisform.end_cnt4.focus();
////		    thisform.end_cnt4.select();
////		    return false;
////		}
//		
////		if(   (thisform.end_cnt1.value != thisform.jb_cnt.value) && (thisform.end_cnt2.value != thisform.jb_cnt.value) && (thisform.end_cnt3.value != thisform.jb_cnt.value) && (thisform.end_cnt4.value != thisform.jb_cnt.value) ) {
////			alert("ÆÇ¸Å ¼ö·® ¹üÀ§°¡ ÃÑ °øµ¿±¸¸Å ¼ö·®À» ÃæÁ·ÇÏÁö ¸øÇÕ´Ï´Ù.");
////			thisform.end_cnt1.focus();
////		    thisform.end_cnt1.select();
////		    return false;
////		}
//		
//		if(   (thisform.end_cnt1.value != thisform.jb_cnt.value) && (thisform.end_cnt2.value != thisform.jb_cnt.value) && (thisform.end_cnt3.value != thisform.jb_cnt.value)) {
//			alert("ÆÇ¸Å ¼ö·® ¹üÀ§°¡ ÃÑ °øµ¿±¸¸Å ¼ö·®À» ÃæÁ·ÇÏÁö ¸øÇÕ´Ï´Ù.");
//			thisform.end_cnt1.focus();
//		    thisform.end_cnt1.select();
//		    return false;
//		}
		
		
		return true;
	}
