﻿// JScript File
function ShowFlash(sName){
    var PlayFile = '../resources/swf/'+sName; //'resources/swf/Ani01_v2-00'
    //var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    //if(hasRightVersion) {  // if we've detected an acceptable version
	    if (AC_FL_RunContent == 0) {
		    alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
	    } else {
		    // embed the flash movie
		    AC_FL_RunContent(
			    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0',
			    'width', '720',
			    'height', '180',
			    'src', PlayFile,
			    'quality', 'high',
			    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			    'align', 'middle',
			    'play', 'true',
			    'loop', 'false',
			    'scale', 'exactfit',
			    'wmode', 'window',
			    'devicefont', 'false',
			    'id', sName,
			    'bgcolor', '#ffffff',
			    'name', sName,
			    'menu', 'false',
			    'allowScriptAccess','sameDomain',
			    'movie', PlayFile,
			    'salign', ''
			    ); //end AC code
	    }
    //} else {  // flash is too old or we can't detect the plugin
	//    var alternateContent = 'Alternate HTML content should be placed here.'
	//    + 'This content requires the Macromedia Flash Player.'
	//    + '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
	//    document.write(alternateContent);  // insert non-flash content
    //}

}//endFunction

function ShowFlash_v2(){
    var n = arguments.length;
    var sName = arguments[0];
    
    var sFlashVar = "";
    var sVersion = "version=7,0,0,0";
    if(n>1)
        sFlashVar = arguments[1];
    if(n>2)
        if(arguments[2]=='9')
            sVersion = "version=9,0,0,0"
    
    //alert(sFlashVar);
    
    var PlayFile = '../resources/swf/'+sName; //'resources/swf/Ani01_v2-00'
    //var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    //if(hasRightVersion) {  // if we've detected an acceptable version
	    if (AC_FL_RunContent == 0) {
		    alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
	    } else {
		    // embed the flash movie
		    AC_FL_RunContent(
			    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#'+sVersion,
			    'width', '450',
			    'height', '390',
			    'src', PlayFile,
			    'quality', 'high',
			    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			    'align', 'middle',
			    'play', 'true',
			    'loop', 'false',
			    'scale', 'exactfit',
			    'wmode', 'window',
			    'devicefont', 'false',
			    'id', sName,
			    'bgcolor', '#ffffff',
			    'name', sName,
			    'menu', 'false',
			    'allowScriptAccess','sameDomain',
			    'movie', PlayFile,
			    'salign', '',
			    'FlashVars', sFlashVar
			    ); //end AC code
	    }
    //} else {  // flash is too old or we can't detect the plugin
	//    var alternateContent = 'Alternate HTML content should be placed here.'
	//    + 'This content requires the Macromedia Flash Player.'
	//    + '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
	//    document.write(alternateContent);  // insert non-flash content
    //}

}//endFunction