myFlash = new FlashObject();
with(myFlash) {
	src     = "logo.swf";
	width   = 418;
	height  = 94;
	wmode = "transparent";
	bgcolor = "#006600";
	printCode();
}

function FlashObject(argSrc,argWidth,argHeight) {
  with(this) {
    type              = "application/x-shockwave-flash";
    pluginspage       = "http://www.macromedia.com/go/getflashplayer";
    classid           = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";
    codebase          = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
    bgcolor           = "#ffffff";
    allowScriptAccess = "sameDomain";
    width             = argWidth;
    height            = argHeight;
    id                = "";
    align             = "middle"
    src               = argSrc;
    wmode             = "opaque";
//    altImg            = "";
    quality           = "high";
    // this is for other stuff not shown above //
    args              = Array();

    printCode = function () {
      if(!(this.width && this.height)) return _error_out("Width/Height not defined.");
      if(!(this.src)) return _error_out("Flash file not defined.");
      function _error_out(msg) { document.write('<font face="Arial" size=1 color="red">ERROR: '+msg+'</font><br>'); }

      argStr = embStr = "";
      for(var i in args) {
        argStr += '  <param name="'+i+'" value="'+args[i]+'" />';
        embStr += ' '+i+'="'+args[i]+'"';
      }

      document.write(
        '<object classid="'+this.classid+'" codebase="'+this.codebase+'" width="'+this.width+'" height="'+this.height+'" id="'+this.id+'" align="'+this.align+'">' +
        '  <param name="allowScriptAccess" value="'+this.allowScriptAccess+'" />' +
        '  <param name="movie" value="'+this.src+'" />' +
        '  <param name="quality" value="'+this.quality+'" />' +
        '  <param name="bgcolor" value="'+this.bgcolor+'" />' +
        '  <param name="wmode" value="'+this.wmode+'" />' +
           argStr +
        '  <embed src="'+this.src+'" quality="'+this.quality+'" bgcolor="'+this.bgcolor+'" wmode="'+this.wmode+'" width="'+this.width+'" height="'+this.height+'" name="'+this.id+'" align="'+this.align+'" allowScriptAccess="'+this.allowScriptAccess+'" type="'+this.type+'" pluginspage="'+this.pluginspage+'"'+embStr+' />' +
        '</object>'
      );
    }

  }

  return this;
}

