// Trailer Player by PLP 3-21-08

function Trailer( szType, szID, intWidth, intHeight, szMovieSource )
{
	this.TYPE		= szType;
	this.ID			= szID;
	this.WITDH	= intWidth;
	this.HEIGHT	= intHeight;
	this.SRC		=	szMovieSource;
	
	this.print = function ()
	{
		if("SWF" == this.TYPE) {
			document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
			document.write("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=6,0,40,0\" ");
			document.write("width=\"" + this.WITDH + "\" height=\"" + this.HEIGHT +"\" name=\"" + this.ID + "\" id=\"" + this.ID + "\" mediatype=\"flashPlayer\" >");
			document.write("<param name=\"movie\" value=\"" + this.SRC + "\">");
			document.write("<param name=\"quality\" value=\"high\">");
			document.write("<param name=\"bgcolor\" value=\"#FFFFFF\">");
			document.write("<embed src=\"" + this.SRC + "\" ");
			document.write("id=\"" + this.ID + "\" bgcolor=\"#FFFFFF\" height=\"" + this.HEIGHT +"\" width=\"" + this.WITDH + "\" ");
			document.write("quality=\"high\" type=\"application/x-shockwave-flash\"");
			document.write("pluginspage=\"http://www.macromedia.com/go/getflashplayer\">");														
			document.write("</embed></object>");
		}
		if("FLV" == this.TYPE){
			document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ");
			document.write("codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=8,0,0,0\" ");
			document.write("width=\"" + this.WITDH + "\" height=\"" + this.HEIGHT +"\" id=\"" + this.ID + "\" align=\"middle\" mediatype=\"flashPlayer\"> ");
			document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\">");
			document.write("<param name=\"movie\" value=\"" + this.SRC + "\">");
			document.write("<param name=\"quality\" value=\"high\">");
			document.write("<param name=\"bgcolor\" value=\"#ffffff\">");
			document.write("<embed src=\"" + this.SRC + "\" quality=\"high\" "); 
			document.write("bgcolor=\"#ffffff\" width=\"" + this.WITDH + "\" height=\"" + this.HEIGHT +"\" ");
			document.write("id=\"" + this.ID + "\" align=\"middle\" allowscriptaccess=\"sameDomain\" "); 
			document.write("type=\"application/x-shockwave-flash\" ");
			document.write("pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object>");
		}
		if("Apple" == this.TYPE){
			document.write("<object width=\"" + this.WITDH + "\" height=\"" + this.HEIGHT + "\" id=\"" + this.ID + "\" ");
			document.write("classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"");
			document.write("codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" mediatype=\"quicktime\">");
			document.write("<param name=\"src\" value=\"" + this.SRC + "\">");
			document.write("<param name=\"autoplay\" value=\"true\">");
			document.write("<param name=\"controller\" value=\"false\">");
			document.write("<embed src=\"" + this.SRC + "\" ");
			document.write("width=\"" + this.WITDH + "\" height=\"" + this.HEIGHT + "\" ");
			document.write("autoplay=\"true\" controller=\"false\" id=\"" + this.ID + "\" ");
			document.write("pluginspage=\"http://www.apple.com/quicktime/download/\"></embed></object>");
		}
		if("WM" == this.TYPE){
			document.write("<object title=\"" + this.ID + "\" id=\"" + this.ID + "\" width=\"" + this.WITDH + "\" height=\"" + this.HEIGHT + "\" ");
			document.write("comment=\"Windows Media Player 7\" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" ");
			document.write("standby=\"Loading Microsoft Windows Media Player components...\" ");
			document.write("type=\"application/x-oleobject\" mediatype=\"winMediaPlayer\"> ");
			document.write("<param name=\"URL\" value=\"" + this.SRC + "\"> ");
			document.write("<param name=\"animationatStart\" value=\"true\"> ");
			document.write("<param name=\"autoStart\" value=\"true\"> ");
			document.write("<param name=\"showControls\" value=\"true\"> ");
			document.write("<param name=\"loop\" value=\"false\"> ");
			document.write("<param name=\"bgcolor\" value=\"#000000\"> ");
			document.write("<embed title=\"mediaPlayer\" type=\"application/x-mplayer2\" ");
			document.write("pluginspage=\"http://microsoft.com/windows/mediaplayer/en/download/\" ");
			document.write("id=\"" + this.ID + "\" title=\"" + this.ID + "\" displaysize=\"4\" autosize=\"-1\" ");
			document.write("bgcolor=\"black\" showcontrols=\"true\" showtracker=\"-1\" ");
			document.write("showdisplay=\"0\" showstatusbar=\"-1\" videoborder3d=\"-1\" ");
			document.write("width=\"" + this.WIDTH + "\" height=\"" + this.HEIGHT + "\" ");
			document.write("src=\"" + this.SRC + "\" autostart=\"true\" designtimesp=\"5311\" ");
			document.write("loop=\"false\"></EMBED></object>");
		}
		if("" == this.TYPE){
			//Add More type if needed	
		}
		if("" == this.TYPE){
			//Add More type if needed
		}
	};
}

/*
-- SWF --
<object
	classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=6,0,40,0"
	width="#trailer.width#" height="#trailer.height#" name="#trailer.id#" id="#trailer.id#" mediatype="flashPlayer">
	<param name="movie" value="#Request.TrailerSource##GetProductSingle.txtTrailerFileName#">
	<param name="quality" value="high">
	<param name="bgcolor" value="##FFFFFF">
	<embed 
		src="#Request.TrailerSource##GetProductSingle.txtTrailerFileName#" 
		quality="high"
		bgcolor="##FFFFFF"
		width="#trailer.width#"
		height="#trailer.height#"
		id="#trailer.id#"
		type="application/x-shockwave-flash"
		pluginspage="http://www.macromedia.com/go/getflashplayer">
	</embed>
</object>
--FLV--
<object 
	classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
	codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=8,0,0,0"
	width="#trailer.width#" height="#trailer.height#" id="#trailer.id#" align="middle" mediatype="flashPlayer">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="movie" value="#Request.TrailerSource##GetProductSingle.txtTrailerFileName#" />
	<param name="quality" value="high" />
	<param name="bgcolor" value="##ffffff" />
	<embed 
		src="#Request.TrailerSource##GetProductSingle.txtTrailerFileName#" quality="high" 
		bgcolor="##ffffff" width="#trailer.width#" height="#trailer.height#" 
		id="#trailer.id#" align="middle" 
		allowscriptaccess="sameDomain" 
		type="application/x-shockwave-flash" 
		pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
--Quicktime--
<object width="#trailer.width#" height="#trailer.height#" id="#trailer.id#"
	classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
	codebase="http://www.apple.com/qtactivex/qtplugin.cab" mediatype="quicktime">
	<param name="src" value="#Request.TrailerSource##GetProductSingle.txtTrailerFileName#">
	<param name="autoplay" value="true">
	<param name="controller" value="false">
	<embed
		src="#Request.TrailerSource##GetProductSingle.txtTrailerFileName#"
		width="#trailer.width#" height="#trailer.height#"
		autoplay="true" controller="false" id="#trailer.id#"
		pluginspage="http://www.apple.com/quicktime/download/">
	</embed>
	
</object>
*/