function getFlashInsert()
{
	var alternateContent = '<a href="http://www.adobe.com/go/getflash/"><img src="{$web_root}images/noflash.jpg" border="0" alt="No flash plugin"></a>';
	return alternateContent;
}

function getQTInsert()
{
	var alternateContent = '<div style="width:505px; height:380px">'
	                                + '<a href=http://www.apple.com/quicktime/download/> '
	                                + '<img src="{$web_root}images/noqt.jpg" border="0" alt=" ">';
	                                + '</a></div>';
	return alternateContent;
}

function getWMInsert()
{
	var alternateContent = '<a href="http://www.microsoft.com/Windows/MediaPlayer/"><img src="{$web_root}images/nowmp.jpg" border="0" alt=" "></a>';
	return alternateContent;
}

function insertOjbectFF()
{
	var result = '';
	result += '<OBJECT id="Player" type="application/x-ms-wmp" width="'+ width+'px" height="'+height+'px">';
	result +='<PARAM name="autoStart" value="True">';
	document.write('<PARAM NAME="stretchToFit" VALUE="1">');
	//document.write('<PARAM name="url" value="../index.asx"/>')
	result +='<PARAM name="currentPosition" value="'+startposition+'">';
	result +='<PARAM name="playCount" value="9999">';
	result +='<PARAM name="url" value="'+filepath+'"/>';
	result +='</OBJECT>';
	return result;
}

function insertObjectIE()
{
	var result;
	result += '<OBJECT ID="Player" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+ width+'px" height="'+height+'px">';
    result += '<PARAM name="autoStart" value="True">';
    //document.write('<PARAM name="url" value="../index.asx"/>')
    result += '<PARAM name="url" value="'+filepath+'"/>';
    result += '<PARAM NAME="stretchToFit" VALUE="True">';
    result += '<PARAM name="currentPosition" value="'+startposition +'">';
	result += '<PARAM name="playCount" value="9999">';
    result += '<PARAM name="pluginspage" value="http://www.microsoft.com/windows/windowsmedia/player/mac/mp9/default.aspx"/>';
    result += '</OBJECT>';
    return result;
}

function writeVBblock()
{
    document.writeln('<script language="VBscript">');

    document.writeln('\'do a one-time test for a version of VBScript that can handle this code');
    document.writeln('detectableWithVB = False');
    document.writeln('If ScriptEngineMajorVersion >= 2 then');
    document.writeln('  detectableWithVB = True');
    document.writeln('End If');

    document.writeln('\'this next function will detect most plugins');
    document.writeln('Function detectActiveXControl(activeXControlName)');
    document.writeln('  on error resume next');
    document.writeln('  detectActiveXControl = False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');
    document.writeln('  End If');
    document.writeln('End Function');

    document.writeln('\'and the following function handles QuickTime');
    document.writeln('Function detectQuickTimeActiveXControl()');
    document.writeln('  on error resume next');
    document.writeln('  detectQuickTimeActiveXControl = False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('    detectQuickTimeActiveXControl = False');
    document.writeln('    hasQuickTimeChecker = false');
    document.writeln('    Set hasQuickTimeChecker = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');
    document.writeln('    If IsObject(hasQuickTimeChecker) Then');
    document.writeln('      If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then ');
    document.writeln('        detectQuickTimeActiveXControl = True');
    document.writeln('      End If');
    document.writeln('    End If');
    document.writeln('  End If');
    document.writeln('End Function');

    document.writeln('</scr' + 'ipt>');	
}