function MySWF() 
{
	this.FlashRequiredVersion = "7";
	this.ObjectName = "objectname";
	this.objectwidth = "400";
	this.objectheight = "300";
	this.MovieFile = "ActivationTest.swf";
	this.BackColor = "#FFFFFF";
	this.wmode = "window";
	this.ShowSWF = OutputSWF;
	this.scale = "exactfit";
	this.flashvars = "";

}

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
//  window.alert( 'Width = ' + myWidth );
//  window.alert( 'Height = ' + myHeight );
//  window.alert( 'Ratio = ' + myWidth / myHeight);
}


function OutputSWF() {

		alertSize();
		var Output;
		
		
		Output = "      <object                                                                                            ";
		Output = Output + "        classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"                                           ";
		
		//Output = Output + "        codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + this.FlashRequiredVersion + ",0,22,0\"";
		Output = Output + "        id=\"" + this.ObjectName + "\"                                                                            ";
		Output = Output + "        width=\"" + this.objectwidth + "\" height=\"" + this.objectheight + "\">                                                                    ";
		Output = Output + "        <param name=\"movie\" value=\"" + this.MovieFile + "\">                                              ";
		Output = Output + "        <param name=\"bgcolor\" value=\"" + this.BackColor + "\">                                                       ";
		Output = Output + "        <param name=\"quality\" value=\"high\">                                                          ";
		Output = Output + "        <param name=\"wmode\" value=\"" + this.wmode + "\">                                                          ";
		Output = Output + "        <param name=\"scale\" value=\"" + this.scale + "\">                                                          ";
		Output = Output + "        <param name=\"allowscriptaccess\" value=\"samedomain\">                                          ";
		Output = Output + "        <param name=\"flashvars\" value=\"" + this.flashvars + "\" />		";
		Output = Output + "        <embed                                                                                           ";
		Output = Output + "          type=\"application/x-shockwave-flash\"                                                         ";
		//Output = Output + "          pluginspage=\"http://www.macromedia.com/go/getflashplayer\"                                    ";
		Output = Output + "          name=\"" + this.ObjectName + "\"                                                                        ";
		Output = Output + "          width=\"" +  this.objectwidth + "\" height=\"" + this.objectheight + "\"                                                                   ";
		Output = Output + "          src=\"" + this.MovieFile + "\"                                                                     ";
		Output = Output + "          bgcolor=\"" + this.BackColor + "\"                                                                            ";
		Output = Output + "          quality=\"high\"                                                                               ";
		Output = Output + "          wmode=\"" + this.wmode + "\"                                                                               ";
		Output = Output + "          scale=\"" + this.scale + "\"                                                                               ";
		Output = Output + "          flashvars=\"" + this.flashvars + "\"                                                                               ";
		Output = Output + "          swliveconnect=\"true\"                                                                         ";
		Output = Output + "          allowscriptaccess=\"samedomain\">                                                              ";
		Output = Output + "          <noembed>                                                                                      ";
		Output = Output + "          </noembed>                                                                                     ";
		Output = Output + "        </embed>                                                                                         ";
		Output = Output + "      </object>                                                                                          ";
		
		this.TargetDIV.innerHTML = Output;

}

n=navigator.userAgent;
w=n.indexOf("MSIE");
if((w>0)&&(parseInt(n.charAt(w+5))>5)){
T=["object","embed","applet"];
for(j=0;j<2;j++){
E=document.getElementsByTagName(T[j]);
for(i=0;i<E.length;i++){
P=E[i].parentNode;
H=P.innerHTML;
P.removeChild(E[i]);
P.innerHTML=H;
}}}