function checkform(){
if(ListItemForSale.Hotel_City.value=='' && ListItemForSale.Hotel_CityP.value==''){
alert("请输入你所要查询城市位置！");
ListItemForSale.Hotel_City.focus();
return false;
}
if(ListItemForSale.start_time.value=='点击选择日期'){
alert("请选择入住日期！");
ListItemForSale.start_time.focus();
return false;
}
if(ListItemForSale.end_time.value=='点击选择日期'){
alert("请选择退房日期！");
ListItemForSale.end_time.focus();
return false;
}

 if(GetDayDiff(ListItemForSale.start_time.value, ListItemForSale.end_time.value) > 20){
	alert("入住时间段不能超过20天!");
	return false;
 }

  return true;
}


function GetDayDiff(b, e){
	if(null == b || b.length < 0 || null == e || e.length < 0){
		return 0;
	}

	var bs = b.split("-");
	var es = e.split("-");

	if(bs.length < 3 || es.length < 3){
		return 0;
	}

	var dayMS = 24*60*60*1000;
	var dA = new Date(bs[0], bs[1], bs[2]);
	var dB = new Date(es[0], es[1], es[2]);
	return (dB.getTime() - dA.getTime()) / dayMS;	
}
	
