function flash(nom,an,al,ext) 
{	if (!ext) { ext="swf" }
	nom += "." + ext
	var dimens = 'width=' + an + ' height=' + al 
	var tx = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
	tx +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '
	tx += dimens + '>'
	tx += '<param name="movie" value="' + nom +'">'
	tx += '<embed src="' + nom + '" quality=high '
	tx += 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" '
	tx += 'type="application/x-shockwave-flash" '
	tx += dimens + '></embed></object>'
	document.write(tx)
	document.close()
}

/*
MSIE 3.0+ use the CODEBASE attribute to detect which version of the Macromedia Flash Player 
ActiveX Control is installed on a user's computer. If the user's version is earlier than 
the version specified by CODEBASE, Internet Explorer can automatically download and install 
the newer version of the Macromedia Flash Player from the location specified in CODEBASE.

This is done by changing the version number at the end of the CODEBASE tag 
where '1,1,0,0' is the minimum version of the player needed to display the SWF properly. 
*/

function flashPlus(nom,an,al,ext) {
	if (!ext) { ext="swf" }
	flash(nom,an,al,ext)
	nom = nom + "." + ext
	var tx = '<center><img SRC="../../../img/btn_lupa-mas.gif" BORDER=0 height=20 width=22 '
	tx += 'onClick="window.open(\'' + nom + '\'' + ',\'\',\'location=no\')">'
	tx += '</center>'
	document.write(tx)
	document.close()
}

function video5(nom,w,h,id) {
	var tam = 'width="'+w+'" height="'+h+'" ';
	var tx = '<video id="' + id + '" ' + tam + 'controls>'+
	  '<source src="' + nom + '.webm" type=\'video/webm; codecs="vp8, vorbis"\'>'+
	  '<source src="' + nom + '.ogv" type=\'video/ogg; codecs="theora, vorbis"\'>'+
	  '<source src="' + nom + '.mp4"  type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\'>'+
	  '';
	var useIEObject = navigator.appName.indexOf("Internet Explorer")!=-1;
	tx += '<object ' + tam;
    if (useIEObject) { // use MSIE6 object tag with .cab file reference
      tx += ' classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.6.0/jinstall-6u25-windows-i586.cab"';
    } else { // use HTML4 object tag
      tx += ' type="application/x-java-applet"';
	}
	tx += '>' + 
	 '<param name="code" value="com.fluendo.player.Cortado.class">'+
	 '<param name="archive" value="../cortado.jar">'+
	 '<param name="url" value="' + nom + '.ogv">'+
	 '<param name="mayScript" value="true">'+
	 '<param name="keepAspect" value="true">'+
	 '<param name="video" value="true">'+
	 '<param name="audio" value="true">'+
	 '<param name="autoPlay" value="false">'+
	 '<p>Para ver esta película, utilice otro navegador o instale Java</p>'+
		'</object></video>';
	document.write(tx);
}

function video5mov(nom,w,h,id,escala) {
	var tx4 = ''; 
	if (nom.indexOf('noMP4_')<0) {
		tx4 = '<source src="' + nom + '.mp4"  type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\'>';
	} else {
		nom = nom.replace('noMP4_','');
	}
	var tam = 'width="'+w+'" height="'+h+'" ';
	var tx = '<video id="' + id + '" ' + tam + 'controls>'+
	 '<source src="' + nom + '.ogv" type=\'video/ogg; codecs="theora, vorbis"\'>'+
//	 '<source src="' + nom + '.webm" type=\'video/webm; codecs="vp8, vorbis"\'>'+
	 tx4 +
	 '<source src="' + nom + '.mov"  type=\'video/quicktime\'>'+
	 '<embed src="' + nom + '.mov" quality="high" id="' + id + 'Embed" name="' + id + '" '+
	 'pluginspage="http://www.apple.com/quicktime/download/" '+
	 'controller="true" autoplay="false" volume="0" playeveryframe="true" '+
	 'type="video/quicktime" '+
	 (escala ? 'scale="'+escala+'" ' : '' )+
	 'width="'+w+'" height="'+(24+h)+'"></embed>'+
	 '</video>';
// Así funciona en IE 5.5, IE6, IE7, Op, Ff; usando la etiqueta OBJECT (debería, para IE), IE muestra un icono roto QT? o muestra la pelíocula sin barra de controles.
	document.write(tx);
}


