

		function chk_data() {
			if (document.upload_doc.out_dept.value=="") {
				window.alert("請填寫發行單位");
				document.upload_doc.out_dept.focus();
				return false;
			}
			if (document.upload_doc.doc_type[0].checked==false && document.upload_doc.doc_type[1].checked==false) {
				window.alert("請選擇文件的屬性" );
				return false;
			}
			if (document.upload_doc.doc_type[0].checked==true && document.upload_doc.doc_type[1].checked==true) {
				window.alert("請確認文件的屬性，請選擇一項" );
				return false;
			}
			if (document.upload_doc.doc_date.value=="") {
				window.alert("請填寫新版次發行日");
				document.upload_doc.doc_date.focus();
				return false;
			}	

			if (document.upload_doc.doc_name.value=="") {
				window.alert("請填寫文件名稱");
				document.upload_doc.doc_name.focus();
				return false;
			}
			
			if (document.upload_doc.doc_no.value=="") {
				window.alert("請填寫文件編號");
				document.upload_doc.doc_no.focus();
				return false;
			}			
			
			var num = document.upload_doc.version.value;
			if (isNaN(num)) {
				alert("請填寫版次--數字格式");
				document.upload_doc.version.value="";
				document.upload_doc.version.focus();
				return false;
			} else {
				if (num.indexOf(".") == -1 ) {
					if (num.length >1 ) {
						if (num.substring(0,1) == 0) {
							document.upload_doc.version.value = num.substring(1,num.length);
						}	
					}
				} else {
						alert("請輸入整數格式");
						document.upload_doc.version.value="";
						document.upload_doc.version.focus();	
						return false;		
						}	
			}
			if (document.upload_doc.rec_dept.value=="") {
				window.alert("請填寫受文者");
				document.upload_doc.rec_dept.focus();
				return false;
			}
				
			if (document.upload_doc.doc_subject.value=="") {
				window.alert("請填寫發文主旨");
				document.upload_doc.doc_subject.focus();
				return false;
			}
			
			if (document.upload_doc.doc_reason.value=="") {
				window.alert("請填寫理由或依據");
				document.upload_doc.doc_reason.focus();
				return false;
			}	
			
			if (document.upload_doc.doc_file.value=="") {
				window.alert("請選擇對應檔案");
				document.upload_doc.doc_file.focus();
				return false;
			}	
					
		}
		
		function chk_but() {
			
			var val = document.upload_doc.doc.options[document.upload_doc.doc.selectedIndex].value;
			
			//window.alert(val);
			
		}

		function opn_win(d_type) {
			window.open('files.asp?tpe=' + d_type,'查詢','width=230,height=300,scrollbars=yes')
		}

		function opn_win2(va) {
			window.open('search_dept.asp?val='+ va ,'','width=150,height=300,scrollbars=yes,top=200,left=650')
		}
		
		function mOvr(src,clrOver){
			if (!src.contains(event.fromElement)){src.style.cursor = "hand";src.background = clrOver;}
		} 
		
		function mOut(src,clrIn){
			if (!src.contains(event.toElement)){src.style.cursor = "default";src.background = clrIn;}
		
		}
	
		function ResetForm(){

		if (window.confirm('你確定你要清除通知事項嗎？')){
			frames.note.focus();
	 		frames.note.document.body.innerHTML = ''; 
	 		return true;
	 	} 
	 		return false;		
	 	}
		
		function FormatText(command, option){
			frames.note.focus();
			frames.note.document.execCommand(command, false, option);
			frames.note.focus();
		}

		function div_unshow() {
			s1.style.display = "none";
		}
		
		