<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Film in programmazione al cinema" description="Schede con le recensioni dei film attualmente in programmazione al cinema" title_url="http://www.facilegadget.it" author="FacileGadget" author_email="info@facilegadget.it" author_location="Italia" author_link="http://www.facilegadget.it" scrolling="true" height="530" screenshot="http://facilegadget.googlecode.com/svn/trunk/film/film_screenshot.png" thumbnail="http://facilegadget.googlecode.com/svn/trunk/film/film_thumbnail.png" >
<Require feature="analytics" />
<Require feature="setprefs" />
<Require feature="dynamic-height" />
</ModulePrefs>
<UserPref name="counter" default_value="0" datatype="hidden" />
<Content type="html"><![CDATA[
<link rel="stylesheet" type="text/css" href="http://facilegadget.googlecode.com/svn/trunk/facilegadget.css" />
<script type="text/javascript">
//parametri gadget  
var nomegadget = "film";
var IDgadget = "25";
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; text-decoration: none;}
    a:visited {color: #003099;}
    a:hover {color: red;}
    i {color: #808080; font-weight: bold;}
    td {font-size: 12px;}
    
    .frecce a {font-size: 35px; line-height: 25px; text-decoration: none;}
    .titolo {font-weight: bold; font-size: 17px; text-align: center;}
</style>
   
<script type="text/javascript">
var prefs = new _IG_Prefs();

function Film(param) {
     var numero, numeromax, html;
     var title, link, descrizione;
     var i, j, url;
     var nodeList, itemList, node;

     url = "http://www.filmscoop.it/feed/alcinema.asp";
          
     _IG_FetchXmlContent(url, function (response) {
           if (response == null || typeof(response) != "object" || response.firstChild == null) {
              _gel("content_div").innerHTML = "<i>Nessun dato da visualizzare</i>";
              return;
           }

           itemList = response.getElementsByTagName("item");
           numeromax = itemList.length - 1;

           if (param == 0) {
             numero = 0;
             prefs.set("counter", numero);
           }
           else if (param == 1) {
             numero = prefs.getInt("counter") + 1;
             if (numero > numeromax) {numero = 0;}
             prefs.set("counter", numero);
           }
           else if (param == 2) {
             numero = prefs.getInt("counter") - 1;
             if (numero < 0) {numero = numeromax;}
             prefs.set("counter", numero);
           }
 
           for (i = numero; i < numero+1; i++) {
             html = "";
             nodeList = itemList.item(i).childNodes;

             for (j = 0; j < nodeList.length ; j++) {
                node = nodeList.item(j);
                if (node.nodeName == "title") {
                   title = node.firstChild.nodeValue;
                }
                if (node.nodeName == "link") {
                   link = node.firstChild.nodeValue;
                   linktesto = link.replace("?v", "? v");
                }
                if (node.nodeName == "description") {
                   descrizione = node.firstChild.nodeValue;
                   descrizione = descrizione.replace("hspace='8'", "");
                   descrizione = descrizione.replace("vspace='8'", "");
                   descrizione = descrizione.replace("align='right'", "");
                   descrizione = descrizione.replace("Regia", "<br><br>Regia");
                   descrizione = descrizione.replace(/href='/g, "target='_blank' href='");
                   descrizione = descrizione.replace("img src='", "img width='160' src='");
                }
             }

             html += "<table width=100%>";
             html += "<tr><td class='frecce'><a title='Film precedente' href='javascript:Film(2)'>&laquo;</a></td>";
             html += "<td align=center>" + descrizione + "</td>";
             html += "<td class='frecce'><a title='Film successivo' href='javascript:Film(1)'>&raquo;</a></td></tr>";
             html += "</table>";

             _gel("content_div").innerHTML = html;
            simply250();
            setTimeout('_IG_AdjustIFrameHeight()', 500); 
            _IG_AdjustIFrameHeight();
         } 
    });
  }
</script>
<div id="content_div"></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=32389");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);
Film(0);
</script>

]]></Content></Module>