var createFlv = function(id, flv_dimensions, flvfile, autoplay) {	

	//see if dimensions not set
	if(!flv_dimensions){
		alert("There is no flv dimensions set for ID: " + id);
		return;
	}
	
	if ($(id).tagName.toLowerCase() != 'div') 
		return;


	if ($(id)){
		if (swfobject.hasFlashPlayerVersion("8.0.0")) {
			var flashvars = {};
			var attributes = {};
			var re = '\/local\/';
			flashvars.path =  "../flash/" + flvfile.replace(re,''); // get the relative url
			flashvars.playerSkin = siteroot + "local/flash/SteelExternalAll.swf";
			flashvars.autoplay = (autoplay.toString().toLowerCase() == "true" ? "true" : "false");
			flv_playerSplit = flv_dimensions.split("x"); // this will split 475x262 
			width = flv_playerSplit[0];
			height = flv_playerSplit[1];			
			
			var params = {wmode: "transparent"}
			var swffile = siteroot + "local/flash/flashPlayer_" + flv_dimensions + ".swf";
			swfobject.embedSWF(swffile, id, width, height, "8.0.0",false, flashvars, params, attributes);
		}
		else 
		{
			var getflash = confirm ("Your browser currently does not support Flash Player 8.0, Click on OK if you wish to navigate away from this site and install this plug-in or click on Cancel if you wish to proceed without the plug-in. By clicking on Cancel the site may not function correctly.");
			if (getflash) window.open('http://www.adobe.com/products/flashplayer/');
		}
	} 
	else 
	{
		alert("Mismatched ID: " + id);
	}
};

