﻿function reloadMkt(mkt)
{  
    document.cookie = "mkt="+escape(mkt);
    try
    {
        window.location.reload();
    }
    catch(e) 
    {
        alert(e.message);
    }
}

function _s(s) { document.write(strings[s]); }

function writeFlash(objIframe, url, width, height)
{
    var embededFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">' + 
                       '<param name="movie" value="' + url + '" />' +
                       '<param name="quality" value="high" />' +
				       '<param name="wmode" value="transparent" />' +
                       '<param name="bgcolor" value="#ffffff" />' + 
                       '<embed src="' + url + '" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '">' +
                       '</embed>' +
                       '</object>';
                       
    //
    // $NOTE(Eric): we use an IFRAME here as a container of the target flash, to solve the overlay problem 
    // in IE6.0 and FireFox. IE7.0 does not have this problem. 
    //
    var flashFrame = document.getElementById(objIframe);
    if(flashFrame && flashFrame.contentWindow && flashFrame.contentWindow.document) 
    {
        flashFrame.contentWindow.document.open();
        flashFrame.contentWindow.document.write(
                        "<html>" +
                        "<head>" +
                        "<title>Empty document as flash container</title>" +
                        "<style type='text/css'>body{margin:0px;}</style>" +
                        "</head>" +
                        "<body>" +
                        embededFlash +
                        "</body>" +
                        "</html>"
                        );
        flashFrame.contentWindow.document.close();
                        
    }
    else // otherwise, we write the flash into the current document directly.
    {
        document.write(embededFlash);
    }
}
