//*****PutSwf v1.0
function PutSwf(file,w,h,scale)
{
  document.write(GenSwf(file,w,h,scale));
}

//*****PutSwf v1.0
function GenSwf(file,w,h,scale)
{
  var scrW,srcH;
  
  scrW = screen.width - 10;
  scrH = screen.height - 50;
  
  //scale movie to screen
  if(scale == true)
	for(i=1;i<2000;i++,h++,w++)
		if(h >= scrH || w >= scrW) break;
  
  str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width="+w+" height="+h+">\n";
  str = str + "<param name=movie value='"+file+"'>\n";
  str = str + "<param name=quality value=high>\n";
  str = str + "<embed src='"+file+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width="+w+" height="+h+">\n";
  str = str + "</embed>\n";
  str = str + "</object>\n";

  return str;
}