/* File Created: December 30, 2013 */
///
///
///
///
//#region resizeFrame
var topHeaderHeight, footerMiniHeight, containerExtraHeight, leftMenuWidth;
function resizeFrame() {
var container = $("#settledbets-panel");
if (!container[0]) {
return;
}
if (topHeaderHeight == undefined) {
topHeaderHeight = $("div.pop-header-c").outerHeight(true); //99;
}
if (footerMiniHeight == undefined) {
var $minFooter = $("#footer-mini");
if ($minFooter.length == 0 || $minFooter.is(":hidden"))
footerMiniHeight = 0;
else
footerMiniHeight = $minFooter.outerHeight(true); //77 is mini footer height;
}
if (containerExtraHeight == undefined) {
containerExtraHeight = container.outerHeight(true) - container.height();
}
totalHeight = $(window).height() - topHeaderHeight - footerMiniHeight;
totalHeight = totalHeight - containerExtraHeight;
if (leftMenuWidth == undefined) {
leftMenuWidth = $("div.side-nav-c").outerWidth(true); //99;
}
container.height(totalHeight - 40);
container.width("100%");
}
//#endregion
//#region GetUnsettledBetsURLCallBack
function GetSettledBetsURL() {
var frame$ = $("#settledbets-panel>iframe");
var loading$ = $("#loading");
if (frame$[0]) {
utility.service("integrationservice/GetSettledBetsURL", null, function (result) {
//window.location.href = result.r;
frame$.attr("src", result.r);
window.setTimeout(function () {
loading$.hide();
}, 2000);
// if (result.r == "") {
// $("#settledbets-panel").prepend("" + l.DataAccessError + "");
// }
// else {
// frame$.attr("src", result.r);
// }
// window.setTimeout(function () {
// loading$.hide();
// }, 2000);
});
}
}
//#endregion
//#region document.ready
$(function () {
$("#settledbets-panel span").remove();
$(window).resize(function () {
resizeFrame();
});
resizeFrame();
GetSettledBetsURL();
//Set domain to be same for MemberSite and SBK
document.domain = location.hostname.substr(location.hostname.indexOf('.') + 1);
});
//#endregion