//function changeEndHour(){
//	
//	var s = document.cal2.startHour.selectedIndex;
//	var d = document.cal2.durHour.selectedIndex;
//	var num = s + d;
//
//	if( num > document.cal2.endHour.options.length-1 )
//		num = num - document.cal2.endHour.options.length;
//	document.cal2.endHour.options[num].selected = true;
//}

//function changeEndMin(){
//	
//	var	s = document.cal2.startMin.selectedIndex;
//	var d = document.cal2.durMin.selectedIndex;
//	var num = s + d;
//
//	if( num > document.cal2.endMin.options.length-1) {
//		num = num - document.cal2.endMin.options.length;
//		var curSel = document.cal2.endHour.selectedIndex+1;
//		if ( curSel >= document.cal2.endHour.options.length )
//			curSel = 0;
//		document.cal2.endHour.options[curSel].selected = true
//	}
//	document.cal2.endMin.options[num].selected = true;
//}

//function _changeEndHour(){
//	changeEndHour()
//	changeEndMin()
//}

//function _changeEndMin(){
//	changeEndMin()
//}

//function changeDurHour(){
//	
//	var s = document.cal2.startHour.selectedIndex ;
//	var e = document.cal2.endHour.selectedIndex ;


//	var num = e - s ;

//	if( document.cal2.startMin.selectedIndex > document.cal2.endMin.selectedIndex )
//		num--;

//	if( num < 0 )
//		num += 24
//	document.cal2.durHour.options[num].selected = true;
//}

//function changeDurMin(){
//	
//	var num = document.cal2.endMin.selectedIndex - document.cal2.startMin.selectedIndex;
//	var num1 = document.cal2.endHour.selectedIndex - document.cal2.startHour.selectedIndex;
//
//	if( num1 < 0 )
//		num1 += 24;
//	document.cal2.durHour.options[num1].selected = true;
//
//	if( num<0 && document.cal2.durHour.selectedIndex > 0 ){
//		document.cal2.durHour.options[document.cal2.durHour.selectedIndex - 1].selected = true;
//		num = num + document.cal2.durMin.options.length;
//	}else if( num < 0 ){
//		num = 0;
//		document.cal2.endMin.options[document.cal2.startMin.selectedIndex].selected = true;
//	}
//	document.cal2.durMin.options[num].selected = true;
//}

function checkForm(theForm) {

	if (isField(theForm.title.value) < 1) {
                alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }

	if (isField(theForm.desc.value) < 1) {
                alert("³»¿ëÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }
	if (isField(theForm.position.value) < 1) {
                alert("Àå¼Ò¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }        
	if (isField(theForm.cc_name.value) < 1) {
                alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }
	if (isField(theForm.cc_email.value) < 1) {
                alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }   
	if (isField(theForm.cc_telno.value) < 1) {
                alert("ÀüÈ­¹øÈ£(¿¬¶ôÃ³)¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }          

	//changeEndHour()
	//changeEndMin()

	return true;
	}

function checkForm2(theForm) {


	if (isField(theForm.title.value) < 1) {
                alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }

	if (isField(theForm.desc.value) < 1) {
                alert("³»¿ëÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }
        if (isField(theForm.position.value) < 1) {
                alert("Àå¼Ò¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }    
	if (isField(theForm.cc_passwd.value) < 1) {
                alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }
	if (isField(theForm.cc_name.value) < 1) {
                alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }
	if (isField(theForm.cc_email.value) < 1) {
                alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }   
	if (isField(theForm.cc_telno.value) < 1) {
                alert("ÀüÈ­¹øÈ£(¿¬¶ôÃ³)¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
                return false;
        }              
	//changeEndHour()
	//changeEndMin()


	return true;
	}


	function isField(keyword) {
		var st_num,key_len;
		st_num = keyword.indexOf(" ");	
		while (st_num != -1){
			keyword = keyword.replace(" ", "");
			st_num  = keyword.indexOf(" ");
			}
		key_len=keyword.length;
		return key_len;
	}

	function Delete(cc_id) {
		if (confirm('\nÇØ´çÀÏÁ¤À» Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î? ')) {
			location.href="cal_process.asp?cp_type=del&cc_id="+cc_id;
		}
	}


