<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Telegiornale online" description="Guarda la diretta di SKY TG24" 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="580" screenshot="http://facilegadget.googlecode.com/svn/trunk/tg/screenshot.png" thumbnail="http://facilegadget.googlecode.com/svn/trunk/tg/thumbnail.png" >
<Require feature="analytics" />
<Require feature="setprefs" />
<Require feature="dynamic-height" />
</ModulePrefs>
<UserPref name="Stato" display_name="Stato predefinito TV" datatype="enum" default_value="0">
  <EnumValue value="1" display_value="Accesa" />
  <EnumValue value="0" display_value="Spenta" />  
</UserPref>
<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 = "tg";
var IDgadget = "28";
var piattaforma = "igoogle";
</script>
<script type="text/javascript" src="http://facilegadget.googlecode.com/svn/trunk/facilegadget.js"></script>

<style type="text/css">
#content_div {font-size: 80%; margin: 0px; text-align: center;}
#adv {text-align: center;}
#radio {font-size: 85%; font-weight: bold; text-align: center; margin-top: 5px;}
i {font-size: 75%;}
</style>

<script type="text/javascript">
var prefs = new _IG_Prefs();
var d = new Date();
ora = d.getHours();
var primoavvio = 1;
  
function cambia() {
  var ora, orario, giorno, giornoesteso, mese, meseesteso, anno, annocorto, annoesteso;
  var selIndex = cambiatv.selectedIndex;
  prefs.set("TV", cambiatv.options[selIndex].value);
  GuardaTV();
}

function onoff() {
  var stato = prefs.getString("Stato");
  if (stato == "0") {
    prefs.set("Stato", "1");
  }
  else if (stato == "1") {
    prefs.set("Stato", "0");
  }
  GuardaTV();
}
      
function GuardaTV() {
     var stato = prefs.getString("Stato");
     var tv = "sky";
     var urltv, html;

     if (tv == "sky") {
         urltv = "rtmp://cp49989.live.edgefcs.net/live/streamRM1@2564&service=A";
     }

 if (stato == "1") {
     html = "";
     if (urltv.indexOf(".ram") > 0) {
       html += '<object id="RVOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="300" height="300" name="live">';
       html += '<param name="SRC" value="' + urltv + '"/>';
       html += '<param name="CONSOLE" value="one"/>';
       html += '<param name="CONTROLS" value="All"/>';
       html += '<param name="AUTOSTART" value="true"/>';
       html += '<embed width="270" height="290" name="live" TYPE="audio/x-pn-realaudio-plugin" src="' + urltv + '" console="one" autostart="true" />';
       html += '</object>';
       html += '<br /><i>Questo TG richiede Real player o <a target="_blank" href="http://www.facilegadget.it/extra/playerreal.asp">compatibile</a></i>';
     }
     else if (urltv.indexOf("tmp:") > 0) {
var v1 = AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
'width', '300',
'height', '260',
'src', 'http://facilegadget.googlecode.com/svn/trunk/lettore',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'lettore',
'bgcolor', '#000000',
'name', 'lettore',
'menu', 'true',
'allowFullScreen', 'true',
'allowscale','true',
'allowScriptAccess','always',
'movie', 'http://facilegadget.googlecode.com/svn/trunk/lettore',
'salign', '',
'FlashVars','stream=rtmp://cp49989.live.edgefcs.net/live/streamRM1@2564&service=A'
);
  
       html += v1;
       html += '<br /><i>Questo TG richiede Adobe Flash Player</i>';
     }
     else {
       html += '<object id="MediaPlayer1" width="270" height="280" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" />';
       html += '<param name="Autostart" value="1" />';
       html += '<param name="ShowControls" value="1" />';
       html += '<param name="ShowStatusBar" value="1" />';
       html += '<param name="ShowPositionControls" value="0" />';
       html += '<param name="ControlType" value="0" />';
       html += '<param name="stretchToFit" value="1" />';
         html += '<param name="enableContextMenu" value="0" />';
       html += '<param name="URL" value="' + urltv + '" />';

       if (navigator.userAgent.indexOf("MSIE") == -1) {
       html += '<object width="270" height="280" type="application/x-mplayer2" >';
       html += '<param name="fileName" value="' + urltv + '">';
       html += '<param name="autostart" value="1">';
       html += '<param name="ShowStatusBar" value="1">';
         html += '<param name="enableContextMenu" value="0" />';
       html += '</object>';
       }

       html += '</object>';
       html += '<br /><i>Questo TG richiede Windows Media player o <a target="_blank" href="http://www.facilegadget.it/extra/playerwmp.asp">compatibile</a></i>';
     }
  }
  else {
    html = '<p><br /><a href="javascript:onoff()"><img src="http://facilegadget.googlecode.com/svn/trunk/standby.png" border="0" /></a><br /><b>TV spenta, clicca sul pulsante qui sopra per accenderla</b></p>';
  }

  _gel("content_div").innerHTML = html;
  setTimeout('_IG_AdjustIFrameHeight()', 500);
  _IG_AdjustIFrameHeight();

  if (primoavvio == 1) {
    primoavvio = 0;
  }
  else {
    juice300();
  }
}
</script>

<div id="content_div"></div>
<div id="radio"><a href="javascript:onoff()"><img width="18" src="http://facilegadget.googlecode.com/svn/trunk/standby.jpg" border="0" /></a></div>

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

<div id="adv">
<script type='text/javascript'>
   var pathname = document.location.pathname;
   if (pathname.indexOf('-porno-') == -1) {

   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=26117");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>");
}
else juice300();
</script>
</div>

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