<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Nederland.FM"
             title_url="http://www.nederland.fm/"
             author="Bas Hennekam."
             author_email="bashennekam@gmail.com"
             author_location="Utrecht, the Netherlands"
             category="tools"
             description="Nederland.FM - Een overzicht van Nederlandse radio zenders."
             screenshot="http://hosting.gmodules.com/ig/gadgets/file/111235031415052608966/google_gadget_nederlandfm_screen.png"
             thumbnail="http://hosting.gmodules.com/ig/gadgets/file/111235031415052608966/google_gadget_nederlandfm_thumb.png"
             height="122">
<Require feature="analytics"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
<!-- ALm6fM3lyHOWCc3O7fAvDIL_AmfXjYjP3k4Km-k6xn4sBbEIC15ouKtG69LFkwmRzgLZ1rODtrinKcesTcNZYKKyc20k2QE8wbtaq0jW1Uo1Mm_knabbKBiBnOF1OYOrJVbylem2YS2Xan1CTQcbPs8BO_k6JwkNi4D9-ziuKK-hlQ5LvLmi26-0L1YMzFrMnRSX8Os3k6_R -->
<script type="text/javascript" src="http://www.nederland.fm/script/zenders.js"></script>

<script language="Javascript" type="text/javascript">
_IG_Analytics("UA-3622119-2", "/GadgetNederlandFm/load");
  
var fmNoneMsg = 'Selecteer een radiostation...';
var fmImageError = 'http://hosting.gmodules.com/ig/gadgets/file/111235031415052608966/google_gadget_nederlandfm_error.gif';
  
window.onload = function() {
  var html = new Array(); 
  html.push('<table>');
  html.push('<tr>');

  for(var i = 0; i < kanalen.length; i=i+4) {
    var stationDesc = kanalen[i];  
    var stationName = kanalen[i+1];
    var stationLink = kanalen[i+2];
    
    html.push('<td>');
    html.push('<img ');
    html.push('src="http://www.nederland.fm/i/l/' + stationDesc + '.gif" ');
    html.push('title="' + stationName + '" ');
    html.push('alt="' + stationName + '" ');
    html.push('class="zender" ');
    html.push('onclick="fmStation(\''+stationDesc+'\',\''+stationName+'\',\''+stationLink+'\');" ');
    html.push('onerror="this.parentNode.style.display=\'none\'" />');
    html.push('</td>');
  }
  html.push('</tr>');
  html.push('</table>');
  
  _gel('kanalen').innerHTML = html.join('');  
  _gel('kanalen').style.width = WindowWidth() - 17;
  fmNone();
}
  
window.onresize = function() {
  _gel('kanalen').style.width = WindowWidth() - 17;
}
  
function fmStation(station, name, url) {   
  var element = fmIframe(url) ? fmListenIframe(url) : fmListenEmbed(url);
  _gel('listen').innerHTML = ''; 
  _gel('listen').appendChild(element);
  
  var controls = '<span class="stop">';
  controls += '<a href="#" onClick="fmNone();return false">stop</a>';  
  controls += '</span>';
  
  _gel('station').innerHTML = '<img src="http://www.nederland.fm/i/l/' + station + '.gif" height="20px" align="left" />';
  _gel('station').innerHTML += '&nbsp;' + name;
  _gel('station').innerHTML += controls; 
}

function fmListenIframe(url) {
  var iframe = document.createElement('iframe');
  iframe.className = 'music';
  iframe.frameBorder = 0;
  iframe.src = url;  
  return iframe;
}

function fmListenEmbed(url) {
  var embed = document.createElement('embed');
  embed.className = 'music';
  embed.type = 'application/x-mplayer2';
  embed.pluginPage = 'http://www.microsoft.com/Windows/MediaPlayer/';
  embed.src = url;
  embed.autoStart = 1;  
  return embed;
}

function fmNone() {
  _gel('station').innerHTML = '<span>' + fmNoneMsg + '</span>';
  _gel('listen').innerHTML = '';
}
 
function fmIframe(url) {
  var urllength = url.length;
  var urlextens = url.substring(urllength-3, urllength);
  return (urlextens == 'php') ? true : false;
}
  
function WindowWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE    
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'    
    myWidth = document.documentElement.clientWidth;    
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {    
    //IE 4 compatible    
    myWidth = document.body.clientWidth;    
  }
  return myWidth;
}  
</script>

<style type="text/css">
body, table, tr, td, div, span {
  font-family: arial,sans-serif;
  font-size: 1pt;
  padding: 0px;
  margin: 0px;
}
 
#station {  
  font-size: 12pt;
  color: #D2D2D2;
  height: 20px;
  background-color: #000000;
}
#station span {
  font-size: 12pt;
  padding: 0px 0px 0px 2px;
}
    
.stop {
  position: absolute;
  right: 5px;
  margin-top: 0px;
}
.stop a {
  font-size: 12pt;
  color: #89A4FF;
  font-weight: bold;
}
.stop a:visited,
.stop a:active,
.stop a:link {
  text-decoration: none;
}
.stop a:hover {
  text-decoration: underline;
}
  
#listen, .music {
  width: 1px;
  height: 1px;
  position: absolute;
  right: 0px;
  top: 0px;
}

.zender {
  margin: 0px;
  cursor: pointer;
}
  
#kanalen {
  background-color: #000000;
  overflow-x: scroll;
  overflow-y: hidden;
  height: 85px;
}
#kanalen img {
  width: 96px;
  height: 60px;
  margin: 2px;
}

#layout {
  width: 100%;
  height: 100%;
}
#ll {
  float: left;
  width: 7px;
}
#llt, #llm, #llb {
  width: 7px;
}
#llt, #lmt, #lrt {
  height: 7px;
}
#llm, #lrm {
  height: 105px;
}
#llb, #lmb, #lrb {
  height: 10px;
}
#lr {
  float: right;
  width: 10px;
}
#lrt, #lrm, #lrb {
  width: 10px;
}
#lm {
  position: absolute;
  left: 7px;
  right: 10px;
}
#llt {
  background: transparent url(http://www.nederland.fm/i/player_rand/hlb.gif) repeat scroll 0 0;
}
#lmt {
  background: transparent url(http://www.nederland.fm/i/player_rand/rb.gif) repeat-x scroll 0 0;
}
#lrt {
  background: transparent url(http://www.nederland.fm/i/player_rand/hrb.gif) repeat scroll 0 0;
}
#llm {
  background: transparent url(http://www.nederland.fm/i/player_rand/rl.gif) repeat-y scroll 0 0;  
}
#lrm {
  background: transparent url(http://www.nederland.fm/i/player_rand/rr.gif) repeat-y scroll 0 0;
}  
#llb {
  background: transparent url(http://www.nederland.fm/i/player_rand/hlo.gif) repeat scroll 0 0;
}
#lmb {
  background: transparent url(http://www.nederland.fm/i/player_rand/ro.gif) repeat-x scroll 0 0;
}
#lrb {
  background: transparent url(http://www.nederland.fm/i/player_rand/hro.gif) repeat scroll 0 0;
}
</style>
  
<div id="layout">

  <div id="ll">
    <div id="llt"></div>
    <div id="llm"></div>
    <div id="llb"></div>
  </div>

  <div id="lr">
    <div id="lrt"></div>
    <div id="lrm"></div>
    <div id="lrb"></div>
  </div>

  <div id="lm">
    <div id="lmt"></div>
    <div id="station">&nbsp;</div>
    <div id="kanalen">&nbsp;</div>
    <div id="listen"></div>
    <div id="lmb"></div>
  </div>

</div>

]]>
</Content>

</Module>























