<?xml version="1.0" encoding="UTF-8" ?>
<Module>

<ModulePrefs title="Ultimate LastFM Radio Player 2.0" width="300" height="290" description="Use this LastFM radio player on your iGoogle page to listen to your favorite songs, via audio streaming. You can set this gadget to play in one of these modes: play by tag, play similar artists, play an user's neighbourhood or play an user's recomended songs. If you need more information about radio playing modes, please visit: http://www.last.fm/help/faq/ Note that if logged into an lastFM account, the tracks you will be playing through this gadget, will be scrobbled, just the way as if you would listen to them on lastFM's site, or on your PC using any lastFM compatible software! Version 2.0 Released! As lots of people were quite sad that the gadget had has stopped working (due to some modernisation of the last.fm infrastructure) i sat down and made it compatible again. It uses the actual last.fm player, and has all the functions the previous version had. Thanks a LOT for all the support through your emails! Have fun with Ultimate LastFM Radio Player, and feel free to email me!" thumbnail="http://project13.pl/pj/13/images/thumbs/3e55e7b6b6ab293bade1d981712cfebe.png" screenshot="http://project13.pl/pj/13/images/3e55e7b6b6ab293bade1d981712cfebe.png" title_url="http://www.last.fm" author="Konrad 'Ktoso' Malawski" author_photo="http://pl.gravatar.com/userimage/8151482/5b05453033bdbd0960371b65f2e8cb6f.jpeg" author_email="ktoso@project13.pl" author_link="http://www.project13.pl/" author_quote="Life is Study! - Kintaro Oe (Golden Boy)" author_affiliation="Project13.pl" author_location="Poland" scrolling="false">
<Locale lang="en" country="us"/>
<MayRequire type="plugin" value="flash"/>
<Require feature="minimessage" /> 
</ModulePrefs>
<UserPref name="username" display_name="Last.FM username:" required="false"/>
<UserPref name="version" default_value="2" datatype="hidden"/>
<UserPref name="mode" display_name="Play mode:" default_value="Tag" datatype="enum">
<EnumValue value="Tag"/>
<EnumValue value="Similar Artists"/>
<EnumValue value="User's Neighbourhood"/>
<EnumValue value="User's Recommendations"/>
</UserPref>
<UserPref name="str" display_name="Tag/Artist:" required="false" default_value="chillout"/>
<UserPref name="autostart" display_name="Autostart?" datatype="bool" default_value="true"/>
<UserPref name="showmode" display_name="Show Play Mode information?" datatype="bool" default_value="false"/>

<Content type="html">
<![CDATA[
<style type="text/css">
body{
font-size:x-small;
font-style:normal;
font-family:serif;
}
</style>
<script type="text/javascript">  
  
var prefs = new _IG_Prefs();

function loadPlayer(){
var username = prefs.getString("username");
var mode = prefs.getString("mode");
var str = prefs.getString("str");
var autostart = prefs.getBool("autostart");
if(autostart!=true)
autostart='';
var showmode = prefs.getBool("showmode");

if(mode=='Tag'){
var flashVars = 'autostart='+ autostart +'&amp;lfmMode=playlist&amp;FOD=true&amp;resourceID=395&amp;resname='+str+'&amp;restype=tag';
}else if(mode=='Similar Artists'){
var flashVars='autostart='+autostart+'&amp;lfmMode=radio&amp;FOD=true&amp;expanded=true&amp;url=lastfm://artist/'+str+'/similarartists';
}else if(mode=="User's Neighbourhood"){
var flashVars = 'autostart='+ autostart +'&amp;lfmMode=radio&amp;FOD=true&amp;expanded=true&amp;url=lastfm://user/'+username+'/neighbours';
}else if(mode=="User's Recommendations"){
var flashVars = 'autostart='+ autostart +'&amp;lfmMode=radio&amp;FOD=true&amp;expanded=true&amp;url=lastfm://user/'+username+'/recommended/100';
}

var html = '<div align="center" style="text-align:center;">'+
'<object type="application/x-shockwave-flash" data="http://cdn.last.fm/webclient/s12n/108/lfmPlayer.swf"'+
'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="lfmPlayer" name="lfmPlayer" align="middle" width="300" height="266">'+
'<param name="movie" value="http://cdn.last.fm/webclient/s12n/108/lfmPlayer.swf" />'+
'<param name="flashvars" value="' + flashVars + '" />'+
'<embed src="http://cdn.last.fm/webclient/s12n/108/lfmPlayer.swf" FlashVars="' + flashVars + '" height="266" width="300" type="application/x-shockwave-flash" wmode="transparent" />'+
'<param name="allowScriptAccess" value="always" />'+
'<param name="allowNetworking" value="all" />'+
'<param name="allowFullScreen" value="true" />'+
'<param name="quality" value="high" />'+
'<param name="bgcolor" value="fff" />'+
'<param name="wmode" value="transparent" />'+
'<param name="menu" value="true" />'+
'</object>';

if(showmode==true){
html += '<br>Playing: ';

if(mode=='Tag')
html += str + ' Tag';
else if(mode=='Similar Artists')
html += 'Artists similar to ' + str;
else if(mode=="User's Neighbourhood")
html += username + '\'s Neighbourhood';
else if(mode=="User's Recommendations")
html += username + '\'s recomended songs';
}

html += '</div>';

document.write(html);
}

_IG_RegisterOnloadHandler(loadPlayer);
</script>

</div>
]]>
</Content>
</Module>

