<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="MusicMobs"
    title_url="http://musicmobs.com/"
    directory_title="MusicMobs Music Recommendations"
    description="Type in a band to see related music or playlists containing that artist. Click the arrow to download an XSPF playlist."
    author="Andrew Hitchcock"
    author_affiliation="MusicMobs"
    author_location="Seattle, WA"
    author_email="gwidget@andrewhitchcock.org"
    screenshot="http://andrewhitchcock.org/images/gwidget.jpg"
    render_inline="never" />
  <UserPref name="recommendations" display_name="Recommend" default_value="0" datatype="enum">
    <EnumValue value="0" display_value="Similar Artists" />
    <EnumValue value="1" display_value="Playlists" />
  </UserPref>
  <Content type="html">
    <![CDATA[
    
      <script language="javascript">
      function doclick__MODULE_ID__() {
        artist = _gel("artist" + __MODULE_ID__).value;
	artist = artist.replace(/ /g, "+");
	artist = artist.toLowerCase();
	URL = 'http://andrewhitchcock.org/musicmobs/redirect.pl?' + artist;
        var pref = new _IG_Prefs(__MODULE_ID__);
	var type = pref.getInt("recommendations");
	_IG_FetchContent('http://andrewhitchcock.org/musicmobs/redirect.pl?q=' + artist + '\&t=' + type, function (returned) {
	  _gel("output" + __MODULE_ID__).innerHTML = returned;
	}
      )}
      </script>
      <form action="#" onsubmit="doclick__MODULE_ID__(); return false;">
      <input type="text" id="artist__MODULE_ID__">
      <input type="submit" value="Recommend">
      </form>
      <div id="output__MODULE_ID__"></div>
    ]]>
  </Content>
</Module>