var ns4=document.layers;
var ie4=document.all;
var ns6=document.getElementById&&!document.all;
var WMPflux="http://www.radioblagon.com/francais.asx";
var QTflux="http://radioblagon-serveur2.zik.dj:8010/listen.pls";
var NUMflux="1";
var WMPdemarre="False";
var QTdemarre="false";

if(!masque)
	var masque="non";
if(!posX)
	var posX=0;
if(!posY)
	var posY=0;
if(!fond)
	var fond="000000";
if(!texte)
	var texte="CCCCCC";
if(!flux)
	var flux="rock";
if(!demarre)
	var demarre="non";
var posBAS=posY+50;

if(flux=="ambiant" || flux=="AM")
{
	WMPflux="http://www.radioblagon.com/ambient.asx";
	QTflux="http://radioblagon-serveur1.zik.dj:8100/listen.pls";
	NUMflux="4";
}
else if(flux=="rock" || flux=="RF")
{
	WMPflux="http://www.radioblagon.com/francais.asx";
	QTflux="http://radioblagon-serveur2.zik.dj:8010/listen.pls";
	NUMflux="1";
}
else if(flux=="scene" || flux=="SF")
{
	WMPflux="http://www.radioblagon.com/soft.asx";
	QTflux="http://radioblagon-serveur3.zik.dj:8010/listen.pls";
	NUMflux="2";
}
else if(flux=="festif" || flux=="FE")
{
	WMPflux="http://www.radioblagon.com/festif.asx";
	QTflux="http://radioblagon-serveur1.zik.dj:8020/listen.pls";
	NUMflux="5";
}
else if(flux=="reggae" || flux=="RE")
{
	WMPflux="http://www.radioblagon.com/reggae.asx";
	QTflux="http://radioblagon-serveur3.zik.dj:8100/listen.pls";
	NUMflux="7";
}
else if(flux=="varie" || flux=="MI")
{
	WMPflux="http://www.radioblagon.com/all.asx";
	QTflux="http://radioblagon-serveur4.zik.dj:8100/listen.pls";
	NUMflux="8";
}
else if(flux=="mixed" || flux=="MS")
{
	WMPflux="http://www.radioblagon.com/all_soft.asx";
	QTflux="http://radioblagon-serveur4.zik.dj:8020/listen.pls";
	NUMflux="9";
}
if(demarre=="oui")
{
	WMPdemarre="True";
	QTdemarre="true";
}

function Affiche_Cache(nObjet,on_off) {
if( on_off == "on" ) {
 if(ie4) { // Internet explorer
   eval(nObjet).style.visibility = 'visible';
 }
 else if(ns4) { // Netscape 4.x
   document.eval(nObjet).visibility = 'show';
	}
 else if(ns6) { // Netscape 6 (mozilla)
   var divns6 = document.getElementsByTagName("div");
   divns6[nObjet].style.visibility = 'visible';
 }
}
else if( on_off == "off" ) {
 if(ie4) { // Internet explorer
   eval(nObjet).style.visibility = 'hidden';
 }
 else if(ns4) { // Netscape 4.x
   document.eval(nObjet).visibility = 'hidden';
	}
 else if(ns6) { // Netscape 6 (mozilla)
   var divns6 = document.getElementsByTagName("div");
   divns6[nObjet].style.visibility = 'hidden';
 }
}else {
 if(ie4) { // Internet explorer
   eval(nObjet).style.visibility = 
    (eval(nObjet).style.visibility=='visible'?'hidden':'visible');
 }
 else if(ns4) { // Netscape 4.x
   document.eval(nObjet).visibility = 
    (document.eval(nObjet).visibility=='show'?'hidden':'show');
	}
 else if(ns6) { // Netscape 6 (mozilla)
   var divns6 = document.getElementsByTagName("div");
   divns6[nObjet].style.visibility = 
    (divns6[nObjet].style.visibility=='visible'?'hidden':'visible');
 }
}
}

            var http_request = false;


            function makeRequestFV(url) {
                http_request = false;

                if (window.XMLHttpRequest) { // Mozilla, Safari,...
                    http_request = new XMLHttpRequest();
                    if (http_request.overrideMimeType) {
                        http_request.overrideMimeType('text/xml');
                    }
                } else if (window.ActiveXObject) { // IE
                    try {
                        http_request = new ActiveXObject("Msxml2.XMLHTTP");
                    } catch (e) {
                        try {
                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                        } catch (e) {}
                    }
                }

                if (!http_request) {
                    alert('Giving up :( Cannot create an XMLHTTP instance');
                    return false;
                }
	        http_request.onreadystatechange = alertContentsHtml;
        	http_request.open('PUT', url, true);
	        http_request.send(null);

            }


            function alertContentsHtml() {

                if (http_request.readyState == 4) {
                    if (http_request.status == 200) {
 if (document.getElementById)
    {
    document.getElementById("basFV").innerHTML = http_request.responseText;
    }
  else if (document.all) 
    {
    document.all["basFV"].innerHTML = http_request.responseText;
    }


                    } else {
                        alert('There was a problem with the request.');
                    }
                }

            }




document.write('<div id="hautFV" align="center" style="position:absolute; top:'+posY+'px; left:'+posX+'px; height:50px; width:200px; Z-index:3; background-color:#'+fond+'; color:#'+texte+'; font-size:10px; visibility:show">');

document.write('<b><a href="http://www.radioblagon.com/" style="text-decoration:none; color:'+texte+'">RADIOBLAGON</a></b>&nbsp;&nbsp;CANAL '+flux+'<br/>');
    if ( navigator.appName == "Microsoft Internet Explorer" )
    {

if(masque == "oui")
document.write('<OBJECT ID="MediaPlayer" WIDTH="170" HEIGHT="0" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" CLASSID = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">');
else
document.write('<OBJECT ID="MediaPlayer" WIDTH="170" HEIGHT="32" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" CLASSID = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">');
document.write('<PARAM NAME="FileName" VALUE="'+WMPflux+'">');
document.write('<PARAM NAME="URL" VALUE="'+WMPflux+'">');
document.write('<PARAM NAME="uiMode" VALUE="mini">');
document.write('<PARAM NAME="AUTOSTART" VALUE="'+WMPdemarre+'">');
if(masque == "oui")
document.write('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx/" src="'+WMPflux+'" Name="MediaPlayer" uiMode="mini" AUTOSTART="'+WMPdemarre+'" width=170 height=32>');
else
document.write('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx/" src="'+WMPflux+'" Name="MediaPlayer" uiMode="mini" AUTOSTART="'+WMPdemarre+'" width=170 height=0>');
document.write('</embed>');
document.write('</OBJECT>');

    }
    else
    {

if(masque == "oui")
document.write('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="100" HEIGHT="0" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">');
else
document.write('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="100" HEIGHT="30" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">');
document.write('<PARAM name="SRC" VALUE="'+QTflux+'">');
document.write('<PARAM name="AUTOPLAY" VALUE="'+QTdemarre+'">');
if(masque == "oui")
document.write('<EMBED QTSRC="'+QTflux+'" autoplay="'+QTdemarre+'" bgcolor="'+fond+'" HEIGHT="0" WIDTH="100" SRC="http://www.radioblagon.com/player/logo1.qti" TYPE="video/quicktime" PLUGINSPAGE="http://www.apple.com/quicktime/download">');
else
document.write('<EMBED QTSRC="'+QTflux+'" autoplay="'+QTdemarre+'" bgcolor="'+fond+'" HEIGHT="30" WIDTH="100" SRC="http://www.radioblagon.com/player/logo1.qti" TYPE="video/quicktime" PLUGINSPAGE="http://www.apple.com/quicktime/download">');
document.write('</EMBED>');
document.write('</OBJECT>');

    }

//document.write('&nbsp;<span style="cursor: pointer"><image src="fb.jpg" onMouseOut="Affiche_Cache(\'basFV\',\'off\')" onMouseOver="Affiche_Cache(\'basFV\',\'on\');makeRequestFV(\'http://www.radioblagon.com/player/songtitle'+NUMflux+'.php\');" /></span>');
document.write('&nbsp;<span style="cursor: pointer"><image src="http://www.radioblagon.com/v7/fb.jpg" onMouseOut="Affiche_Cache(\'basFV\',\'off\')" onMouseOver="Affiche_Cache(\'basFV\',\'on\')" /></span>');
document.write('</div>');
document.write('<div id="basFV" align="center" style="position:absolute; top:'+posBAS+'px; left:'+posX+'px; width:200px; Z-index:3; background-color:#'+fond+'; color:#'+texte+'; font-size:12px; visibility:hidden">');
document.write('<iframe src="http://www.radioblagon.com/player/songtitle'+NUMflux+'.php" frameborder="1" scrolling="no" style="width:180px; height:32px"></iframe><BR/>En &eacute;coute');
document.write('</div>');
