function aplicaFlash(swf, width, height,FlashVars, wmode, cache) {
	var noCache = "";
	if (cache == undefined || cache == '') {var noCache = "?" + new Date();}
	if (wmode != "opaque" && wmode != "transparent") {wmode = "transparent";}
	var monta_swf = "";
	monta_swf += "<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='"+ width +"' height='"+ height +"' title=''>";
	monta_swf += "<param name='movie' value='"+ swf + noCache +"'>";
	monta_swf += "<param name='quality' value='high'>";
	monta_swf += "<param name='menu' value='0'>";
	monta_swf += "<param name='wmode' value='"+ wmode +"'>";
	monta_swf += "<param name='FlashVars' value='"+ FlashVars +"'>";
	monta_swf += "<embed src='"+ swf + noCache +"' quality='high' FlashVars='"+FlashVars+"' wmode='"+ wmode +"' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ width +"' height='"+ height +"'></embed>";
	monta_swf += "</object>";
	document.write(monta_swf);
}

function aplicaFlashComId(id,swf, width, height,FlashVars, wmode, cache) {
	var noCache = "";
	if (cache == undefined || cache == '') {var noCache = "?" + new Date();}
	if (wmode != "opaque" && wmode != "transparent") {wmode = "opaque";}
	var monta_swf = "";
	monta_swf += "<object id='"+ id +"' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+ width +"' height='"+ height +"' title=''>";
	monta_swf += "<param name='movie' value='"+ swf + noCache +"'>";
	monta_swf += "<param name='quality' value='high'>";
	monta_swf += "<param name='menu' value='0'>";
	monta_swf += "<param name='wmode' value='"+ wmode +"'>";
	monta_swf += "<param name='FlashVars' value='"+ FlashVars +"'>";
	monta_swf += "<embed name='"+ id +"' src='"+ swf + noCache +"' quality='high' FlashVars='"+FlashVars+"' wmode='"+ wmode +"' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ width +"' height='"+ height +"'></embed>";
	monta_swf += "</object>";
	document.write(monta_swf);
}


// Accessing Flex from JavaScript 
var swfComRadio_StatusVideoMC = "stoped";

function getMyApp(appName) {
    var retorno;
    if (navigator.appName.indexOf ("Microsoft") !=-1 || navigator.appName == "Microsoft Internet Explorer") {
        retorno = window[appName];
    } else {
        retorno = document[appName];
    }

    return (retorno==undefined)? document.getElementById(appName) : retorno ;
}
function callFlashPararSom() {
    swfComRadio_StatusVideoMC = "playing";
    getMyApp("swfComRadio").jvsPararSomFlashRadio();
}
function callFlashPlaySom() {
    swfComRadio_StatusVideoMC = "stoped";
    getMyApp("swfComRadio").jvsPlaySomFlashRadio();
}

function  jvsReturnStatusVideo() {
    return swfComRadio_StatusVideoMC;
}


function bringToTop() {    
    document.getElementById("boxMediaCenter").className = 'MediaCenterTop';
}

function sendToBotton() {
    document.getElementById("boxMediaCenter").className = 'MediaCenterBotton';    
}

// Podcast
function callFlashPararSom_Podcast(idPost) {
    PararSom_todosPodcast(idPost);
        
    swfComRadio_StatusVideoMC = "playing";
    getMyApp("swfComRadio").jvsPararSomFlashRadio();
}

function callFlashPlaySom_Podcast() {
    swfComRadio_StatusVideoMC = "stoped";
    getMyApp("swfComRadio").jvsPlaySomFlashRadio();
}

  