// FUNZIONI MOVIE (JavaScript)

// http://web.tiscali.it/fabioracco.simpson
// Author: Fabio Racco


// Count Down Code
// campi da definire nella pagina d'origine:

//	<span id="clock" style="position:relative">
//	<script language="JavaScript" type="text/javascript">
//	<!-- This comment hides the script from older browsers
//		startclock();
//		if (!document.layers && !document.all) document.write(timeValue);
//	//-->
//	</script></span>


var timeValue = "ORA AL CINEMA!!!";

function startclock()
{
    if (document.layers)
    { document.layers.clock.write(timeValue);
      document.layers.clock.close(); }
    else if (document.all)
      document.all.clock.innerHTML = timeValue;
}


/*  Obsoleto...
var timerID = null;
var timeValue = "";

function startclock()
{ clearTimeout(timerID);
  showtime(); }

function showtime()
{
var today = new Date();
var target = new Date("September 14, 2007, 00:00:00");

var days = (target.getTime()-today.getTime()) / 1000 / 60 / 60 / 24;
	days = Math.floor(days);
var hours = (target.getTime()-today.getTime()) / 1000 / 60 / 60 - (24*days);
	hours = Math.floor(hours);
var minutes = (target.getTime()-today.getTime()) / 1000 / 60 - (24*60*days) - (60*hours);
	minutes = Math.floor(minutes);
var seconds = (target.getTime()-today.getTime()) / 1000 - (24*60*60*days) - (60*60*hours) - (60*minutes);
	seconds = Math.floor(seconds);
var cents = (target.getTime()-today.getTime()) / 10 - (24*60*60*100*days) - (60*60*100*hours) - (60*100*minutes) - (100*seconds);
	cents = Math.floor(cents);

    if (hours<10) hours = "0" + hours;
    if (minutes<10) minutes = "0" + minutes;
    if (seconds<10) seconds = "0" + seconds;
    if (cents<10) cents = "0" + cents;

    if (days==1) timeValue = "manca solo un giorno " + hours + " ore " + minutes + " minuti e " + seconds + "." + cents + " secondi!!!";
    else if (days==0) timeValue = "il gran giorno è domani - mancano solo " + hours + " ore " + minutes + " minuti e " + seconds + "." + cents + " secondi!!!";
    else if (days==-1) timeValue = "OGGI AL CINEMA!!!";
    else timeValue = "mancano " + days + " giorni " + hours + " ore " + minutes + " minuti e " + seconds + "." + cents + " secondi!!!";

    if (document.layers)
    { document.layers.clock.write(timeValue);
      document.layers.clock.close(); }
    else if (document.all)
      document.all.clock.innerHTML = timeValue;
    if ((document.layers) || (document.all))
      timerID = setTimeout("showtime()",100);

// window.status = "14/09/07 - Il film dei Simpson: mancano " + days + "gg " + hours + ":" + minutes + ":" + seconds + "." + cents;
// top.document.title = "14/09/07 - Il film dei Simpson: mancano " + days + "gg " + hours + ":" + minutes + ":" + seconds + "." + cents;
}
*/

// FUNZIONI MOVIE - Fine

