<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs 
    title="Sites of the day from link-pedia.com"
    directory_title="Sites of the day from link-pedia.com"
    title_url="http://www.link-pedia.com"
    description="Link-pedia.com is a web directory based on DMOZ data. Provides relevant resources for each site in the directory. Text enlargement option and high visibility stylesheet is provided for people with visual disabilities." 
    category="lifestyle"  
    author="link-pedia.com"
    author_link="http://www.link-pedia.com"
    author_email="office@link-pedia.com"
    screenshot="http://hosting.gmodules.com/ig/gadgets/file/108682466378986048976/image.jpg"
    thumbnail="http://hosting.gmodules.com/ig/gadgets/file/108682466378986048976/thumb.jpg"
    height="400">  
    <Require feature="dynamic-height"/>    
  </ModulePrefs>
  <Content type="html">

  <![CDATA[ 
  <div id="content_div"></div>
  <script type="text/javascript"> 
  function displayLinks() { 
    // XML data
    var url = "http://www.link-pedia.com/rss.xml"; 
 
    _IG_FetchXmlContent(url, function (response) {
           if (response == null || typeof(response) != "object" || 
                      response.firstChild == null) {
              _gel("content_div").innerHTML = "<i>Invalid data.</i>";
              return;
           }

           // Start building HTML string that will be displayed in <div>.           
           // Set the style for the <div>.		
           var html = "<div style='padding: 5px;font-family:Arial, Helvetica;" +                   
		          "text-align:left;font-size:70%'>";   
					    
           // Set style for title.
           //html +="<div style='text-align:center; font-size: 120%; color: bleu; " +
		//          "font-weight: 700;'>"; 

           // get title
           //var title = response.getElementsByTagName("title").item(0).firstChild.nodeValue;
 
           // Append the title to the HTML string.
           //html += title + "</div><br>"; 

       // Get a list of the <item> element nodes in the file
        var itemList = response.getElementsByTagName("item");
        // If user requested more entries than are in array, set "entries" to be
        // the number of items in the array.
        var entries = itemList.length;

        // Loop through all <item> nodes
        for (var i = 0; i < entries ; i++) 
        {
          // For each <item> node, get child nodes.
          var nodeList = itemList.item(i).childNodes;

          // Loop through child nodes. Extract data from the text nodes that are
          // the children of the associated name, price, and calories element nodes.
          for (var j = 0; j < nodeList.length ; j++) 
          {
            var node = nodeList.item(j);
            if (node.nodeName == "title") 
            {
              var name = node.firstChild.nodeValue;
            }
            if (node.nodeName == "link")
            {
              var link = node.firstChild.nodeValue;
            }
            if (node.nodeName == "description")
            {
              var desc = node.firstChild.nodeValue;
            }
          }
          
          html += "<div> " +
                  " <a target='_blank' href='" + link + "'>" + name + "</a>";
          html += "<br><i>" + desc + "</i>";

          html += "</div>";
         }

        // Display HTML string in <div>
    
        html += "</div>";
        _gel('content_div').innerHTML = html;
        _IG_AdjustIFrameHeight();
 
    },{ refreshInterval: (60 * 10) }); 
  }
  _IG_RegisterOnloadHandler(displayLinks);
  </script>
  ]]> 
  </Content>
</Module>