/**
  * External javascript for flash plugin
  *
  * Added in case browsers are forced to change plugin/activex implementation
  * and microsoft is correct in this method of circumventing the eolas patent
  *
  * For more information, visit:
  * http://www.microsoft.com/presspass/press/2003/oct03/10-06EOLASpr.asp
  * http://www.macromedia.com/devnet/activecontent/articles/devletter.html
  *
  */

function writeFlash ()
{
    var scheme = 'http';
    if ((/^https:/).test(window.location.href))
    {
        scheme = 'https';    
    }
    var flash_tag;
    
    flash_tag  = "<DIV style=\"position:absolute;left:0;top:0\">";
    flash_tag += '<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ';
    flash_tag += 'codebase=\"' + scheme + '://active.macromedia.com/flash2/cabs/swflash.cab#version=' + requiredVersion + ',0,0,0\" ';
    flash_tag += 'WIDTH=' + newWidth + ' HEIGHT=' + newHeight + '>';
    flash_tag += '<PARAM NAME=movie VALUE=\"' + swf + '\">';
    flash_tag += '<PARAM NAME=loop VALUE=false><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=best>';
    flash_tag += '<EMBED src=\"' + swf + '\" ';
    flash_tag += 'loop=false menu=false quality=best bgcolor=#FFFFFF ';
    flash_tag += 'WIDTH=' + newWidth + ' HEIGHT=' + newHeight;
    flash_tag += ' TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"' + scheme + '://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">';
    flash_tag += '</EMBED></OBJECT>';
    flash_tag += '</DIV>';
    
    document.write (flash_tag);
}

function appendQuery (u, q)
{
    return u + ((u.toLowerCase ().indexOf ('.swf?') == -1) ? '?' : '&') + q;
}