function checkos(audiourl)
{
var OSType = navigator.platform;

	if (navigator.platform == 'Win32')
	{
	document.write('You are running on a Microsoft OS<br>');
	WMVPlayer(audiourl);
	}
	if (navigator.platform == 'MacPPC')
	{
	//document.write('You are running on a Mac OS');
	VideoPlay(audiourl);
	}
}


function VideoPlay(filepath)
{
var parameters = '<EMBED id="targetmov" src="'+filepath+'" pluginspage="http://www.apple.com/quicktime/download/" autostart="true" loop="false" width="320" height="240" controller="true" scale="tofit" enablejavascript=true" cache="true" align="center" valign="middle"></EMBED>';
document.getElementById('videoplayer').innerHTML = parameters;
//var parameters = '<OBJECT id="targetmov" CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="242" ><PARAM name="SRC" VALUE="'+filepath+'"><PARAM name="AUTOPLAY" VALUE="true"><PARM name="scale" VALUE="true"><EMBED id="targetmov" src="'+filepath+'" pluginspage="http://www.apple.com/quicktime/download/" autostart="true" loop="false" width="320" height="242" controller="true" scale="ASPECT" PLUGIN = "quicktimeplugin" TYPE = "video/quicktime" scale="tofit" enablejavascript=true" cache="true" align="center" valign="middle"></EMBED></OBJECT>\n';
//document.getElementById('videoplayer').innerHTML = parameters;
}


function AudioPlay(filepath)
{
var parameters = '<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="42" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><PARAM name="SRC" VALUE="'+filepath+'"><PARAM name="AUTOPLAY" VALUE="true"/><param name="controller" value="true" /><EMBED SRC="'+filepath+'" pluginspage="http://www.apple.com/quicktime/download/" WIDTH="320" HEIGHT="42" AUTOPLAY="true" controller="true"></EMBED></OBJECT>\n';
document.getElementById('audioplayer').innerHTML = parameters;
}

function WMVPlayer(filepath)
{
var parameters = '<OBJECT id="mediaPlayer" ';
parameters = 'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ';
parameters = 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ';
parameters = 'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" width="320" height="242" STYLE="font-size: xx-small"> ';
parameters = '<param name="fileName" value="' +filepath+ '"> ';
parameters = '<param name="animationatStart" value="true"> ';
parameters = '<param name="transparentatStart" value="false"> ';
parameters = '<param name="autoStart" value="true"> ';
parameters = '<param name="showControls" value="true"> ';
parameters = '<param name="loop" value="false"> ';
parameters = '<PARAM NAME="windowlessVideo" VALUE="true"> ';
parameters = '<EMBED type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" showcontrols="true" width="320" height="242" STYLE="font-size: xx-small" src="' +filepath+ '" autostart="1" loop="false"></EMBED></OBJECT>\n';
document.getElementById('videoplayer').innerHTML = parameters;
}




function PauseVideoPlayImage(movieimage,moviepath)
{
var parameters = '<EMBED SRC        = "'+movieimage+'" HREF       = "'+moviepath+'" TARGET     = "myself" CONTROLLER = "true" WIDTH      = "320" HEIGHT     = "260" LOOP       = "false" AUTOPLAY   = "true"  PLUGIN     = "quicktimeplugin" TYPE       = "video/quicktime" scale	   = "ASPECT" PLUGINSPAGE= "http://www.apple.com/quicktime/download/" cache="false"></EMBED>\n';
document.getElementById('DivVideoPausePlay').innerHTML = parameters;
}

function PauseVideoPlay(moviepath)
{
var parameters = '<EMBED src="'+moviepath+'" pluginspage="http://www.apple.com/quicktime/download/" autostart="false" loop="false" width="320" height="260" controller="false" scale="ASPECT" target="myself" type="image/x-quicktime"></EMBED>\n';
document.getElementById('DivVideoPausePlay').innerHTML = parameters;
}




