<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="__MSG_title__" title_url="http://www.alexa.com" directory_title="__MSG_title__" description="__MSG_description__" author="Andrew Hitchcock" author_affiliation="Freelance" author_location="Seattle, WA" author_email="gwidget@andrewhitchcock.org" screenshot="http://andrewhitchcock.org/images/alexarank.jpg" thumbnail="http://andrewhitchcock.org/images/alexarankthumb.jpg" render_inline="never" height="200"><Locale lang="de" messages="http://andrewhitchcock.org/gadgets/adpowers/AlexaRank/de_ALL.xml"/><Locale messages="http://andrewhitchcock.org/gadgets/adpowers/AlexaRank/ALL_ALL.xml"/><Locale lang="ja" messages="http://andrewhitchcock.org/gadgets/adpowers/AlexaRank/ja_ALL.xml"/><Locale lang="zh-tw" messages="http://andrewhitchcock.org/gadgets/adpowers/AlexaRank/zh-tw_ALL.xml"/></ModulePrefs>
  <UserPref name="url" display_name="__MSG_url__" default_value="" required="true"/>
  <UserPref name="graph" display_name="__MSG_graph__" default_value="r" datatype="enum">
    <EnumValue value="r" display_Value="__MSG_reach__"/>
    <EnumValue value="t" display_Value="__MSG_rank__"/>
    <EnumValue value="p" display_Value="__MSG_page_views__"/>
  </UserPref>
  <UserPref name="time" display_name="__MSG_range__" default_value="6m" datatype="enum">
    <EnumValue value="1m" display_Value="__MSG_one_month__"/>
    <EnumValue value="3m" display_Value="__MSG_three_months__"/>
    <EnumValue value="6m" display_Value="__MSG_six_months__"/>
    <EnumValue value="1y" display_Value="__MSG_one_year__"/>
    <EnumValue value="2y" display_Value="__MSG_two_years__"/>
    <EnumValue value="3y" display_Value="__MSG_three_years__"/>
    <EnumValue value="4y" display_Value="__MSG_four_years__"/>
    <EnumValue value="5y" display_Value="__MSG_five_years__"/>
  </UserPref>
  <UserPref name="smoothing" display_name="__MSG_smoothing__" default_value="-1" datatype="enum">
    <EnumValue value="-1" display_Value="__MSG_default__"/>
    <EnumValue value="0" display_Value="__MSG_zero__"/>
    <EnumValue value="1" display_Value="__MSG_one__"/>
    <EnumValue value="2" display_Value="__MSG_two__"/>
    <EnumValue value="5" display_Value="__MSG_five__"/>
    <EnumValue value="10" display_Value="__MSG_ten__"/>
    <EnumValue value="50" display_Value="__MSG_fifty__"/>
    <EnumValue value="100" display_Value="__MSG_one_hundred__"/>
  </UserPref>
  <Content type="html">
    <![CDATA[
      <div id="output__MODULE_ID__"></div>
      <script>
        function display__MODULE_ID__() {
	  var prefs = new _IG_Prefs(__MODULE_ID__);
	  var websites = prefs.getString("url").split(",");
	  var url = 'http://traffic.alexa.com/graph?r=' + prefs.getString("time") + '\&y=' + prefs.getString("graph") + '\&w=' + document.body.scrollWidth + '\&h=200' + '\&z=' + prefs.getString("smoothing");;
	  for (i = 0; i < websites.length; i++) {
	    url = url + '\&u=' + websites[i].replace(/ /g, "");;
	  }
	  var imgSrc = '<img src="' + url + '" />';
	  _gel("output" + __MODULE_ID__).innerHTML = imgSrc;
	}
	_IG_RegisterOnloadHandler(display__MODULE_ID__);
      </script>
    ]]>
  </Content>
</Module>

