﻿// JScript File
function getHotelDeals(Code, Destination, RegionID) {
    var iframe_Hotel = document.getElementById("ifGetHotelArea");
    if (iframe_Hotel)
        iframe_Hotel.src = '/Destinations/Deals/hotels.aspx?Code=' + Code + '&Destination=' + Destination + '&RegionID=' + RegionID;
}


function getPackageDeals(Code, Destination, RegionID) {
    var iframe_Package = document.getElementById("ifGetPackageArea");
    if (iframe_Package)
        iframe_Package.src = '/Destinations/Deals/packages.aspx?Code=' + Code + '&Destination=' + Destination + '&RegionID=' + RegionID;
}





function xmlhttpPost(strURL) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            //updatepage(self.xmlHttpReq.responseText);
            //document.getElementById("divHotelDeals").innerHTML = self.xmlHttpReq.responseText;
        }
    }
    self.xmlHttpReq.send(getquerystring());
}

function getquerystring() {
    return qstr;
}

function updatepage(str) {
    document.getElementById("result").innerHTML = str;
}
