var flashBannerUrl;
var flashContainer;
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var flashBanner = isInternetExplorer ? document.all.flashBanner : document.flashBanner;

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1)
{
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub flashBanner_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call flashBanner_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function flashBanner_DoFSCommand(command, args)
{
    if (command == "closeBanner")
    {
        flashContainer.style.display = "none";
    }
    if (command == "bannerAction")
    {
        flashContainer.style.display = "none";
        window.location.reload(flashBannerUrl);
    }
}

function setFlashBannerUrl(url)
{
    flashBannerUrl = url;
    flashContainer = document.getElementById("flashBannerContainer");
}