function ShowFlashVideo(CDNServer, FlashVideo, DistributionMethod)
{

	// Version check based upon the values entered above in "Globals"
	//var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

	var FlashVideoDirectory = "/video/"

	FlashVideo = FlashVideo.replace(/.flv/g, "")


	if(window.location.protocol=="https:"){
		var StreamName = "https://" + CDNServer + FlashVideo
	}
	else {
		var StreamName = "http://" + CDNServer + FlashVideo
	}

	if (DistributionMethod == "WEB") {
		// Remove CDN Server and use the link as local
		CDNServer = ""
		FlashVideo = FlashVideo.replace(/\/video\//g, "")
		StreamName = FlashVideo
	}

	// alert(StreamName);
	// alert(DistributionMethod);

	var randomnumber = Math.floor(Math.random()*5)
	// 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

	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='522' height='384' id='FLVPlayer' class=''>");
   	document.write("     <param name='movie' value='" + FlashVideoDirectory + "FLVPlayer_Progressive.swf' />");
	document.write("     <param name='salign' value='lt' />");
	document.write("     <param name='quality' value='high' />");
	document.write("     <param name='scale' value='noscale' />");
	document.write("     <param name='FlashVars' value='&MM_ComponentVersion=1&skinName=" + FlashVideoDirectory + "Halo_Skin_3&streamName=" + StreamName + "&autoPlay=false&autoRewind=true' />");
	document.write("     <embed src='" + FlashVideoDirectory + "FLVPlayer_Progressive.swf' flashvars='&MM_ComponentVersion=1&skinName=" + FlashVideoDirectory + "Halo_Skin_3&streamName=" + StreamName + "&autoPlay=false&autoRewind=true' quality='high' scale='noscale' width='522' height='384' name='FLVPlayer' salign='LT' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' />");
	document.write("     </embed>");
	document.write("</object>");
	// }

}


function MM_openBrWindow(theURL,winName,features) 
{ 
  window.open(theURL,winName,features);
}
