function writeFlash(){

var width = "540";
var height = "400";
var bgcolor = "#011c56";
var filename = "/uploaded/flash/photos.swf";

var alternateContent = '<img src="/uploaded/images/flash/photos/photo1.jpg" />';

var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

if(hasRightVersion) {  // if we've detected an acceptable version
    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="'+width+'" height="'+height+'"'
    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
    + '<param name="movie" value="'+filename+'" />'
    + '<param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="'+bgcolor+'" />'
    + '<embed src="'+filename+'" quality="high" wmode="transparent" bgcolor="'+bgcolor+'" '
    + 'width="'+width+'" height="'+height+'" name="movie" align="middle"'
    + 'play="true"'
    + 'loop="false"'
    + 'quality="high"'
    + 'allowScriptAccess="sameDomain"'
    + 'type="application/x-shockwave-flash"'
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);   // embed the flash movie
  } else {  // flash is too old or we can't detect the plugin
    document.write(alternateContent);  // insert non-flash content
  }


}
