var requiredMajorVersion = 8
var requiredMinorVersion = 0
var requiredRevision = 0
var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision)


function flashIE(swf, width, height, param) {
  document.write("<object type=\"application/x-shockwave-flash\" data=\"" + swf + "\"")
  document.write("  width=\"" + width + "\"")
  document.write("  height=\"" + height + "\">")
  document.write("<param name=\"movie\" value=\"" + swf + "\"/>")
  document.write("\"" + param)
  document.write("</object>")
}


function flashWriter(element, swf, width, height, param) {
    var el = $(element)
    if (!el) {
        return
    } else {
        if (hasReqestedVersion) {
            var s = "<object type=\"application/x-shockwave-flash\" data=\"" + swf + "\""
            + "  width=\"" + width + "\""
            + "  height=\"" + height + "\">"
            + "<param name=\"movie\" value=\"" + swf + "\"/>"
			+ "<param name=\"wmode\" value=\"transparent\"/>"
            + "\"" + param
            "</object>"
            Element.update(el, s)
        } else {
            Element.update(el, "<div id=\"flash-alt-" + swf + "\" style=\"width: " + width + "; height: " + height + "\"></div>")
            new Ajax.Updater('flash-alt-' + swf, '/php/ajax-flash.php?flash=' + swf, {
                method: 'get', onFailure: function(){ alert('Something went wrong...')} });
        }
    }
}