Player = '<object id="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="RadioPipa.com" type="application/x-oleobject" VIEWASTEXT> <param name="FileName" value="http://adm.avexado.com/radio/tunein.php/radiopipa/playlist.asx"> <param name="AutoStart" value="True"> <param name="ShowControls" value="1"> <embed type="application/x-mplayer2" id="MediaPlayer" width="160" height="50" src="http://adm.avexado.com/radio/tunein.php/radiopipa/playlist.asx" autostart="True" transparentatstart="True" showcontrols="1" showdisplay="0" showstatusbar="1" animationatstart="true" filename="http://adm.avexado.com/radio/tunein.php/radiopipa/playlist.asx" autosize="0"> </embed> </object>';
function PlayClick()
	{
	document.getElementById('Player').innerHTML = Player;
	setTimeout("DahPlay();", 1);
	}
function StopClick()
	{
	document.getElementById('Player').innerHTML = '';
	document.getElementById('Status').innerHTML = 'Parado';
	setTimeout("Status();", 15000);
	}
function DahPlay()
	{
	document.getElementById('Status').innerHTML = 'RadioPipa.com';
	setTimeout("Status();", 5000);
	}


// controle incrementa volume
function MaisVol()
{
    if(document.getElementById('WMPlay').Volume != undefined)
	{
		curVolume = document.getElementById('WMPlay').Volume;
		newVolume = (curVolume + 200);
                perVolume = (curVolume + 5000) / 50
		if(newVolume < 0)
		{
			document.getElementById('WMPlay').Volume = newVolume;
		}
		else
		{	
			document.getElementById('WMPlay').Volume = 0;	
		}
	}
	else
	{
		document.getElementById('WMPlay').Volume = document.getElementById('WMPlay').Volume + 200;
	}
	document.getElementById('Status').innerHTML = 'Volume: ' + perVolume + '%';
	setTimeout("Status();", 10000);
}

// controle decrementa volume
function MenosVol()
{
    if(document.getElementById('WMPlay').Volume != undefined)
	{
		curVolume = document.getElementById('WMPlay').Volume;
		newVolume = (curVolume - 200);
                perVolume = (curVolume + 5000) / 50
		if(newVolume > -5000)
		{
			document.getElementById('WMPlay').Volume = newVolume;
		}
		else
		{
			document.getElementById('WMPlay').Volume = -5000;
		}
	}
	else
	{
		document.getElementById('WMPlay').Volume = document.getElementById('WMPlay').Volume - 200;
	}
	document.getElementById('Status').innerHTML = 'Volume: ' + perVolume + '%';
	setTimeout("Status();", 10000);
}


var Mostrar_o_que = 1;
function Status()
	{
	if(Mostrar_o_que == 1)
		{
		Mostrar_o_que = 2;
		Dado = 'Titulo';
		}else{
		Mostrar_o_que = 1;
		Dado = 'Musica';
		}
	document.getElementById('Status').innerHTML = '<span class="Tocando">Tocando agora: </span><span id="cc_stream_info_song">Carregando...</span>';
//	ajax_loadContent('Status','http://www.radiopipa.com/radiov2/RadioPipa.dados.php?moq=' + Dado);
//	setTimeout('Status();', 15000);
	}

function AbrirPopup(URL, Largura, Altura)
	{
	var Lar = (screen.width - Largura) / 2;
	var Alt = (screen.height - Altura) / 2;
	window.open(URL,'abrir', 'width='+Largura+', height='+Altura+', top='+Alt+', left='+Lar+', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=auto, resizable=no, fullscreen=no');
	}

function AdicionaFavoritos(URl, Titulo)
	{
	var title = Titulo;
	if (window.sidebar) 
		window.sidebar.addPanel(title,self.location.href,"");
	else if( window.external )
		window.external.AddFavorite(self.location.href,title);

	}