﻿
// To ensure the flash loads last on the page and to get around the "click to activate" in IE.
function showFlash(p, s, w, h)
{
    var sslMaybe = (("https:" == document.location.protocol) ? "https://" : "http://"); 

    var strFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="' + sslMaybe + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + w + '" height="' + h + '">';
    
    strFlash += '<param name="movie" value="' + p + 'common/getFlash.aspx?site_id=' + s + '" />';
    strFlash += '<param name="quality" value="high" />';
    strFlash += '<param name="wmode" value="transparent"/>';
    strFlash += '<param name="base" value="." />';
    strFlash += '<embed wmode="transparent" src="' + p + 'common/getFlash.aspx?site_id=' + s + '" quality="high" pluginspage="' + sslMaybe + 'www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="585" height="234">';
    strFlash += '</embed>';
    strFlash += '</object>';
    strFlash += '';
    strFlash += '';
    
    var div = document.getElementById('homePageBanner');
    div.innerHTML = strFlash;
}


// To ensure the flash loads last on the page and to get around the "click to activate" in IE.
function showCatalogueFlash(src, base, w, h)
{
    var sslMaybe = (("https:" == document.location.protocol) ? "https://" : "http://"); 

    var strFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" base="/catalogues/' + base + '/" codebase="' + sslMaybe + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + w + '" height="' + h + '">';
    
    strFlash += '<param name="movie" value="' + src + '" />';
    strFlash += '<param name="quality" value="high" />';
    strFlash += '<param name="wmode" value="transparent"/>';
    strFlash += '<param name="base" value="/catalogues/' + base + '/" />';
    strFlash += '<embed base="/catalogues/' + base + '/" src="' + src + '" quality="high" pluginspage="' + sslMaybe + 'www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '">';
    strFlash += '</embed>';
    strFlash += '</object>';
    strFlash += '';
    
    var div = document.getElementById('divCatalogue');
    div.innerHTML = strFlash;
}

