
function dbgL(msg){
	return ""
}
function dbgE(msg){
	return ""
}
function handleDebugDiv(msg){
	return ""
}


(function($) {
	$.fn.equalHeights = function(minHeight, maxHeight) {
		tallest = (minHeight) ? minHeight : 0;
		this.each(function() {
			if($(this).height() > tallest) {
				tallest = $(this).height();
			}
		});
		if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
		return this.each(function() {
			$(this).height(tallest).css("overflow","auto");
		});
	}
})(jQuery);

var urlParams = {};
(function () {
    var e,
        a = /\+/g,  // Regex for replacing addition symbol with a space
        r = /([^&;=]+)=?([^&;]*)/g,
        d = function (s) { try{ return decodeURIComponent(s.replace(a, " ")); } catch(e) {return ""; } },
        q = window.location.search.substring(1);

    	while (e = r.exec(q))
	{
		//if(e[1]!="HotelName")
		//{
			//alert(e)
       			urlParams[d(e[1])] = d(e[2]);
		//}
	}
})();

function checksrc()
{
    $.ajax({
        type: "GET",
        url: "/Site/Ajax/Login/checksrc.asp?src=" + urlParams["src"],
        cache: false,
        timeout: 20000,
        error: function(XMLHttpRequest, textStatus, errorThrown){
		    alert('error : ' + textStatus + " : " + errorThrown);
        },
        success: function(data, textStatus){
            if(data != "OK")
            {
                self.location.href="/404.asp"
            }
            else
            {
                var theBody = document.getElementsByTagName('body')[0];
                theBody.style.display = "block";
            }
        }
    });
}
