//funcion para activar los componentes ActiveX del Flash
function ActivaSWF(movie, width, height, version, objParams)
{
	//validaciones de parametros
	if (IsEmpty("movie", movie)) return false;
	if (IsEmpty("width", width)) return false;
	if (IsEmpty("height", height)) return false;
	if (IsEmpty("version", version)) return false;
	
	strOut_IE = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+'" width="'+width+'" height="'+height+'">\n';
	strOut_IE += '<param name="movie" value="'+movie+'" />\n';
	strOut_NN = '<embed src="'+movie+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" ';

	//inserción de parametros
	if (objParams!=null){
		for (param in objParams){
			//alert(param +" - "+ objParams[param]);
			strOut_IE += '<param name="'+param+'" value="'+objParams[param]+'" />\n';
			strOut_NN += param+'="'+objParams[param]+'" ';
		}
	}
	strOut_NN += ' ></embed>\n';
	strOUT = strOut_IE + strOut_NN + '</object>\n';
	//alert(strOUT);
	document.write(strOUT);
}

function IsEmpty(parametro, valor){
	if (valor=="" || valor==undefined){
		alert ("El parámetro "+ parametro +" no puede estar vacio.\nRevise la función de activación ActiveSWF.");
		return true;
	}
	return false;
}