//function Click(){ 
//if (event.button!=1){alert('See the code is not allowed!'); 
//}} 
//document.onmousedown=Click;

//$("#Room1").bind("ajaxSend", function(){
//                $(this).slideDown("slow");

function GetErrorlogYear()
{
     $.ajax({
   type:"POST",
   async: false,
   url:"/async/Errorlogyear.aspx",      
   success:function(html){
   if(html!='')
   {   
      $("#logview").empty();
      $("#logview").append(html);
   }
   }   
   })
}
function GetlogMonth(year)
{
   $.ajax({
   type:"POST",
   async: false,
   url:"/async/ErrorlogMonth.aspx",    
   data:"Year="+ year,  
   success:function(html){
   if(html!='')
   {   
      $("#logview").empty();
      $("#logview").append(html);
   }
   }   
   })
}
function GetlogDay(Year,month)
{
   $.ajax({
   type:"POST",
   async: false,
   url:"/async/ErrorlogDay.aspx",    
   data:"Year="+ Year+ "&Month="+month,  
   success:function(html){
   if(html!='')
   {   
      $("#logview").empty();
      $("#logview").append(html);
   }
   }   
   })
}
function Getlogdetail(year,month,day)
{
 $.ajax({
   type:"POST",
   async: false,
   url:"/async/ErrorLogView.aspx",    
   data:"Year="+ year+ "&Month="+month+"&Day="+day,  
   success:function(html){
   if(html!='')
   {   
      $("#logview").empty();
      $("#logview").append(html);
   }
   }   
   })
}
function toggleMsg()
{
    
}
function GetRoom(Id,HId)
{ 
//  var html="濠殿喗绻愮徊钘夛耿椤忓懐鈻旈柣鎴灻禍鍫曟煛鐏炶鍔ユい鏇燁殕缁傛帡鏌ㄧ€ｎ剙顥?闁荤姴娲ˉ鎾诲煟閵忋倕纾?..";
//  $("#Room"+ Id).empty();
//  $("#Room"+ Id).append(html);  
  $("#Room"+ Id).ajaxSend(function(evt, request, settings){ $(this).empty(); $(this).append("<div class=\"loading\"><img src=\"/images/loading.gif\" />正在为您查询价格,请稍候<div>"); })
  $.ajax({
      type: "POST",
      async: true,
      url: "/async/GetRoom.aspx",
      data: "HID=" + HId,
      success: function (html) {
          $("#Room" + Id).empty();
          $("#Room" + Id).append(html);
      },
      error: function () { 
          $.ajax({
      type: "POST",
      async: true,
      url: "/async/GetRoom.aspx",
      data: "HID=" + HId,
      success: function (html) {
          $("#Room" + Id).empty();
          $("#Room" + Id).append(html);
      }
      })
      }
  }) 
}
function showtitle(msg)
{
alert(msg);
   //$(this).animate({opacity:"show",top:"-85px"},500);	
}
//move

function GetComments(type ,HId)
{ 
  $("#comments").ajaxSend(function(evt, request, settings){ $(this).empty(); $(this).append("<div class=\"loading\"><img src=\"/images/loading.gif\" /></div>"); })  
  $.ajax({
    type:"POST",
    async: true,
    url:"/async/GetComments.aspx",
    data:"HID="+HId +"&ctype="+ type,
    success:function(html){
       $("#comments").empty();
       $("#comments").append(html);
    }      
  }) 
}
  var map = null;
    var geocoder = null;

    function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(39.917, 116.397), 15);
        geocoder = new GClientGeocoder();
      }
    }

    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert("濞戞挸绉烽崗妯兼喆閿濆棛鈧? " + address);
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }
    
function Getslevelhotels( city,classId)
{ 
  $("#slevelhotels").ajaxSend(function(evt, request, settings){ $(this).empty(); $(this).append("<div class=\"loading\"><img src=\"/images/loading.gif\" /></div>"); })  
  $.ajax({
    type:"POST",
    async: true,
    url:"/async/Getslevelhotels.aspx",
    data:"classId="+classId+"&CityId="+city,
    success:function(html){
       $("#slevelhotels").empty();
       $("#slevelhotels").append(html);
    }      
  }) 
}
function GetAroundhotels( city,classId)
{ 
  $("#Aroundhotels").ajaxSend(function(evt, request, settings){ $(this).empty(); $(this).append("<div class=\"loading\"><img src=\"/images/loading.gif\" /></div>"); })  
  $.ajax({
    type:"POST",
    async: true,
    url:"/async/GetAroundhotels.aspx",
    data:"classId="+classId+"&CityId="+city,
    success:function(html){
       $("#Aroundhotels").empty();
       $("#Aroundhotels").append(html);
    }      
  }) 
}
function GetNews()
{ 
  $("#hotelnews").ajaxSend(function(evt, request, settings){ $(this).empty(); $(this).append("<div class=\"loading\"><img src=\"/images/loading.gif\" /></div>"); })  
  $.ajax({
    type:"POST",
    async: true,
    url:"/async/Gethotelnews.aspx",
    //data:"classId="+classId+"&CityId="+city,
    success:function(html){
       $("#hotelnews").empty();
       $("#hotelnews").append(html);
    }      
  }) 
}
function GethotNews()
{ 
  $("#hotnews").ajaxSend(function(evt, request, settings){ $(this).empty(); $(this).append("<div class=\"loading\"><img src=\"/images/loading.gif\" /></div>"); })  
  $.ajax({
    type:"POST",
    async: true,
    url:"/async/GetHotNews.aspx",
    //data:"classId="+classId+"&CityId="+city,
    success:function(html){
       $("#hotnews").empty();
       $("#hotnews").append(html);
    }      
  }) 
}
