
//	document.inNation.adv_univ.value=getCookie("cityName");

function setHotelNationCityID(changeCityName,tchangeCityID){

	if(typeof("inNation")!="undefined"){	
		document.inNation.changeCityName.value=changeCityName;
		document.inNation.city.value=tchangeCityID;
		changeCityID = tchangeCityID;
	}
}

 function DateDiff(sDate1,sDate2){
		var aDate, oDate1, oDate2, iDays;
		aDate = sDate1.split("-");
		oDate1 = new Date(aDate[1] + "-" + aDate[2] + "-" + aDate[0]);
		aDate = sDate2.split("-");
	    oDate2 = new Date(aDate[1] + "-" + aDate[2] + "-" + aDate[0]);
		iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24); //把相差的毫秒数转换为天数
	  	if(iDays>6)
		{
			alert("如果您的入住时间大于一周，请直接与比德公司联系，我们将给您提供最优质的服务！");//
			return false;
		}
		var cityName=document.inNation.changeCityName.value;
		setCookie("cityName",cityName,3,"/",null,null);
		//setCookie("cityName",cityName,3,null,null,null);
		// alert(setCookie("cityName",cityName,3,null,null,null));
		var proop = getCookie("cityName");
		// alert(proop);
		return true;
	}

function submitCheck(objForm)
{
	if(!DateDiff(objForm.strStartDate.value,objForm.strEndDate.value))
		return false;
	if(!checkTime(objForm.strStartDate, objForm.strEndDate))
		return false;
	if(objForm.orderRoomNum.value!='' && !isInt(objForm.orderRoomNum.value))
	{
		alert("您输入的房间数不是数字");
		return false;
	}
	if(objForm.orderPeopleNum.value!='' && !isInt(objForm.orderPeopleNum.value))
	{
		alert("您输入的预定人数不是数字");
		return false;
	}
	if(objForm.priceLow.value!='' && !isInt(objForm.priceLow.value))
	{
		alert("您输入的最低价不是数字");
		return false;
	}
	if(objForm.priceHigh.value!='' && !isInt(objForm.priceHigh.value))
	{
		alert("您输入的最高价不是数字");
		return false;
	}
		
	return true;
}


function tmpCity(){
	//alert("haha123");
	//alert(document.inNation.adv_univ.value);
	//alert(document.inNation.city.value);
	alert(document.inNation.city.value);
}
