﻿function EmbedFlash(path, height, width, flashvars)
{
  var obj = "<object codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" quality=\"high\" ";
  if(height.length > 0)
      obj += "height=\"" + height + "\" ";
  
  if(width.length > 0)
      obj += "width=\""+ width + "\" ";
  
  obj += "classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" VIEWASTEXT>\r\n";
    
  document.write( obj)
  document.write( "<param name=\"flashvars\" value=\"" + flashvars + "\" />\r\n" );
  document.write( "<param name=\"movie\" value=\"" + path + "\" />\r\n" );
  document.write( "<param name=\"src\" value=\"" + path + "\" />\r\n" );
  document.write( "<param name=\"quality\" value=\"high\" />\r\n" );
  document.write( "<param name=\"wmode\" value=\"transparent\" />\r\n" );
  document.write( "<embed src=\"" + path + "\" quality=\"high\" flashvars=\"" + flashvars + "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" menu=\"false\" height=\"" + height + "\" width=\"" + width + "\" wmode=\"transparent\" />\r\n" );
  document.write( "</object>\r\n" );
}

function EmbedFlashVideo(filepath, imagepath, containerid)
{
    var s1 = new SWFObject("/flash/player.swf","ply","328","200","9","#FFFFFF");
	s1.addParam("allowfullscreen","true");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("flashvars","file=" + filepath + "&image=" + imagepath);
	s1.write(containerid);
}