function clearForm(){
	document.hp001Form.reset();
}
function bookRoom(){
	strGuest_name=document.hp001Form.strGuest_name.value;
	strRoomtype_id=document.hp001Form.strRoomtype_id.value;
	strPaytype_id=document.hp001Form.strPaytype_id.value;
	strStay_day=document.hp001Form.strStay_day.value;
	strArrive_time=document.hp001Form.strArrive_time.value;
	strBook_user_name=document.hp001Form.strBook_user_name.value;
	strTel=document.hp001Form.strTel.value;
	strBookRoom_Num=document.hp001Form.strBookRoom_Num.value;
	if(isNull(strGuest_name)){
		alert("请输入客人姓名");
		return false;
	}
	if(strRoomtype_id=="000"){
		alert("请选择房间类型");
		return false;
	}
	if(strPaytype_id=="000"){
		alert("请选择付款方式");
		return false;
	}
	if(isNull(strStay_day)){
		alert("请输入入住天数");
		return false;
	}
	if(isNull(strArrive_time)){
		alert("请输入抵店日期");
		return false;
	}
	if(isNull(strBook_user_name)){
		alert("请输入订房人名");
		return false;
	}
	if(isNull(strTel)){
		alert("请输入联系电话");
		return false;
	}
	if(isNull(strBookRoom_Num)){
		alert("请输入预定间数");
		return false;
	}
	if(!isInteger(strStay_day)){
		alert("入住天数只能为数字");
		return false;
	}
	if(!isInteger(strBookRoom_Num)){
		alert("预定间数只能为数字");
		return false;
	}
	if(!checkPhone(strTel)){
		return false;
	}
	document.hp001Form.ACT.value="book";
	document.hp001Form.action="../../hp001.do";
	document.hp001Form.submit();
}
function getRoomPrice(){
	var strRoomTypeId=document.hp001Form.strRoomtype_id.value;
	send_request("../../hp001.do?ACT=getRoomPrice&roomtype_id="+strRoomTypeId+"&fresh=" + Math.random(),processGetRoomPrice);
}
// 处理返回信息的函数
function processGetRoomPrice() {
    if (http_request.readyState == 4) { // 判断对象状态
        if (http_request.status == 200) { // 信息已经成功返回，开始处理信息
        	document.hp001Form.strRoomPrice.value=http_request.responseText;
        } else { //页面不正常
            alert("您所请求的页面有异常。");
        }
    }
}
