﻿// Show/Hide menu top/left menu link dropdown
function showMenuDropdown(e) {
    document.getElementById(e).style.display = "block";
}
function hideMenuDropdown(e) {
    document.getElementById(e).style.display = "none";
}

//  Function to call TellAFriend popup:
function popupTellAFriend(page) {
    var win = window.open('/Tellafriend.aspx?page=' + page, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=460,height=600');
}

//  Function to call Print Page popup:
function popupPrintpage(page) {
    var win = window.open('/Printpage.aspx?page=' + page, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=600');
}

//  Function to redirect page:
function redirectToPage(url) {
    window.location = url;
}

/*
//  Function to resize banners 
//  Arguments: isSG - true when page is SG|academy Home - has banner in content column, all others have banner in left column
function resizeBanners(isSG) {
    var i = 1;
    if (isSG == true) {
        $("DIV.academyBannerBlock IMG").each(function() {
            if (screen.width < 1200) {
                if (this.width > 485) {
                    this.width = 485;
                }
            }
            else {
                if (this.width > 559) {
                    this.width = 559;
                }
            }
            i++;
        });
    }
    else {
        $("DIV#bannerBlok IMG").each(function() {
            if (this.width > 225) {
                this.width = 225;
            }
            i++;
        });
    }
}
*/