﻿function FlashSwitch2 ( swfURL, swfW, swfH, swfStage, imgURL, imgW, imgH, imgStage, swfOptions ) {

	// Create Flash TML object
	var myObj = new FlashTML( swfURL, swfW, swfH, swfOptions );

	// Check if Flash is NOT installed
	if ( !FlashDetect.installed ) { 
		// If not, 
		// Add img tag to given stage
		$(document.createElement("img")).attr({ src: imgURL, width: imgW, height: imgH }).appendTo( imgStage );

	} else {
		// Else, if Flash exists
		// Show the SWF on the given stage
		myObj.replace( swfStage ); 
	
	}

}
