function RenderAndPlayWMV(id, movieURL, width, height, showControls, showStatusBar, autoStart) 
{
	var containerId = "fwmvcontainer_" + id;
	var WMVHTML = "";
	
	/*if (window.ActiveXObject && navigator.userAgent.indexOf('Mac') == -1) { // PC IE
		WMVHTML += "<object classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' width='" + width + "' height='" + height + "' id='" + id + "' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' type='application/x-oleobject'>";
		WMVHTML += "<param name='src' value='" + movieURL + "' />";
		WMVHTML += "<param name='autoStart' value='" + autoStart + "' />";
		WMVHTML += "<param name='showControls' value='" + showControls + "' />";
		WMVHTML += "<param name='showStatusBar' value='" + showStatusBar + "' />";
		WMVHTML += "<param name='loop' value='false' />";
		WMVHTML += "<param name='stretchToFit' value='true' />";
        WMVHTML += "<" + "/object>";
    }
    else {*/
		WMVHTML += "<embed id='" + id + "_e' src='" + movieURL + "' width='" + width + "' height='" + height + "' autoStart='" + autoStart + "' loop='false' stretchToFit='true' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/'";
        WMVHTML += " showControls='" + showControls + "'";
		WMVHTML += " showStatusBar='" + showStatusBar + "'";
        WMVHTML += "><" + "/embed>";
    //}

	document.getElementById(containerId).innerHTML = WMVHTML;
	//$("#"+containerId).css("z-index", "-1");
}

function RenderWMV(id, movieURL, width, height, showControls, showStatusBar, autoStart, placeholderImage) 
{
	if (showControls == null) { showControls = true; }
	if (showStatusBar == null) { showStatusBar = true; }

	var containerId = "fwmvcontainer_" + id;

	if (placeholderImage != null && placeholderImage != '') {
		var clickString = "RenderAndPlayWMV('" + id + "', '" + movieURL + "', '" + width + "', '" + height + "', " + showControls + ", " + showStatusBar + ", true);";
		var WMVHTML = '<div style="width:100%;text-align:center; z-index: 0;"><a style="float:none;" href="javascript:void(0);" onclick="' + clickString + '"><img style="float:none;" src="' + placeholderImage + '" alt="Click here to play video." /></a></div>';
		document.getElementById(containerId).innerHTML = WMVHTML;
	} 
	else {
		RenderAndPlayWMV(id, movieURL, width, height, showControls, showStatusBar, autoStart);
	}
}
