function ActiveSWF(movie, width, height, wmode, version,objParams)
{
      var paramValue;

	//validate the parameters
	if (IsEmpty("movie", movie)) return false;
	if (IsEmpty("width", width)) return false;
	if (IsEmpty("height", height)) return false;
	if (IsEmpty("wmode", wmode)) 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_IE += '<param name="wmode" value="'+wmode+'" />\n';
	strOut_NN = '<embed src="'+movie+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" ';

	//insert the parameters
	if (objParams!=null){
		for (param in objParams){
			//alert(param +" - "+ objParams[param]);
                        paramValue = objParams[param];
                        if(param=='FlashVars') paramValue = xreplace(paramValue,'&','%26');
			strOut_IE += '<param name="'+param+'" value="'+paramValue+'" />\n';
			strOut_NN += param+'="'+paramValue+'" ';
		}
	}
	strOut_NN += ' ></embed>\n';
	strOUT = strOut_IE + strOut_NN + '</object>\n';
//	alert(strOUT);
	document.write(strOUT);
}

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

function xreplace(checkMe,toberep,repwith){

var temp = checkMe;
var i = temp.indexOf(toberep);

while(i > -1) {
  temp = temp.replace(toberep, repwith);
  i = temp.indexOf(toberep, i + repwith.length + 1);
}

return temp;

}
