﻿
	function checkDate(){
		if(trim(document.forms[0].startDate.value)!= "" && !isDate(document.forms[0].startDate.value))
		{
			showDateFormatError("出发日期",document.forms[0].startDate);
			return false;
		}
		if(trim(document.forms[0].endDate.value)!= "" && !isDate(document.forms[0].endDate.value))
		{
			showDateFormatError("出发日期",document.forms[0].endDate);
			return false;
		}
		if(trim(document.forms[0].startDate.value)!="" &&trim(document.forms[0].endDate.value)!="" 
			&&document.forms[0].endDate.value <document.forms[0].startDate.value){
			showError(ERROR_TODATE,document.forms[0].endDate);
			return false;
		}
		return true;
	}
		var request = 
		{ 
		QueryString : function(val) 
		{ 
		var uri = window.location.search; 
		var re = new RegExp("" +val+ "=([^&?]*)", "ig"); 
		return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null); 
		} 
		} 
		//调用方法获得参数
		var startDate = "";
		var endDate = "";
		if(request.QueryString("startDate") != null){
			document.getElementById("startDate").value = request.QueryString("startDate");
		}
		if(request.QueryString("endDate") != null){
			document.getElementById("endDate").value  = request.QueryString("endDate");
		}
		query('1')

