function drawControlObj(w,h,objectId,embedId, filePath)
{
        try
        {
                document.write("<OBJECT CLASSID='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' ID='"+objectId+"' NAME='"+objectId+"' WIDTH='"+w+"' HEIGHT='"+h+"'>");
                document.write("<PARAM NAME='movie' VALUE='"+filePath+"' />");
                document.write("<PARAM NAME=play VALUE=true />");
                document.write("<PARAM NAME=loop VALUE=true />");
                document.write("<PARAM NAME=menu VALUE=false />");
                document.write("<PARAM NAME=wmode VALUE=transparent />");
                document.write("<PARAM NAME=quality VALUE=high />");
		document.write("<PARAM NAME=allowScriptAccess VALUE=always />");
                document.write("<EMBED wMode='transparent' SRC='"+filePath+"' id='"+embedId+"' type='application/x-shockwave-flash'  SWLiveConnect=TRUE play=true menu=false WIDTH='"+w+"' HEIGHT='"+h+"' quality=best bgcolor=#ffffff loop=true allowScriptAccess='always' pluginspage='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>")
        }
        catch(ex)
        {
        }
}

function drawTinyPlayer (w,h,objId, embId, fileName)
{
	try
	{
		document.write ('<object id="'+objId+'" width="'+w+'" height="'+h+'" style="display:none;background-color:black;border:none;" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
		document.write ('<param name="BufferingTime" value="8"><param name="AllowChangeDisplaySize" value="false" />');
		document.write ('<param name="autoplay" value="true"><param name="ControlType" value=1 />');
		document.write ('<param name="EnableContextMenu" value="false"><param name="stretchToFit" value="true" />');
		document.write ('<param name="uiMode" value="none"><param name="volume" value="100" />');
		document.write ('<param name="url" value="'+fileName+'" />');
		document.write ('<embed id="'+embId+'" autoplay="1" height="'+h+'" width="'+w+'"');
		document.write (' BufferingTime="8" uiMode="none" volume="100" url="'+fileName+'"></embed>');
		document.write ('</object>');

	}
	catch (ex)
	{
	}
}

function drawPlayer (w,h,objId, embId, fileName)
{
	try
	{
		document.write ('<OBJECT ID="'+objId+'" WIDTH="'+w+'" HEIGHT="'+h+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="ومُْ..." type="application/x-oleobject">')
		document.write ('<PARAM NAME="FileName" VALUE="'+fileName+'">');
		document.write ('<PARAM NAME="ShowDisplay" VALUE="0">');
		document.write ('<PARAM NAME="ShowTracker" VALUE="1">');
		document.write ('<PARAM NAME="Autostart" VALUE="1">');
		document.write ('<PARAM NAME="PlayCount" VALUE="0">');
		document.write ('<PARAM NAME="Volume" VALUE="0">');
		document.write ('<PARAM NAME="EnableContextMenu" VALUE="FALSE">');
		document.write ('<embed type="application/x-mplayer2" id="'+embId+'"');
		document.write (' pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"');
		document.write (' src="'+fileName+'" width="'+w+'" height="'+h+'" autostart="1" EnableContextMenu="0"');
		document.write (' playcount="0" volume="0" showdisplay="0" showtracker="1"></embed>');
		document.write ('</OBJECT>');
	}
	catch (ex)
	{
	}
}

function drawPlayer2 (w,h,objId, embId, fileName)
{
	var WMP7;

	try
        {
		if(window.ActiveXObject)
		{
		    WMP7 = new ActiveXObject("WMPlayer.OCX.7");
		}
		else if (window.GeckoActiveXObject)
		{
		     WMP7 = new GeckoActiveXObject("WMPlayer.OCX.7");
		}
	} catch (ex)
        {
        }

	// Windows Media Player 7 Code
	if ( WMP7 )
	{
	     document.write ('<OBJECT ID="'+objId+'" ');
	     document.write (' CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6');
	     document.write (' standby="Loading Microsoft Windows Media Player components..."');
	     document.write (' TYPE="application/x-oleobject" width="'+w+'" height="'+h+'">');
	     document.write ('<PARAM NAME="url" VALUE="'+fileName+'">');
	     document.write ('<PARAM NAME="AutoStart" VALUE="true">');
	     document.write ('<PARAM NAME="ShowControls" VALUE="1">');
	     document.write ('<PARAM NAME="uiMode" VALUE="mini">');
		document.write ('<PARAM NAME="ShowDisplay" VALUE="false">');
		document.write ('<PARAM NAME="ShowStatusBar" VALUE="false">');
		document.write ('<PARAM NAME="ShowTracker" VALUE="true">');
		document.write ('<PARAM NAME="EnableContextMenu" VALUE="false">');
	}

	// Windows Media Player 6.4 Code
	else
	{
	     //IE Code
	     document.write ('<OBJECT ID="'+objId+'" ');
	     document.write ('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 ');
	     document.write ('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 ');
	     document.write ('standby="Loading Microsoft Windows Media Player components..." ');
	     document.write ('TYPE="application/x-oleobject" width="'+w+'" height="'+h+'">');
	     document.write ('<PARAM NAME="FileName" VALUE="'+fileName+'">');
	     document.write ('<PARAM NAME="AutoStart" VALUE="true">');
	     document.write ('<PARAM NAME="ShowControls" VALUE="1">');
		document.write ('<PARAM NAME="ShowDisplay" VALUE="0">');
		document.write ('<PARAM NAME="ShowStatusBar" VALUE="0">');
		document.write ('<PARAM NAME="ShowTracker" VALUE="1">');
		document.write ('<PARAM NAME="EnableContextMenu" VALUE="false">');
	}

     //Netscape code
     document.write ('    <Embed type="application/x-mplayer2"');
     document.write ('        pluginspage="http://www.microsoft.com/windows/windowsmedia/"');
     document.write ('        filename="'+fileName+'"');
     document.write ('        src="'+fileName+'"');
     document.write ('        Name="'+embId+'"');
     document.write ('        ShowControls=1');
     document.write ('        ShowDisplay=0');
     document.write ('        EnableContextMenu=0');
     document.write ('        showtracker=0');
     document.write ('        ShowStatusBar=0');
     document.write ('        width='+w);
     document.write ('        height='+h+'>');
     document.write ('    </embed>');

     document.write ('</OBJECT>');
}

function drawControlObj2(w,h,objectId,embedId, filePath)
{
        try
        {
                document.write("<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ID='"+objectId+"' WIDTH='"+w+"' HEIGHT='"+h+"'>");
                document.write("<PARAM NAME='movie' VALUE='"+filePath+"' />");
                document.write("<PARAM NAME=play VALUE=true />");
                document.write("<PARAM NAME=loop VALUE=false />");
                document.write("<PARAM NAME=menu VALUE=false />");
                document.write("<PARAM NAME=wmode VALUE=transparent />");
                document.write("<PARAM NAME=quality VALUE=high />");
                document.write("<EMBED wMode='transparent' SRC='"+filePath+"' id='"+embedId+"' type=application/x-shockwave-flash  SWLiveConnect=TRUE play=true menu=false WIDTH='"+w+"' HEIGHT='"+h+"' quality=best bgcolor=#ffffff loop=false pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED></OBJECT>")
        }
        catch(ex)
        {
        }
}

