// JavaScript Document

util = new Object();


// util.flash(fcIdDestino, fcArquivo, fcWidth, fcHeight, fcVideoId, fcFlashVars, fcWmode);
util.flash = function(fcIdDestino, fcArquivo, fcWidth, fcHeight, fcVideoId, fcFlashVars, fcWmode, fcDestinoHeight) {
	var fcRetorno;
	// WMODE = OPAQUE OU TRANSPARENT
	
	
	
	fcRetorno = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\" ";
	fcRetorno += "width=\""+fcWidth+"\" height=\""+fcHeight+"\" ";
	fcRetorno += "name=\""+fcVideoId+"\" id=\""+fcVideoId+"\">";
	fcRetorno += "<param name=\"movie\" value=\""+fcArquivo+"\">";
	fcRetorno += "<param name=\"quality\" value=\"high\">";
	fcRetorno += "<param name=\"allowScriptAccess\" value=\"always\">";
	
	if (fcFlashVars != "" && fcFlashVars != undefined) {
		fcRetorno += "<param name=\"FlashVars\" value=\""+fcFlashVars+"\">";
	}
	if (fcWmode != "" && fcWmode != undefined) {
		fcRetorno += "<param name=\"wmode\" value=\""+fcWmode+"\">";
	}
	
	fcRetorno += "<embed src=\""+fcArquivo+"\" ";
	fcRetorno += "width=\""+fcWidth+"\" height=\""+fcHeight+"\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" ";
	fcRetorno += "name=\""+fcVideoId+"\" ";
	fcRetorno += "allowscriptaccess=\"always\" ";
	
	if (fcFlashVars != "" && fcFlashVars != undefined) {
		fcRetorno += "flashvars=\""+fcFlashVars+"\" ";
	}
	if (fcWmode != "" && fcWmode != undefined) {
		fcRetorno += "wmode=\""+fcWmode+"\"";
	}
	
	fcRetorno += "></embed></object>";
	
	document.getElementById(fcIdDestino).innerHTML = fcRetorno;
		
	if (fcVideoId != "") {
		window[fcVideoId] = document.getElementById(fcVideoId);
	}
	
}

util.flashSize = function(fcId, fcAltura) {
	document.getElementById(fcId).style.height = fcAltura;
}
