﻿		function init_slide(){
			if(!$('slideContainer'))return ;	
			var c=$('slideContainer');	
			if($('slideWaiting'))c.removeChild($('slideWaiting'));	
			var slide=new slidePlayer('slideContainer','slideDisplayImgs','slideNumberPannel',651,225,5,0);	
		}
		//ycn.Event.addEvent(window,'load',init_slide);
		function CancelCal()
		{
			if(document.activeElement.id != "DateContainer" && document.activeElement.id != "DateTip")
			{
				if(document.activeElement.id != "txtComeDate" && document.activeElement.id != "txtOutDate" && document.activeElement.id != "txtGoDate" && document.activeElement.id != "txtReturnDate" && document.activeElement.id != "txtFirstGoDate" && document.activeElement.id != "txtSecondGoDate" )
				{
					YAHOO.tcline.calendar.cal5.hide();
					$("DateTip").style.display="none";
				}
			}
		}
		function checkSearch()
		{
			var city=document.getElementById("txtCity");
			if(city!=null && city.value=="")
			{
				alert("请输入城市！");city.focus();return false;
			}
			var oComeDate=document.getElementById("txtComeDate");
			if ('' == oComeDate.value)
			{
				alert('请输入入住时间！');
				oComeDate.focus();
				return false;
			}
			var reg = /^[0-9]{4}-(0[1-9]|[1-9]|1[0-2])-((0[1-9]|[1-9])|1[0-9]|2[0-9]|3[0-1])$/;
			if(!reg.test(oComeDate.value))
			{
				alert("您输入的入住时间不正确！");oComeDate.value='';oComeDate.focus();return false;
			}
			var oOutDate=document.getElementById("txtOutDate");
			if ('' == oOutDate.value)
			{
				alert('请输入离店时间！');
				oOutDate.focus();
				return false;
			}
			var cda=oComeDate.value.split("-");
			var comeDate=new Date(cda[0],parseInt(cda[1],10)-1,cda[2]);
			var oda=oOutDate.value.split("-");
			var outDate=new Date(oda[0],parseInt(oda[1],10)-1,oda[2]);
			var today=new Date();
			var todayString=document.getElementById("txtHidToday").value;;
			if(todayString!="")
			{
				var dos=todayString.split("-");
				today=new Date(dos[0],parseInt(dos[1],10)-1,dos[2]);
			}	
			today.setHours(0,0,0,0);
			if(comeDate<today)
			{
				alert("入店日期必须大于等于今天！");
				oComeDate.focus();
				return false;
			}
			if(!reg.test(oOutDate.value))
			{
				alert("您输入的离店时间不正确！");oOutDate.value='';oOutDate.focus();return false;
			}
			if(outDate<=comeDate)
			{
				alert("离店日期必须要大于入店日期！");
				oOutDate.focus();
				return false;
			}
			if((outDate-comeDate)>1728000000)
	        {
	            alert("如果您需要在酒店入住20天以上，请致电 4007-777-777转1，我们会竭诚为您服务。");
		        oOutDate.focus();
		        return false;
	        }
		}
	
		//Add By Wangxz For 机票检索
		function ShowHotelSearch()
		{
			$('tbHotelFlightSearch').style.backgroundColor = "#d4eaff";
			$('DivFlightSearch').style.display = "none";
			$('DivHotelSearch').style.display = "";
			
			$('imgHotelQry')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/nmain_search02.gif";
			$('imgFlightQry')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/nmain_search03.gif";
		}
			
		function ShowFlightSearch()
		{
			$('tbHotelFlightSearch').style.backgroundColor = "#F5FAFE";
			$('DivFlightSearch').style.display = "";
			$('DivHotelSearch').style.display = "none";
			
			$('imgHotelQry')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/nmain_search022.gif";
			$('imgFlightQry')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/nmain_search033.gif";
		}

		function SelWhichCalMethod()
		{
			var d = new Date();
			var StrD = d.getYear() + "-" + (d.getMonth()+1) + "-" + d.getDate();
			if($('rblAirLineByH').value=="1"){
				event.cancelBubble=true;showCalendar('txtGoDate',false,'txtGoDate','','',StrD,'','','','','text','')
			}else{
				event.cancelBubble=true;showCalendar('txtGoDate',false,'txtGoDate','txtReturnDate','txtReturnDate',StrD,'','','','','text','')
			}
		}
		
		//按航程选择
		function SelAirLine()
		{
			var rblLine = document.getElementsByName("rblAirLine");
			if (rblLine != null)
			{
				if (rblLine[1].checked)
				{
					$('tbFlightGoOrBack').style.display = "";
					$('txtReturnDate')["disabled"] = "disabled";
					$('imgBackDate')["disabled"] = "disabled";

					$('rblAirLineByH').value="1";
					
					$('trZzcity').style.display = "none";
					$('tdGoDate').innerHTML="出发日期：";
					$('tdBackDate').innerHTML="返程日期：";
					
					if($('tb_FlightB')!=null)
					{
					   $('tb_FlightB').style.margin="30px 0px 0px"
					}
				}
				else if (rblLine[2].checked)
				{
					$('tbFlightGoOrBack').style.display = "";
					$('txtReturnDate')["disabled"] = "";
					$('imgBackDate')["disabled"] = "";

					$('rblAirLineByH').value="2";
					
					$('trZzcity').style.display = "none";
					$('tdGoDate').innerHTML="出发日期：";
					$('tdBackDate').innerHTML="返程日期：";
					
					if($('tb_FlightB')!=null)
					{
					   $('tb_FlightB').style.margin="30px 0px 0px"
					}
				}
				else if (rblLine[3].checked)
				{
					$('tbFlightGoOrBack').style.display = "";
					$('txtReturnDate')["disabled"] = "";
					$('imgBackDate')["disabled"] = "";

					$('rblAirLineByH').value="3";
					
					$('trZzcity').style.display = "";
					$('tdGoDate').innerHTML="一程日期：";
					$('tdBackDate').innerHTML="二程日期：";
					
					if($('tb_FlightB')!=null)
					{
					   $('tb_FlightB').style.margin="2px 0px 0px"
					}
				}
			}
		}
		
		//在航班查询提交之前验证日期
		function BeforeSeachFlight()
		{
			var rblLine = document.getElementsByName("rblAirLine");
			var objStartDate = $('txtGoDate');
			var objEndDate = $('txtReturnDate');
			var d=new Date();
			var s=objStartDate.value;
			
			if ((rblLine[1].checked) || (rblLine[2].checked) || (rblLine[3].checked)) //单程或返程或联程验证
			{
				//出发和抵达城市验证
				var objOrgCity = $('ddlOrgCity');
				var objZzCity = $('ddlZzCity');
				var objDesCity = $('ddlDesCity');
				if(objOrgCity.value.replace(new RegExp("(^[\\s]*)|([\\s]*$)", "g"), "")=="" || objDesCity.value.replace(new RegExp("(^[\\s]*)|([\\s]*$)", "g"), "")=="")
				{
					alert("请选择出发城市或到达城市!");
					return false;
				}
				
				if (rblLine[3].checked) //联程Check
				{
				    if(objZzCity.value.replace(new RegExp("(^[\\s]*)|([\\s]*$)", "g"), "")=="" || objZzCity.value=="拼音输入/单击选择")
				    {
					    alert("请选择中转城市!");
					    objZzCity.focus();
					    return false;
				    }
				}
				
				if(objOrgCity.value=="拼音输入/单击选择")
				{
					alert("请选择出发城市!");
					objOrgCity.focus();
					return false;
				}
				if(objDesCity.value =="拼音输入/单击选择")
				{
					alert("请选择到达城市!");
					objDesCity.focus();
					return false;
				}
				
				if (rblLine[3].checked) //联程Check
				{
				   if (objOrgCity.value.Trim() == objZzCity.value.Trim())
				    {
					    alert("您的出发和中转城市不能相同，请重新选择！");
					    objZzCity.focus();
					    return false;
				    }
				    if (objZzCity.value.Trim() == objDesCity.value.Trim())
				    {
					    alert("您的中转和抵达城市不能相同，请重新选择！");
					    objDesCity.focus();
					    return false;
				    } 
				}
				
				if (objOrgCity.value.Trim() == objDesCity.value.Trim())
				{
					alert("您的出发和抵达城市不能相同，请重新选择！");
					objDesCity.focus();
					return false;
				}
				
				if (rblLine[1].checked) //单程Check
				{
					if (objStartDate.value.Trim()=="" || objStartDate.value.Trim()=="yyyy-mm-dd")
					{
					   alert("请选择出发日期！");
					   SelWhichCalMethod(); 
					    return false;
					}
					else if (!reg.ValidDate( objStartDate.value.Trim()))
					{
						alert("您的出发日期选择错误，请重新选择！");
						SelWhichCalMethod(); 
						return false;
					}
				}
				if (rblLine[2].checked) //返程Check
				{
					if (objStartDate.value.Trim()=="" || objStartDate.value.Trim()=="yyyy-mm-dd")
					{
						alert("请选择出发日期！");
						SelWhichCalMethod(); 
						return false;
					}
					if (!reg.ValidDate( objStartDate.value.Trim()))
					{
						alert("您的出发日期选择错误，请重新选择！");
						SelWhichCalMethod();
						return false;
					}
					if (objEndDate.value.Trim()=="" || objEndDate.value.Trim()=="yyyy-mm-dd")
					{
						alert("请选择返回日期！");
						event.cancelBubble=true;
						showCalendar('txtReturnDate',false,'txtReturnDate','','',s,'','','','','text','')
						return false;
					}
					if (!reg.ValidDate( objEndDate.value.Trim()))
					{
						alert("您的返回日期选择错误，请重新选择！");
						event.cancelBubble=true;
						showCalendar('txtReturnDate',false,'txtReturnDate','','',s,'','','','','text','')
						return false;
					}
					if (reg.CompareDate( objStartDate.value.Trim(),objEndDate.value.Trim()))
					{
					   alert("您的返回日期小于出发日期，请重新选择！");
					   event.cancelBubble=true; 
					   showCalendar('txtReturnDate',false,'txtReturnDate','','',s,'','','','','text','')
					   return false;
					}	
				}
				
				if (rblLine[3].checked) //联程Check
				{
					if (objStartDate.value.Trim()=="" || objStartDate.value.Trim()=="yyyy-mm-dd")
					{
						alert("请选择一程日期！");
						SelWhichCalMethod(); 
						return false;
					}
					if (!reg.ValidDate( objStartDate.value.Trim()))
					{
						alert("您的一程日期选择错误，请重新选择！");
						SelWhichCalMethod(); 
						return false;
					}
					if (objEndDate.value.Trim()=="" || objEndDate.value.Trim()=="yyyy-mm-dd")
					{
						alert("请选择二程日期！");
						//alert($('txtGoDate').value);
						event.cancelBubble=true; 
					    showCalendar('txtReturnDate',false,'txtReturnDate','','',s,'','','','','text','')
						return false;
					}
					if (!reg.ValidDate( objEndDate.value.Trim()))
					{
						alert("您的二程日期选择错误，请重新选择！");
						event.cancelBubble=true; 
					    showCalendar('txtReturnDate',false,'txtReturnDate','','',s,'','','','','text','')
						return false;
					}
					if (reg.CompareDate( objStartDate.value.Trim(),objEndDate.value.Trim()))
					{
					   alert("您的二程日期小于一程日期，请重新选择！");
					   event.cancelBubble=true; 
					   showCalendar('txtReturnDate',false,'txtReturnDate','','',s,'','','','','text','')
					   return false;
					}	
				}
			}
			
			return true;			
		}
		//联程航程间同步
		function SyncFirstDesSecondOrg()
		{
			var selIndex = $('ddlFirstDesCity').selectedIndex;
			$('ddlSecondOrgCity').options[selIndex].selected = true;
		}
		//点评和推广财富榜切换
		function ShowTiXianFinance()
		{
            $('tbTXFinance').style.display = "";
			$('tbDPFinance').style.display = "none";
			$('tbTGFinance').style.display = "none";
			
			$('imgTxFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/jin1.gif";
			$('imgDPFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/dian2.gif";
			$('imgTGFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/tui2.gif";
		}
		function ShowDianPingFinance()
		{
            $('tbTXFinance').style.display = "none";
			$('tbDPFinance').style.display = "";
			$('tbTGFinance').style.display = "none";
			
			$('imgTxFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/jin2.gif";
			$('imgDPFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/dian1.gif";
			$('imgTGFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/tui2.gif";
		}
		function ShowTGFinance()
		{
		    $('tbTXFinance').style.display = "none";
			$('tbDPFinance').style.display = "none";
			$('tbTGFinance').style.display = "";
			
			$('imgTxFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/jin2.gif";
			$('imgDPFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/dian2.gif";
			$('imgTGFinance')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/tui1.gif";
		}
		//会员和酒店博客、意见反馈切换
		function ShowMemberBlog()
		{
			$('tbMemberBlog').style.display = "";
			$('tbHotelBlog').style.display = "none";
			$('tbAdvinceBack').style.display = "none";
			//$('Area8')["title"] = "更多会员博客";
			
			$('imgMemberBlog')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_dp01.gif";
			$('imgHotelBlog')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_tg02.gif";
			$('imgAdvinceBack')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_lt01.gif";
		}
		function ShowHotelBlog()
		{
			$('tbMemberBlog').style.display = "none";
			$('tbHotelBlog').style.display = "";
			$('tbAdvinceBack').style.display = "none";
			//$('Area8')["title"] = "更多酒店博客";
			
			$('imgMemberBlog')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_dp02.gif";
			$('imgHotelBlog')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_tg01.gif";
			$('imgAdvinceBack')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_lt01.gif";
			
		}
		function ShowAdvinceBack()
		{
			$('tbMemberBlog').style.display = "none";
			$('tbHotelBlog').style.display = "none";
			$('tbAdvinceBack').style.display = "";
			
			$('imgMemberBlog')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_dp02.gif";
			$('imgHotelBlog')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_tg02.gif";
			$('imgAdvinceBack')["src"] = "http://img.17u.cn/hotel/images/www_17u_cn/images2007/NewDefaultTab/bq_lt02.gif";
		}
		//显示更多博客
		function ShowMoreBlog()
		{
			if ($('tbMemberBlog').style.display == "")
				window.open( "http://www.17u.com/blog/story/1.html" );
			else if ($('tbHotelBlog').style.display == "")
				window.open( "http://www.17u.com/hblog/all/" );
		}
		
		//设置日期控件的位置
		function SetYuiCalenderPix(objTarget)
		{
			if(objTarget)
			{
				var objDiv = $("DateContainer");
				objDiv.style.pixelLeft = PointsPos(objTarget,"Left")-93;
				objDiv.style.pixelTop = PointsPos(objTarget,"Top") + objTarget.offsetHeight;
				var objDivTip = $("DateTip");
				objDivTip.style.pixelLeft = PointsPos(objTarget,"Left")-93;
				objDivTip.style.pixelTop = PointsPos(objTarget,"Top") + objTarget.offsetHeight;
			}
		}
		
		       var requestObj;
        function ShowActivityInfo(){
//    if(objTarget){
//        var objDiv = $("DivHotelActivity");								
//	    objDiv.style.pixelLeft = PointsPos(objTarget,"Left");
//	    objDiv.style.pixelTop = PointsPos(objTarget,"Top") + objTarget.offsetHeight;
//	    objDiv.style.display = "";
//	}
	
	        if(window.XMLHttpRequest){
	            requestObj = new XMLHttpRequest();
	            if(requestObj.overrideMimeType){
		            requestObj.overrideMimeType("text/xml");
	            }
            }else if(window.ActiveXObject){
	            try{
		            requestObj = new ActiveXObject("Msxml2.XMLHTTP");
	            }catch(e){
		            requestObj = new ActiveXObject("Microsoft.XMLHTTP");
	            }
            }
            
            requestObj.onreadystatechange = displayResult;
            requestObj.open("GET", "/Hotel/UC/PrizeListInfo.aspx", true);
            requestObj.send();
        }

        //显示结果 
        function displayResult(){
	         if (requestObj.readyState == 4){
		         var divContent = document.getElementById("DivHotelActivity");
		         if(divContent){
		            divContent.innerHTML = requestObj.responseText;
		         }
	         } 
        }
/****************************************************************************************************************************
		
		function CloseDiv()
		{
			$("DateTip").style.display="none";
			YAHOO.tcline.calendar.cal5.hide();
		}
		//特价机票信息链接预订页面
		function CheckQuery(StartPort,EndPort,StartDate)
		{
			$("txtOrgPort").value = StartPort;
			$("txtArvPort").value = EndPort;
			$("txtBegDate").value = StartDate;

			__doPostBack_Ex("btnTJQuery","");
		}
		
		//YUI命名空间
		var _txtId;
		YAHOO.namespace("tcline.calendar");
		YAHOO.tcline.calendar.init = function() {
			//初始化日期
			var curDate = $("txtHidToday").value;
			var tempDate = curDate.split('-');
			var BegMonth = tempDate[1];
			var BegDay = tempDate[2];
			var BegYear = tempDate[0];
			
			var BegSelectedMonths = BegMonth+"/"+BegYear;
			var BegDate = BegMonth+"/"+BegDay+"/"+BegYear;
			if(parseInt(BegMonth,10)+2 > 12)
			{
				BegMonth=parseInt(BegMonth,10)-12;
				BegYear=parseInt(BegYear,10)+1;
			}
			var MaxDate = (parseInt(BegMonth,10)+2)+"/"+BegDay+"/"+BegYear;
			var MaxDate1 = BegYear+"-"+(parseInt(BegMonth,10)+2)+"-"+BegDay;

			//入住日期
			var hour = new Date().getHours();
			if(hour>=7 && hour<=21)
				$("DateTip").innerHTML="<font color=Blue><b>"+MaxDate1+"之后的预订，请致电4007-777-777</b></font>&nbsp;&nbsp;<a style='width:24;cursor:hand;' onclick='CloseDiv();'>&nbsp;</a>";
			else
			{
				$("DateTip").style.width="250px";
				$("DateTip").innerHTML="";
			}
			YAHOO.tcline.calendar.cal5 = new YAHOO.widget.CalendarGroup("cal5","DateContainer", { pages:2, title:"请选择日期:", close:true ,pagedate :BegSelectedMonths ,mindate: BegDate,maxdate: MaxDate} );
			YAHOO.tcline.calendar.cal5.selectEvent.subscribe(function(type,args,obj){
						var dates = args[0];
						var date = dates[0];
						var year = date[0], month = date[1], day = date[2];
						document.getElementById(_txtId).value = year + "-" + month + "-" + day;
						obj.hide();
						$("DateTip").style.display="none";
						
						if(_txtId == "txtComeDate")
						{
							_txtId = "txtOutDate";
							$("txtOutDate").focus();
						}
						
					},YAHOO.tcline.calendar.cal5,true);
			YAHOO.tcline.calendar.cal5.render();

			//入住日期
			YAHOO.util.Event.addListener("txtComeDate", "focus",function(){
					if($("DateTip").style.display=="none" || _txtId != "txtComeDate")
					{
						if( _txtId!="txtComeDate" && _txtId!="txtOutDate")
						{
							YAHOO.tcline.calendar.cal5.cfg.setProperty("maxdate", MaxDate);
							YAHOO.tcline.calendar.cal5.render();
						}
						SetYuiCalenderPix($("txtComeDate"));
							
						YAHOO.tcline.calendar.cal5.show();
						$("DateTip").style.display="";
						_txtId = "txtComeDate";
					}
					else if( _txtId == "txtComeDate")
					{
						YAHOO.tcline.calendar.cal5.hide();
						$("DateTip").style.display="none";
					}
				},
				YAHOO.tcline.calendar.cal5,
			true);
			
			//离店日期
			YAHOO.util.Event.addListener("txtOutDate", "focus",function(){
					if($("DateTip").style.display=="none" || _txtId != "txtOutDate")
					{
						if( _txtId!="txtComeDate" && _txtId!="txtOutDate")
						{
							YAHOO.tcline.calendar.cal5.cfg.setProperty("maxdate", MaxDate);
							YAHOO.tcline.calendar.cal5.render();
						}
						SetYuiCalenderPix($("txtOutDate"));
						
						YAHOO.tcline.calendar.cal5.show();
						$("DateTip").style.display="";
						_txtId = "txtOutDate";
					}
					else if(_txtId == "txtOutDate")
					{
						YAHOO.tcline.calendar.cal5.hide();
						$("DateTip").style.display="none";
					}
				},
				YAHOO.tcline.calendar.cal5,
			true);
			
			//航班单程、往返去程日期
			YAHOO.util.Event.addListener("txtGoDate", "focus",function(){
					if($("DateContainer").style.display=="none" || _txtId != "txtGoDate")
					{
						if( _txtId=="txtComeDate" || _txtId=="txtOutDate")
						{
							YAHOO.tcline.calendar.cal5.cfg.setProperty("maxdate", "");
							YAHOO.tcline.calendar.cal5.render();
						}
						SetYuiCalenderPix($("txtGoDate"));
							
						YAHOO.tcline.calendar.cal5.show();
						_txtId = "txtGoDate";
					}
					else if(_txtId == "txtGoDate")
					{
						YAHOO.tcline.calendar.cal5.hide();
						$("DateTip").style.display="none";
					}
				},
				YAHOO.tcline.calendar.cal5,
			true);
			
			//航班单程、往返返程日期
			YAHOO.util.Event.addListener("txtReturnDate", "focus",function(){
					if($("DateContainer").style.display=="none" || _txtId != "txtReturnDate")
					{
						if( _txtId=="txtComeDate" || _txtId=="txtOutDate")
						{
							YAHOO.tcline.calendar.cal5.cfg.setProperty("maxdate", "");
							YAHOO.tcline.calendar.cal5.render();
						}
						SetYuiCalenderPix($("txtReturnDate"));
						
						YAHOO.tcline.calendar.cal5.show();
						_txtId = "txtReturnDate";
					}
					else if(_txtId == "txtReturnDate")
					{
						YAHOO.tcline.calendar.cal5.hide();
						$("DateTip").style.display="none";
					}
				},
				YAHOO.tcline.calendar.cal5,
			true);
			
			//航班联程出发日期1
			YAHOO.util.Event.addListener("txtFirstGoDate", "focus",function(){
					if($("DateContainer").style.display=="none" || _txtId != "txtFirstGoDate")
					{
						if( _txtId=="txtComeDate" || _txtId=="txtOutDate")
						{
							YAHOO.tcline.calendar.cal5.cfg.setProperty("maxdate", "");
							YAHOO.tcline.calendar.cal5.render();
						}
						SetYuiCalenderPix($("txtFirstGoDate"));
							
						YAHOO.tcline.calendar.cal5.show();
						_txtId = "txtFirstGoDate";
					}
					else if(_txtId == "txtFirstGoDate")
					{
						YAHOO.tcline.calendar.cal5.hide();
						$("DateTip").style.display="none";
					}
				},
				YAHOO.tcline.calendar.cal5,
			true);
			
			//航班联出发日期2
			YAHOO.util.Event.addListener("txtSecondGoDate", "focus",function(){
					if($("DateContainer").style.display=="none" || _txtId != "txtSecondGoDate")
					{
						if( _txtId=="txtComeDate" || _txtId=="txtOutDate")
						{
							YAHOO.tcline.calendar.cal5.cfg.setProperty("maxdate", "");
							YAHOO.tcline.calendar.cal5.render();
						}
						SetYuiCalenderPix($("txtSecondGoDate"));
							
						YAHOO.tcline.calendar.cal5.show();
						_txtId = "txtSecondGoDate";
					}
					else if(_txtId == "txtSecondGoDate")
					{
						YAHOO.tcline.calendar.cal5.hide();
						$("DateTip").style.display="none";
					}
				},
				YAHOO.tcline.calendar.cal5,
			true);
			
		}
		//载入日历（应该是onload的时候）
		YAHOO.util.Event.onDOMReady(YAHOO.tcline.calendar.init);

		function givelist(){
			YAHOO.namespace("hotle.AutoComplete");
			YAHOO.hotle.ACForLine = new function() {
				this.oACDSCity = new YAHOO.widget.DS_XHR("AjaxCall.aspx", ["Result", "Title","Id"]);
				this.oACDSCity.responseType = YAHOO.widget.DS_XHR.TYPE_XML;
				this.oACDSCity.scriptQueryParam = "ACT";
				
				this.oAutoCompCity = new YAHOO.widget.AutoComplete('txtCity','cityContainer', this.oACDSCity);
				//this.oAutoCompCity.typeAhead = true;
				this.oAutoCompCity.useIFrame = true;
				this.oAutoCompCity.maxResultsDisplayed = 30;
				
				this.oAutoCompCity.minQueryLength = 0;
				
				this.oAutoCompCity.textboxFocusEvent.subscribe(function(){   
					var sInputValue = YAHOO.util.Dom.get('txtCity').value;   
					var oSelf = this;
					oSelf.sendQuery(sInputValue);
				});

				this.oAutoCompCity.formatResult = function(oResultItem, sQuery) {   
					oResultItem[1] = "<span style='width:100px;'>"+oResultItem[1]+"</span>";
					return oResultItem[1];
				}; 
				
				this.myOnDataReturn = function(sType, aArgs) {
					var pos = YAHOO.util.Dom.getXY('txtCity');
					pos[1] += YAHOO.util.Dom.get('txtCity').offsetHeight + 2;
					YAHOO.util.Dom.setXY("cityContainer",pos);
					//var oAutoCompCity = aArgs[0];
					//var sQuery = aArgs[1];
					//var aResults = aArgs[2];
					//if(aResults.length != 0) {
					//	YAHOO.util.Dom.get('txtCity').value = aResults[0][0];
					//}
				};
				this.oAutoCompCity.dataReturnEvent.subscribe(this.myOnDataReturn);
			};
		}
		setTimeout("givelist();","1000");
************************************************************************************************************************************/
