function EscreveFlash(piWid, piHei, psSrc, psId, transp) 
{
var strSwf;

strSwf = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" id=\""+psId+"\" width=\""+piWid+"\" height=\""+piHei+"\">";
strSwf += "<param name=\"movie\" value=\""+psSrc+"\">";
strSwf += "<param name=\"allowScriptAccess\" value=\"sameDomain\">";
strSwf += "<param name=\"quality\" value=\"high\">";
if(transp){
strSwf += "<param name=\"wmode\" value=\"transparent\">";
}else{
strSwf += "<param name=\"wmode\" value=\"opaque\">";
}
strSwf += "<embed id=\""+psId+"\" name=\""+psId+"\" allowScriptAccess=\"sameDomain\" swLiveConnect=\"true\" src=\""+psSrc+"\" quality=\"high\" "
if(transp){
strSwf += "wmode=\"transparent\" "
}else{
strSwf += "wmode=\"opaque\" "
}
strSwf += "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+piWid+"\" height=\""+piHei+"\"></embed></object>";

this.document.write(strSwf);
} 

function MM_preloadImages() {
	var d = document;
	if (d.images) {
		if (!d.MM_p) d.MM_p = new Array();
		var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
		for (i=0; i<a.length; i++)
			if (a[i].indexOf("#") != 0) {
				d.MM_p[j] = new Image;
				d.MM_p[j++].src = a[i];
			}
	}
}

function aumenta(){
var W = document.body.clientWidth;
if ((W>850) && (W<1030)){
	if (document.all){
		document.all.espaco.style.width = (50);
	}
	else if (document.getElementById&&!document.all){
			document.getElementById('espaco').style.width = 50+'px';
	}
}else if((W>1030)){
	if (document.all){
			document.all.espaco.style.width = (280);
		}
		else if (document.getElementById&&!document.all){
				document.getElementById('espaco').style.width = 280+'px';
		}
}else{
	if(document.all){
		document.all.espaco.style.width = (30);
	}else if (document.getElementById&&!document.all){
			document.getElementById('espaco').style.width = 30+'px';
		}
	}
}

function player(musica){        
        if(activeMusic!=this.id) {
            if(mmPlayer_currentState=='play'){
               activeButton.src=activeButton.src.replace('pause','play')
            }
            mmPlayer_currentState='play';
            mmPlayer_currentState=='play'; 
            EP_loadMP3('ep_player', '<location>http://www.atenasfm.com.br/imagens/musicas/mp3/mus_'+musica+'.mp3</location><creator>.</creator><title>.</title>');
        } else {
            mmPlayer_currentState=mmPlayer_currentState=='play'?'pause':'play';
            }
        SetActiveButton('mmPlayerButton_play_'+musica); 
        activeMusic=this.id; 
        if(mmPlayer_currentState=='pause'){
            EP_pause('ep_player'); 
        } else {
            EP_play('ep_player');
        }        
        activeButton.src=mmPlayer_currentState=='pause'?activeButton.src.replace('pause','play'):activeButton.src.replace('play','pause');
        if(mmPlayer_currentState==''){
            mmPlayer_currentState='play';
        }
 }   
 function playerstop(musica){
    if(activeMusic==this.id){ 
        activeButton.src=activeButton.src.replace('pause','play'); 
        SetActiveButton('mmPlayerButton_stop_'+musica); 
        EP_stop('ep_player');mmPlayer_currentState='stop'
    }         
 }        
