function  estimate(){
	yy = new Array(0,31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
	
	selectYear = document.contactForm._estimateYear.value;
	selectMon = document.contactForm._estimateMon.selectedIndex;
	selectDay = document.contactForm._estimateDay.selectedIndex;
	var now = new Date();	//現在の年月日を取得
	var nowYear = now.getFullYear();	//年の取得
	var nowMon = 1 + now.getMonth();	//月の所得
	var nowDay = now.getDate();			//日の取得
	var yearflg = true;
	var monflg = true;
	var dayflg = true;
	
	if((selectYear % 4 == 0 && selectYear % 100 != 0) ||selectYear % 400 == 0){
		yy[1] = 29;
	}
	
	/*チェックボックスにチェックが入っているかのチェック*/
	if(document.contactForm._estimateChk.checked == true){
		return true;
	}else{
		//年の記入があるか
		if(selectYear == ""){
			yearflg = false;
		}
		//月の記入があるか
		if(selectMon == ""){
			monflg = false;
		}
		//日の記入があるか
		if(selectDay == ""){
			dayflg = false;
		}

		//チェックがなく、年月日に記入があるが全て記入されていない場合
		if(yearflg != true && monflg != true && dayflg != true){
			alert("見積期限を記入して下さい。");
			return false;
		}
		//チェックがなく、年月日全て記入されていない場合
		else if(yearflg != true || monflg != true || dayflg != true){
			alert("見積期限の年月日を記入して下さい。");
			return false;
		}
		
		//チェックがなく、年月日全てに記入がある場合
		else{
			//年の判定
			if(selectYear < nowYear){
				alert("見積期限の年の項目に不備あります。");
				return false;
			}
			//月の判定
			if(selectYear == nowYear && selectMon < nowMon){
				alert("見積期限の月の項目に不備あります。");
				return false;;
			}
			//日の判定
			if(selectYear == nowYear && selectMon == nowMon && selectDay < nowDay){
				alert("見積期限の日の項目に不備あります。");
				return false;
			}
			//各月の末日までの日数か判定
			if(selectDay > yy[selectMon]){
				alert("見積期限の日の項目に不備があります。");
				return false;
			}
			return true;
		}
	}
}
