﻿function bookingRoom(hid,fromday,period,opcode){
    var _day1 = new Date(fromday.replace('-','/'));
    var year = _day1.getFullYear();
    var month = _day1.getMonth() + 1;
    var day = _day1.getDate();
    var url='http://reservation.landishotelsresorts.com/index.php';
    //額外處理
    if (hid==8){
        url='http://66.70.56.90/00000001/032/023112/dispopricev2.phtml';
        url=url+'?Clusternames=astwthelandis&Hotelnames=ASIATLANDISONSZhou&fromday='+day
            +'&frommonth='+month
            +'&fromyear='+year
            +'&nbdays='+period
            +'&adulteresa=1&redir=BIZ-so5523q0o4&showPromotions=3&GroupPromo=2&showPromotions=3&rt=1264747697';
        
     
     }else{
    
        var day1 = year + "-" + month + "-" + day; //2008-08-08
        url=url+'?hotelid='+hid
            +'&day='+day
            +'&month='+month
            +'&year='+year
            +'&period='+period
            +'&opcode='+opcode
            +'&day1='+day1
            +'&&vn=356&hid='+hid+'&__fromurl=64';
    }         
    //$(this).attr({"href":url});
    //location.href=url;
    window.open(url,'_blank');
}
