﻿//酒店跳转
function ebook(rid){window.open('ebook.aspx?rid='+rid+'',"_self")}
//酒店跳转(从点评页)
function ClickToHotel(cityid,hotelid){window.open('/Hotels-'+cityid+'-'+hotelid+'.aspx',"_target")}
//酒店跳转(转到点评页)
function ClickToDp(cityid,hotelid){window.open('/Dianping/Dianping.aspx?cityId='+cityid+'&HotelId='+hotelid+'',"_target")}
// 自动最大化网页，以获得最佳浏览效果
if ( screen.availWidth > 1000 && document.documentElement.offsetWidth < 1010 )	{
	self.moveTo(-4,-4);
	self.resizeTo(screen.availWidth+7,screen.availHeight+8);
	document.body.style.cssText="overflow-x:hidden;";
}else if ( screen.availWidth < 1000 && document.documentElement.offsetWidth < 750 )	{
	self.moveTo(-3,-3);
	self.resizeTo(screen.availWidth+5,screen.availHeight+6);
}


// 容错代码
function killErrors() {
return true;
}
window.onerror = killErrors;


function OrderClick() {
    var szmobile = document.getElementById("mobile").value;
    var szoname = document.getElementById("oname").value;
    if (szmobile == '') {
        alert('请输入您的手机号码。');
        document.getElementById("mobile").focus();
        return;
    }
    if (szoname == '') {
        alert('请输入预订人姓名。');
        document.getElementById("oname").focus();
        return;
    }

    location.href = '/OrderList.aspx?mobile=' + szmobile + '&oname=' + szoname;

}


//首页TAG
function selectTag(showContent,selfObj){
	// 操作标签
	var tag = document.getElementById("tags").getElementsByTagName("li");
	var taglength = tag.length;
	for(i=0; i<taglength; i++){
		tag[i].className = "";
	}
	selfObj.parentNode.className = "selectTag";
	// 操作内容
	for(i=0; j=document.getElementById("tagcontent"+i); i++){
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";
}