RadioCT = {
	valueVolume : -600,
	
    Start : function(){
		 this._Display(this.valueVolume);
    },
    Play : function(){
		//if(this._IsIE()){
		//	document.getElementById("WMPlay").Play();
		//}else{
			this._Display(this.valueVolume);
		//}
    },
    Stop : function(){
		//if(this._IsIE()){
		//	document.getElementById("WMPlay").Stop();
		//}else{
			var tag = document.getElementById("PlayerSrc");
			if(tag != null){
				tag.innerHTML = "";
			}
		//}
    },
    VolumeAumentar : function(){
		if ( this.valueVolume <= -300){
			this.valueVolume = this.valueVolume+300;
		}
		if(this._IsIE()){
			document.getElementById("WMPlay").Volume = this.valueVolume;
		}else{
			this._Display(this.valueVolume);
		}
    },
    VolumeDiminuir : function(){
		if ( this.valueVolume >= -8000){
			this.valueVolume = this.valueVolume-300;
		}
		if(this._IsIE()){
			document.getElementById("WMPlay").Volume = this.valueVolume;
		}else{
			this._Display(this.valueVolume);
		}
    },
    Popup : function(){
		var width = 320;
		var height = 233;
		var url = "/radioct_popup.php";

		var day = new Date();
		var id = day.getTime();
		eval("page" + id + " = window.open(url, '" + id + "', 'left=0,top=0,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height);");
		
		this.Stop();
    },
    Winamp : function(){
		window.open("http://www.portalct.com.br/radioct/player/radioct.pls", "_parent");
		this.Stop();
    },
    MediaPlayer : function(){
		window.open("http://www.portalct.com.br/radioct/player/radioct.asx", "_parent");
		this.Stop();
    },
    RealPlayer : function(){
		window.open("http://www.portalct.com.br/radioct/player/radioct.ra", "_parent");
		this.Stop();
    },
    _Display : function(Volume){
		var Src = "http://174.123.166.131:8118";
		var Player = '';
		Player += '<object id="WMPlay" width="169" height="24" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" hspace="0" vspace="0" align="baseline" viewastext="viewastext">';
		Player += '<param name="FileName" value="'+Src+'">';
		Player += '<param name="uiMode" value="full" />';
		Player += '<param name="AutoStart" value="True">';
		Player += '<param name="TransparentAtStart" value="True">';
		Player += '<param name="ShowControls" value="0">';
		Player += '<param name="ShowDisplay" value="true">';
		Player += '<param name="ShowStatusBar" value="1">';
		Player += '<param name="AutoSize" value="0">';
		Player += '<param name="AnimationAtStart" value="true">'; 
		Player += '<param name="Volume" value="'+Volume+'">';
		Player += '<embed width="0" height="0" autostart="True" align="baseline" type="application/x-mplayer2" id="MediaPlayer" transparentatstart="True" showcontrols="0" showdisplay="true" showstatusbar="1" animationatstart="true" filename="'+Src+'" autosize="0" volume="'+Volume+'"> </embed>';
		Player += '</object>';

		var tag = document.getElementById("PlayerSrc");
		if(tag != null){
			tag.innerHTML = Player;
		}
    },
	_IsIE : function(){
		return(/MSIE (\d+\.\d+);/.test(navigator.userAgent));
	}
}