﻿// JScript File
function DisplayIntroMovie(movieName, imageName)
{
    var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    if (hasRightVersion) 
    {  // if we've detected an acceptable version
        var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
          + 'width="860" height="269"'
          + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">'
          + '<param name="movie" value="' + movieName + '" />'
          + '<param name="quality" value="high" />'
          + '<param name="menu" value="false" />'
          + '<param name="wmode" value="transparent" />'
          + '<!--[if !IE]> <-->'
          + '<object data="' + movieName + '"'
          + '  width="860" height="115" type="application/x-shockwave-flash">'
          + '  <param name="quality" value="high" />'
          + '  <param name="menu" value="false" />'
          + '  <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />'
          + '  <param name="wmode" value="transparent" />'
          + '    FAIL (the browser should render some flash content, not this).'
          + '  </object>'
          + '  <!--> <![endif]-->'
         + '<\/object>';
        document.write(oeTags);   // embed the flash movie
    }
    else 
    {
        var noFlash = IsNonFlashClient();
	    if (noFlash)
	    {
      		// flash is too old or we can't detect the plugin     		   
	        var alternateContent = '<div id="head-pic"></div>' +
                                   '<div id="head-block">' +
                                   '<h1>Physical fitness coming from mind.</h1>' +
                                   '<ul>' +
                                     '<li><a href="#">Focus on body balance</a></li>' +
                                     '<li><a href="#">Learn awareness of breath</a></li>' +
                                   '</ul>' +
                                  '<a href="SpecialOffer.aspx" id="head-button">start now<span>online special offer</span></a> </div>';
      	}
	    else
	    {
      		// flash is too old or we can't detect the plugin
      		var alternateContent = '<div class="NoFlash">'
                           + '<img src="' + imageName + '" />'
                           + '<div class="FlashText">'
                           + 'This content requires the Macromedia Flash Player.<a href="http://www.macromedia.com/go/getflash/">Get Flash</a></div></div>';
	    }
		
	    document.write(alternateContent);  // insert non-flash content
    }
}


