// FLASH

function Banner (ruta,alto,ancho) {
	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="'+ancho+'" height="'+alto+'">')
	document.write('<param name="movie" value="'+ruta+'" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="menu" value="false" />')
	document.write('<embed src="'+ruta+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ancho+'" height="'+alto+'"></embed>')
	document.write('</object>')
}

function FlashHome() {
	/*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="468" height="248" title="home">')
	document.write('<param name="movie" value="flash/FlashP.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<embed src="flash/FlashP.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="248"></embed>')
	document.write('</object>')*/
}


/*
// Player
function PlayerStr(pPelicula,pImagen,pAncho,pAlto,pBuffer) {
	document.write('<embed src="flvplayer.swf" width="'+pAncho+'" height="'+pAlto+'" allowfullscreen="true" allowscriptaccess="always" flashvars="&displayheight='+pAlto+'&bufferlength='+pBuffer+'&file='+pPelicula+'&height='+pAlto+'&image='+pImagen+'&width='+pAncho+'" />')
}
*/

//Reproductor Streaming On Demand
function PlayerStreaming(pPlayer,pAncho,pAlto,pImagen,pBuffer,p1,p2){
	var s1 = new SWFObject('player.swf','single',pAncho,pAlto,'7');
	s1.addParam('allowfullscreen','true');
	s1.addVariable('type', 'video');
	s1.addVariable("streamer",p1);
	s1.addVariable("file",p2);
// Variables para cambiar los colores
	s1.addVariable("backcolor","A70C29");
	s1.addVariable("frontcolor","CCCCCC");
	s1.addVariable("lightcolor","FFFFFF");
	s1.addVariable("screencolor","000000");
		
	s1.addVariable("image",pImagen);
	s1.addVariable("bufferlength",pBuffer);

	s1.addVariable("autostart", "true");
	s1.addVariable("repeat", "false");

	s1.write(pPlayer);
}

// Player Progressive Download
function PlayerProgressive(pPelicula,pAncho,pAlto,pImagen,pBuffer) {
	document.write('<embed src="flvplayer.swf" width="'+pAncho+'" height="'+pAlto+'" allowfullscreen="true" allowscriptaccess="always" flashvars="&autostart=false&displayheight='+pAlto+'&bufferlength='+pBuffer+'&file='+pPelicula+'&height='+pAlto+'&image='+pImagen+'&width='+pAncho+'" />')
}

// Reproductor para las obraas. Está en Streaming On Demand
function Player(pPlayer,pAncho,pAlto,pBuffer,pServer,pVideo,pAnio,pTitulo,pImagen){
	var s1 = new SWFObject('../flash/Player.swf','single',pAncho,pAlto,'7');
	s1.addParam('allowfullscreen','true');
//	s1.addVariable('type', 'video');
	s1.addVariable("A",pAnio);
	s1.addVariable("T",pTitulo);
	s1.addVariable("I",pImagen);
	s1.addVariable("S",pServer);
	s1.addVariable("V",pVideo);
	s1.addVariable("Buffer",pBuffer);
	s1.addVariable("autostart", "false");
	s1.addVariable("repeat", "false");
	s1.write(pPlayer);
}

// Reproductor para los trailers. Está en Progressive Download
function PlayerTR(pPlayer,pAncho,pAlto,pBuffer,pServer,pVideo,pSpot,pAnio,pTitulo,pImagen,pLink,pAutostart){
	document.write('<object  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+pAncho+'" height="'+pAlto+'" align="middle" id="Player" name="Player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">');
	//document.write('<object  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" width="'+pAncho+'" height="'+pAlto+'" align="middle" id="Player" name="Player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">');
	document.write('<param name="movie" value="../flash/Player_TR.swf?T='+pTitulo+'&A='+pAnio+'&S='+pServer+'&Sp='+pSpot+'&V='+pVideo+'&I='+pImagen+'&Buffer='+pBuffer+'&Enlace='+pLink+'&autostart='+pAutostart+'" /> ');
	document.write('<param name="quality" value="high" /> ');
	document.write('<param name="bgcolor" value="#EFEFEF" /> ');
	document.write('<param name="menu" value="false" /> ');
	document.write('<param name="allowFullScreen" value="true" /> ');
	document.write('<param name="allowScriptAccess" value="sameDomain" /> ');
	document.write('<embed src="../flash/Player_TR.swf?T='+pTitulo+'&A='+pAnio+'&S='+pServer+'&Sp='+pSpot+'&V='+pVideo+'&I='+pImagen+'&Buffer='+pBuffer+'&Enlace='+pLink+'&autostart='+pAutostart+'" quality="high" width="'+pAncho+'" height="'+pAlto+'" name="Player" align="middle" allowFullScreen="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
