function checkserch()
{
var stratTime =document.all("startdate").value;
var endTime = document.all("enddate").value;
var arr1=stratTime.split("-");
var arr2=endTime.split("-");
if((stratTime == '' & endTime != '') || (stratTime != '' && endTime == ''))
{
return false;
}
var a1;
var a2;
try
{
a1=new Date(arr1[0],arr1[1],arr1[2]);
a2=new Date(arr2[0],arr2[1],arr2[2]);
if(a1>a2)
{
alert("起始日期不能大于终止日期!");
return false;
}
}
catch(e)
{
return false;
}
}