// JavaScript Document

function runFlashVideo(video,width,height)
{	
	/*** document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' +width+ '" height="' +height+ '">');
	document.write('<param name="movie" value="videoplayer.swf?videofile=media/video/' +video+ '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<embed src="videoplayer.swf?videofile=media/video/' +video+ '" width="' +width+ '" height="' +height+ '" quality="high" play="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" videofile="media/video/' +video+ '"></embed>');
document.write('</object>'); ***/

//New Javascript code
 if (FlashDetect.major >= 8) 
 {	
		document.write('<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' +width+ '" height="' +height+ '">');
		document.write('<param name="movie" value="/players/videoplayer.swf?videofile=media/video/' +video+ '" />');
		document.write('<embed src="/players/videoplayer.swf?videofile=media/video/' +video+ '" quality="high" width="' +width+ '" height="' +height+ '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');	
 } else {document.write('<p>Flash 8 or newer is required to view these videos.');
		document.write('<br>Download the flash player here - <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash Player Download</a></p>');
		}
}


// function to run from html file in another folder other than player
function runFlashVideoResources(video,base_url,width,height)
{	
	/*** document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' +width+ '" height="' +height+ '">');
	document.write('<param name="movie" value="' +base_url+ '/players/videoplayer.swf?videofile=' +base_url+ '/players/media/video/' +video+ '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<embed src="' +base_url+ '/players/videoplayer.swf?videofile=' +base_url+ '/players/media/video/' +video+ '" width="' +width+ '" height="' +height+ '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" videofile="' +video+ '"></embed>');
document.write('</object>'); ***/

//New Javascript code
 if (FlashDetect.major >= 8) 
 {
		document.write('<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' +width+ '" height="' +height+ '">');
		document.write('<param name="movie" value="' +base_url+ '/players/videoplayer.swf?videofile=' +base_url+ '/players/media/video/' +video+ '" />');
		document.write('<embed src="' +base_url+ '/players/videoplayer.swf?videofile=' +base_url+ '/players/media/video/' +video+ '" quality="high" width="' +width+ '" height="' +height+ '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
		 }
else { document.write('<p>Flash 8 or newer is required to view these videos.');
		document.write('<br>Download the flash player here - <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash Player Download</a></p>');
	}
} 

function runFlashSound(sound)
{
	/***document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="300" height="80">\n');
document.write('<param name="movie" value="/players/audioplayer.swf?audiofile=media/audio/' +sound+ '" />\n');
document.write('<param name="quality" value="high" /><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>\n');
document.write('<embed src="/players/audioplayer.swf?audiofile=media/audio/' +sound+ '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="80"></embed>\n');
document.write('</object>\n');***/

if (FlashDetect.major >= 8) 
 	{
		 document.write('<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="80">\n');
		document.write('<param name="movie" value="/players/audioplayer.swf?audiofile=media/audio/' +sound+ '" />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<embed src="/players/audioplayer.swf?audiofile=media/audio/' +sound+ '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="80"></embed>\n');
		document.write('</object>\n');
 	}
	else {document.write('<p>Flash 8 or newer is required to view these sounds.')
		document.write('<br>Download the flash player here - <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash Player Download</a></p>');
	}
}

// function to play sounds from within resources folder
function runFlashSoundResources(sound,base_url)
{
/*** document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="300" height="80">\n');
document.write('<param name="movie" value="../../players/audioplayer.swf?audiofile=' +base_url+'/players/media/audio/' +sound+ '" />\n');
document.write('<param name="quality" value="high" />\n');
//document.write('<param name="play" value="true" />\n');
document.write('<embed src="../../players/audioplayer.swf?audiofile=' +base_url+ '/players/media/audio/' +sound+ '" quality="high" play="true"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="80"></embed>\n');
document.write('</object>\n'); ***/


if (FlashDetect.major >= 8) 
 	{
		 document.write('<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="80">\n');
		document.write('<param name="movie" value="/players/audioplayer.swf?audiofile=' +base_url+'/players/media/audio/' +sound+ '" />\n');
		document.write('<param name="quality" value="high" />\n');
		//document.write('<param name="play" value="true" />\n');
		document.write('<embed src="/players/audioplayer.swf?audiofile=' +base_url+ '/players/media/audio/' +sound+ '" quality="high" play="true"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="80"></embed>\n');
		document.write('</object>\n');
	 }
	else {document.write('Flash 8 or newer is required to hear these sounds.')}
}
