﻿// JScript 文件
var objAjaxPage = "index";
function index_menu(sValue,iCount,sObj1,sImg,sObj2,sObj3)
{
    document.getElementById(sObj1).style.backgroundImage = "url(/images/" + sImg + sValue + ".gif)";
    for(var i=1;i<=iCount;i++)
    {
        if(i == sValue)
        {
            document.getElementById(sObj2 + i).style.display = "block";
            document.getElementById(sObj3 + i).style.fontWeight = "700";
        }
        else
        {
            document.getElementById(sObj2 + i).style.display = "none";
            document.getElementById(sObj3 + i).style.fontWeight = "100";
        }
    }
}
function SearchSubmitHotel()
{
		    strHCNName = document.getElementById("HCNName").value;
		    strStar = document.getElementById("star").value;
		    strPrice = document.getElementById("Price").value;
		    strHKysj = document.getElementById("HKysj").value;
		    strPdId = document.getElementById("PdId").value;
		    strHAId = document.getElementById("HAId").value;
		    strStartDate = document.getElementById("StartDate").value;
		    if(strStartDate == "")
		    {
		        alert("请选择入住日期");
		        document.getElementById("StartDate").focus();
		        return false;
		    }
		    strEndDate = document.getElementById("EndDate").value;
		    if(strEndDate == "")
		    {
		        alert("请选择离店日期");
		        document.getElementById("EndDate").focus();
		        return false;
		    }

		    location.href="/hotel/hotelsearchlist200811.aspx?HCNName=" + strHCNName + "&Star=" + strStar + "&Price=" + strPrice + "&PdId=" + strPdId + "&HAId=" + strHAId + "&StartDate=" + strStartDate + "&EndDate=" + strEndDate + "&HKysj=" + strHKysj;
		    
		}	
		function setCheckInDate(d)
    {
	    document.getElementById("StartDate").value=d;
	    var cf=document.getElementById("CalFrame");
	    document.getElementById("EndDate").value=d;
	    showCalendar("img_enddate",false,"EndDate","","");
	    document.getElementById("EndDate").value="";	
    }	