

//ÇÃ·¡½ÃºÎºÐ
function set_Embed()
{
  var obj = new String;
  var parameter = new String;
  var embed = new String;
  var html = new String;
  var allParameter = new String;
  var clsid = new String;
  var codebase = new String;
  var pluginspace = new String;
  var embedType = new String;
  var src = new String;

  var width = new String;
  var height = new String;

  var ServerIp = new String;
  var UserId = new String;
  var PassiveMode = new String;
  var Port = new String;
  var Status = new String;
  var Banner = new String;
  var ECHosting = new String;
  var FilelinkService = new String;
  var FilelinkServer = new String;

  this.init = function( s ,w , h, getType ) {
      getType = (getType != undefined)? getType :'flash';
      if ( getType == "flash")
      {
        clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0";
        pluginspage = "http://www.macromedia.com/go/getflashplayer";
        embedType = "application/x-shockwave-flash";

        parameter += "<param name='movie' value='"+ s + "'>\n";
        parameter += "<param name='quality' value='high'>\n";
        parameter += "<Param name='bgcolor' value=#FFFFFF>\n";

      }
      else if ( getType == 'webftp')
      {
        clsid = "EF256D78-3982-4F12-900B-AD8B254A43BD";
        codebase = "http://echosting.cafe24.com/ftpclient/Cafe24FtpCtl21.cab#version=1,0,2,7";
      }
      else if ( getType == 'filelinkftp')
      {
        clsid = "EF256D78-3982-4F12-900B-AD8B254A43BD";
        codebase = "http://echosting.cafe24.com/ftpclient/Cafe24FtpCtl14.cab#version=1,0,2,4";
      }



      src = s;
      width = w;
      height = h;
  }

  this.parameter = function( parm , value ) {
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";
      allParameter += " "+parm + "='"+ value+"'";
  }

  this.show = function(getType) {
      if ( clsid)
      {
        obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\"";

        if (width) {
            obj += " width ='" + width + "' ";
        }

        if (height) {
            obj += " height ='" + height + "' ";
        }

        obj += ">\n";
      }

      if ( getType == "flash" || typeof(getType) == "undefined") {
      	embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "'";

        if (width) {
            embed += " width ='" + width + "' ";
        }

        if (height) {
            embed += " height ='" + height + "' ";
        }

        embed += allParameter + " ></embed>\n";
      }

      if (getType == 'streaming') {
      	embed = "<embed src='" + src + "' type='"+ embedType + "'";

        if (width) {
            embed += " width ='" + width + "' ";
        }

        if (height) {
            embed += " height ='" + height + "' ";
        }

        embed += allParameter + " ></embed>\n";
      }

      if ( obj )
      {
        end_embed = "</object>\n";
      }

      if(getType == 'streaming')
	      html = embed;
      else
	      html = obj + parameter + embed + end_embed;

      document.write( html );
  }
}



function insertFlash(FlashIDName, FlashFileName, FlashWidth, FlashHeight, DNSSetting, WMODESetting, FlashBGColor, QSetting, FlashAlign)
{
	document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('CODEBASE="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" ');
	document.write(' ID="'+FlashIDName+'" WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" ALIGN="'+FlashAlign+'">');
	document.write('<PARAM NAME="movie" VALUE="'+ FlashFileName +'">');
	document.write('<PARAM NAME="quality" VALUE="'+QSetting+'">');
	document.write('<PARAM NAME="bgcolor" VALUE="'+FlashBGColor+'">');
	document.write('<PARAM NAME="wmode" VALUE="'+WMODESetting+'">');
	document.write('<PARAM NAME="allowScriptAccess" VALUE="'+DNSSetting+'">');
	document.write('<EMBED SRC="'+ FlashFileName +'"  NAME="'+FlashIDName+'"');
	document.write(' WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" QUALITY="'+QSetting+'" BGCOLOR="'+FlashBGColor+'"');
	document.write(' ALLOWSCRIPTACCESS="'+DNSSetting+'" ALIGN="'+FlashAlign+'" WMODE="'+WMODESetting+'" TYPE="application/x-shockwave-flash" ');
	document.write(' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" >');
	document.write('</EMBED>');
	document.write('</OBJECT>');
}


function insertFlash(swf, width, height, bgcolor, id, flashvars, wmode )
{
 var strFlashTag = new String();

 if (navigator.appName.indexOf("Microsoft") != -1)
 {
	 alert(swf);
	 alert(width);
	 alert(height);
	 alert(bgcolor);
	 alert(id);
	 alert(flashvars);
	 alert(wmode);
  strFlashTag += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
  strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
  strFlashTag += 'id="' + id + '" width="' + width + '" height="' + height + '">';
  strFlashTag += '<param name="movie" value="' + swf + '"/>';

  if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
  strFlashTag += '<param name="quality" value="best"/>';
  if(wmode != null) { strFlashTag += '<param name="wmode" VALUE="' + wmode + '"/>'; }
  strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
  strFlashTag += '<param name="menu" value="false"/>';
  strFlashTag += '<param name="salign" value="LT"/>';
  strFlashTag += '<param name="scale" value="noscale"/>';
  strFlashTag += '<param name="wmode" value="transparent"/>';
  strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
  strFlashTag += '</object>';
 }
 else
 {
  strFlashTag += '<embed src="' + swf + '" ';
  strFlashTag += 'quality="best" ';
  strFlashTag += 'bgcolor="' + bgcolor + '" ';
  strFlashTag += 'width="' + width + '" ';
  strFlashTag += 'height="' + height + '" ';
  strFlashTag += 'menu="false" ';
  strFlashTag += 'scale="noscale" ';
  strFlashTag += 'id="' + id + '" ';
  strFlashTag += 'salign="LT" ';
  strFlashTag += 'wmode="transparent" ';
  strFlashTag += 'allowScriptAccess="sameDomain" ';  
  if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
  strFlashTag += 'type="application/x-shockwave-flash" ';
  strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
  strFlashTag += '</embed>';
 }

 document.write(strFlashTag);
}
 

function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


//ÇÃ·¡½Ã Åõ¸íÀ¸·Î ÇÏ½Ç²¨¸é "transparent" ¾²½Ã°î ¹ÙÅÁ»öÀ» ÁÖ½Ç²¨¸é "transparent"¸¦ »èÁ¦ÇØÁÖ¼¼¿ä.


function script_flash(flash_root,w,h){
 flash_str=" <object name='body' id='body' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+w+"' height='"+h+"'> ";
 flash_str=flash_str+" <param name='movie' value='"+flash_root+"'> ";
 flash_str=flash_str+" <param name='quality' value='high'> ";
 flash_str=flash_str+" <param name='wmode' value='transparent' /> ";
 flash_str=flash_str+" <embed src='"+flash_root+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'></embed> ";
 flash_str=flash_str+" </object> ";

 document.write(flash_str);
}

