function HotelSearch()
{
	if(document.Form1.SearchType[0].checked)
	{
		var CyLy = 0;
		for(var i=0;i<document.Form1.CyLy.length;i++)
		{
			if(document.Form1.CyLy[i].checked)
			{
				CyLy = 1;	
			}
		}
		if(CyLy == 0 && document.Form1.lbxCy.value == "")
		{
			alert("请选择所在城市");
			return false;
		}
		if(document.Form1.starttime.value == "" )
		{
			alert("请选择入住时间");
			return false;
		}
		if( document.Form1.deptime.value == "")
		{
			alert("请选择离店时间");
			return false;
		}
		var strStartTime = document.Form1.starttime.value;
		aryStartTime = strStartTime.split("-");
		if(aryStartTime[1].length == 1)
		{
			strStartTime = aryStartTime[0] + "0" + aryStartTime[1];
		}
		else
		{
			strStartTime = aryStartTime[0] + aryStartTime[1];
		}
		if(aryStartTime[2].length == 1)
		{
			strStartTime = strStartTime + "0" + aryStartTime[2];
		}
		else
		{
			strStartTime = strStartTime + aryStartTime[2];
		}
		
		var strdeptime = document.Form1.deptime.value;
		arydeptime = strdeptime.split("-");
		if(arydeptime[1].length == 1)
		{
			strdeptime = arydeptime[0] + "0" + arydeptime[1];
		}
		else
		{
			strdeptime = arydeptime[0] + arydeptime[1];
		}
		if(arydeptime[2].length == 1)
		{
			strdeptime = strdeptime + "0" + arydeptime[2];
		}
		else
		{
			strdeptime = strdeptime + arydeptime[2];
		}
		if(strStartTime >  strdeptime )
		{
			alert("您选择的入住时间大于离店时间，请重新选择");
			return false;
		}
	}
	if(document.Form1.SearchType[1].checked)
	{
		if(document.Form1.sstarttime.value == "" )
		{
			alert("请选择入住时间");
			return false;
		}
		if( document.Form1.sdeptime.value == "")
		{
			alert("请选择离店时间");
			return false;
		}
		
		var strStartTime = document.Form1.sstarttime.value;
		aryStartTime = strStartTime.split("-");
		if(aryStartTime[1].length == 1)
		{
			strStartTime = aryStartTime[0] + "0" + aryStartTime[1];
		}
		else
		{
			strStartTime = aryStartTime[0] + aryStartTime[1];
		}
		if(aryStartTime[2].length == 1)
		{
			strStartTime = strStartTime + "0" + aryStartTime[2];
		}
		else
		{
			strStartTime = strStartTime + aryStartTime[2];
		}
		
		var strdeptime = document.Form1.sdeptime.value;
		arydeptime = strdeptime.split("-");
		if(arydeptime[1].length == 1)
		{
			strdeptime = arydeptime[0] + "0" + arydeptime[1];
		}
		else
		{
			strdeptime = arydeptime[0] + arydeptime[1];
		}
		if(arydeptime[2].length == 1)
		{
			strdeptime = strdeptime + "0" + arydeptime[2];
		}
		else
		{
			strdeptime = strdeptime + arydeptime[2];
		}
		if(strStartTime >  strdeptime)
		{
			alert("您选择的入住时间大于离店时间，请重新选择");
			return false;
		}
	}
	if(document.Form1.SearchType[2].checked)
	{
		if(document.Form1.bstarttime.value == "" )
		{
			alert("请选择入住时间");
			return false;
		}
		if( document.Form1.bdeptime.value == "")
		{
			alert("请选择离店时间");
			return false;
		}
		
		var strStartTime = document.Form1.bstarttime.value;
		aryStartTime = strStartTime.split("-");
		if(aryStartTime[1].length == 1)
		{
			strStartTime = aryStartTime[0] + "0" + aryStartTime[1];
		}
		else
		{
			strStartTime = aryStartTime[0] + aryStartTime[1];
		}
		if(aryStartTime[2].length == 1)
		{
			strStartTime = strStartTime + "0" + aryStartTime[2];
		}
		else
		{
			strStartTime = strStartTime + aryStartTime[2];
		}
		
		var strdeptime = document.Form1.bdeptime.value;
		arydeptime = strdeptime.split("-");
		if(arydeptime[1].length == 1)
		{
			strdeptime = arydeptime[0] + "0" + arydeptime[1];
		}
		else
		{
			strdeptime = arydeptime[0] + arydeptime[1];
		}
		if(arydeptime[2].length == 1)
		{
			strdeptime = strdeptime + "0" + arydeptime[2];
		}
		else
		{
			strdeptime = strdeptime + arydeptime[2];
		}
		if(strStartTime >  strdeptime)
		{
			alert("您选择的入住时间大于离店时间，请重新选择");
			return false;
		}
	}
	Form1.action='HotelSearchList.aspx';
	Form1.target='_blank';
	Form1.submit();
}
