//register globals required for flash version detection
var requiredMajorVersion = 7;		// Major version of Flash required
var requiredMinorVersion = 0;		// Minor version of Flash required
var requiredRevision = 0;			// Minor version of Flash required


//function used to open a new window
function new_window(url) {
	link = window.open(url,"rev_history","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=515,height=400,left=300,top=50");
}

//===================================================================
//function used to load main flash file (Power to Ontario. On Demand)
function pto_flash_version() {

	//set major version of flash required to 5
	requiredMajorVersion = 5;

	//check to see if the requested version is present
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	
	// Check to see if the version meets the requirements for playback
	if (hasReqestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
					"src", "/images/splash/oro-2009",
					"width", "466",
					"height", "367",
					"align", "middle",
					"id", "homeFlash",
					"quality", "high",
					"bgcolor", "#FFFFFF",
					"name", "homeFlash",
					"allowScriptAccess","sameDomain",
					"type", "application/x-shockwave-flash",
					'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
					"pluginspage", "http://www.adobe.com/go/getflashplayer",
					"wmode", "transparent",
					"classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
		);
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<a href="http://www.adobe.com/go/getflashplayer" target="_blank">'
		+ '<img src="/images/splash/animation-no-flash1.jpg" width="464" height="378" border="0" align="left"></a>'
		document.write(alternateContent);  // insert non-flash content
	}

}
//===================================================================

//===================================================================
//function used to load main flash file (Power to Ontario. On Demand)
function odim_flash_version() {

	//set major version of flash required to 5
	requiredMajorVersion = 6;

	//check to see if the requested version is present
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	
	// Check to see if the version meets the requirements for playback
	if (hasReqestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
					"src", "/images/splash/MSLine",
					"width", "303",
					"height", "193",
					"align", "middle",
					"id", "OntarioDemandFlash",
					"quality", "high",
					"bgcolor", "#FFFFFF",
					"name", "OntarioDemandFlash",
					"allowScriptAccess","sameDomain",
					"type", "application/x-shockwave-flash",
					'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
					"pluginspage", "http://www.adobe.com/go/getflashplayer",
					"wmode", "transparent",
					"classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
					"FlashVars", "&dataURL=/xml/chart/Ontario_Demand_Home_Page.xml"
		);
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<a href="/imoweb/siteShared/demand_price.asp?sid=ic">'
		+ '<img src="/weather/mkt2/ONDEMAND_Q_0.png" width="303" height="193" align="bottom" border="0" alt="Flash Player 8+ required to view animated Ontario Demand graph. Upgrade your Flash Player for a better website experience"></a>'
		document.write(alternateContent);  // insert non-flash content
	}

}
//===================================================================

//===================================================================
//function used to load main flash file (Power to Ontario. On Demand)
function gbft_flash_version() {

	//set major version of flash required to 5
	requiredMajorVersion = 5;

	//check to see if the requested version is present
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	
	// Check to see if the version meets the requirements for playback
	if (hasReqestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
					"src", "/images/splash/pie2D",
					"width", "98",
					"height", "98",
					"align", "middle",
					"id", "Ontario-GBF",
					"quality", "high",
					"bgcolor", "#FFFFFF",
					"name", "Ontario-GBF",
					"allowScriptAccess","sameDomain",
					"type", "application/x-shockwave-flash",
					'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
					"pluginspage", "http://www.adobe.com/go/getflashplayer",
					"wmode", "transparent",
					"classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
					"FlashVars", "&dataURL=/xml/chart/Generation_By_Fuel.xml"
		);
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<a href="/imoweb/media/md_supply.asp">'
		+ '<img src="/images/splash/pie-no-flash.gif" width="95" height="92" border="0"></a>'
		document.write(alternateContent);  // insert non-flash content
	}

}
//===================================================================