<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Barzelletta del giorno" description="Ogni giorno viene proposta una nuova barzelletta. Inoltre risatefacili.it propone barzellette, video e tante altre cose divertenti" title_url="http://www.risatefacili.it" author="FacileGadget" author_email="info@facilegadget.it" author_location="Italia" author_link="http://www.facilegadget.it" scrolling="true" height="370" screenshot="http://facilegadget.googlecode.com/svn/trunk/barzelletta/barzelletta_screenshot.png" thumbnail="http://facilegadget.googlecode.com/svn/trunk/barzelletta/barzelletta_thumbnail.png" >
<Require feature="analytics" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<script>
    var hostname = document.location.hostname;
    if (hostname.indexOf('ig.gmodules.com') > 0) {
      document.location.href = 'http://www.gmodules.com'+document.location.href.substring(document.location.href.indexOf('/', 10));
    }
</script>

<link rel="stylesheet" type="text/css" href="http://facilegadget.googlecode.com/svn/trunk/facilegadget.css" />
<script type="text/javascript">
//parametri gadget  
var nomegadget = "barzelletta";
var IDgadget = "13";
var piattaforma = "igoogle";
</script>
<script type="text/javascript" src="http://facilegadget.googlecode.com/svn/trunk/facilegadget.js"></script>

<style>
    a {color: #003399; font-weight: bold;}
    a:visited {color: #003099;}
    a:hover {color: red;}
    p {margin: 0 0 15 0;}

    #content_div {font-size: 80%; margin: 0 5 10 5;}
    #cd {font-size: 80%;margin: 0 5 0 5;}
</style>

<div id="content_div"></div>
<div id="cd"><a target="_blank" href="http://www.risatefacili.it/barzellette/barzelletta.asp?rand=1">Altre barzellette da Risatefacili.it</a></div>

<script type="text/javascript">
scriviby(IDgadget, nomegadget);
</script>

<div id="adv">
<script type='text/javascript'>
   document.MAX_ct0 ='';
   var m3_u = (location.protocol=='https:'?'https://cas.criteo.com/delivery/ajs.php?':'http://cas.criteo.com/delivery/ajs.php?');
   var m3_r = Math.floor(Math.random()*99999999999);
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("zoneid=45913");document.write("&amp;nodis=1");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {
       document.write ("&amp;ct0=" + escape(document.MAX_ct0));
   }
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'></scr"+"ipt>");
</script>
</div>

<script type="text/javascript">
advcross('');
stats(nomegadget, piattaforma);
</script>

  
<script type="text/javascript">
  function displayMenu() {
    var url = "http://www.risatefacili.it/rss/barzelletta.asp";
    var prefs = new _IG_Prefs();
    var html = "";

    _IG_FetchXmlContent(url, function (response) {
           if (response == null || typeof(response) != "object" || response.firstChild == null) {
              document.getElementById("content_div").innerHTML = "<i>Nessun dato da visualizzare</i>";
              return;
           }

           var itemList = response.getElementsByTagName("item");
 
           for (var i = 0; i < itemList.length ; i++) { 
             var nodeList = itemList.item(i).childNodes;

             for (var j = 0; j < nodeList.length ; j++) {
                var node = nodeList.item(j);
                if (node.nodeName == "title") {
                   var title = node.firstChild.nodeValue;
                }
                if (node.nodeName == "link") {
                   var link = node.firstChild.nodeValue; 
                }
                if (node.nodeName == "description") {
                   var descrizione = node.firstChild.nodeValue;
                }
             } 

             html += "<div><p><b>Barzelletta:</b> <a target='_blank' href='" + link + "'>" + title + "</a><p>";
             html += descrizione + "</div>";
         } 

        document.getElementById("content_div").innerHTML = html;
    }); 
  }

  _IG_RegisterOnloadHandler(displayMenu);
  </script>
]]></Content></Module>
