﻿function GoToHotelPage() {
    var current_QueryString = unescape(location.search.substr(1));
    var theHash = getHash();
    current_QueryString = current_QueryString + '#' + theHash;
    //current_QueryString = current_QueryString.replace('##', '#');
    
    location.href = 'HotelPageW.aspx?' + current_QueryString;
}

function GoToHotelPageFromHttps(baseUrl) 
{
    
    var current_QueryString = unescape(location.search.substr(1));
    var theHash = getHash();
    current_QueryString = current_QueryString + '#' + theHash;
    //current_QueryString = current_QueryString.replace('##', '#');
    
    location.href = baseUrl + 'HotelPageW.aspx?' + current_QueryString;
    //alert(baseUrl + 'HotelPageW.aspx?' + current_QueryString);
}

$(document).ready(function() {
    //This Keeps the session alive. Called every 5 min
    window.setInterval("renewSession();", 300000);
});

function renewSession() 
{
    var theImg = $('#renewSession');
    //alert(theImg.attr("src"));
    theImg.attr("src", "SessionManager/SessionRefresh.aspx?par=" + Math.random());
    //document.getElementById('renewSession').src = "/SessionManager/SessionRefresh.aspx?par=" + Math.random();
}

function disableEnterKey(e) {
    var key;
    if (window.event)
        key = window.event.keyCode;     //IE
    else
        key = e.which;     //firefox
    if (key == 13)
        return false;
    else
        return true;
}
