<center><style >
.lcdstyle{background-color:transparent;color:#ffffff;font:italic normal 36px Arial, Helvetica, sans-serif;padding:15px;</style>
<script >
function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}
cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000)
}
cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}
cdtime.prototype.showresults=function(){
var thisobj=this
var timediff=(this.targetdate-this.currentTime)/1000
if (timediff<0){
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60
var oneHour=60*60
var oneDay=60*60*24
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000)
}
function formatresults(){
if (this.timesup==false){
var displaystring=arguments[0]+" days "+arguments[1]+" hours "+arguments[2]+" minutes "+arguments[3]+" seconds left until December 25, 2011 18:25:00"
}
else{ //else if target date/time met
var displaystring=""
}
return displaystring
}
function formatresults2(){
if (this.timesup==false){
var displaystring="<span 'lcdstyle'>"+arguments[0]+" <sup>Ημέρες</sup> "+arguments[1]+" <sup>Ώρες</sup> "+arguments[2]+" <sup>Λεπτά</sup> "+arguments[3]+" <sup>Δευτερόλεπτα</sup></span> "
}
else{ //else if target date/time met
var displaystring=""
alert("Christmas is here!")
}
return displaystring
}
</script>
<div >Μας μένουν ως τα Χριστούγεννα ! ! ! </div>
<div id="countdowncontainer"></div>
<br>
<div id="countdowncontainer2"><span >22 <sup>Ημέρες</sup> 8 <sup>Ώρες</sup> 36 <sup>Λεπτά</sup> 5 <sup>Δευτερόλεπτα</sup></span> </div>
<script >
var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00")
futuredate.displaycountdown("days", formatresults)
var currentyear=new Date().getFullYear()
//dynamically get this Christmas' year value. If Christmas already passed, then year=current year+1
var thischristmasyear=(new Date().getMonth()>=11 && new Date().getDate()>25)? currentyear+1 : currentyear
var christmas=new cdtime("countdowncontainer2", "December 25, "+thischristmasyear+" 0:0:00")
christmas.displaycountdown("days", formatresults2)
</script></center>
.lcdstyle{background-color:transparent;color:#ffffff;font:italic normal 36px Arial, Helvetica, sans-serif;padding:15px;</style>
<script >
function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}
cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000)
}
cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}
cdtime.prototype.showresults=function(){
var thisobj=this
var timediff=(this.targetdate-this.currentTime)/1000
if (timediff<0){
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60
var oneHour=60*60
var oneDay=60*60*24
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000)
}
function formatresults(){
if (this.timesup==false){
var displaystring=arguments[0]+" days "+arguments[1]+" hours "+arguments[2]+" minutes "+arguments[3]+" seconds left until December 25, 2011 18:25:00"
}
else{ //else if target date/time met
var displaystring=""
}
return displaystring
}
function formatresults2(){
if (this.timesup==false){
var displaystring="<span 'lcdstyle'>"+arguments[0]+" <sup>Ημέρες</sup> "+arguments[1]+" <sup>Ώρες</sup> "+arguments[2]+" <sup>Λεπτά</sup> "+arguments[3]+" <sup>Δευτερόλεπτα</sup></span> "
}
else{ //else if target date/time met
var displaystring=""
alert("Christmas is here!")
}
return displaystring
}
</script>
<div >Μας μένουν ως τα Χριστούγεννα ! ! ! </div>
<div id="countdowncontainer"></div>
<br>
<div id="countdowncontainer2"><span >22 <sup>Ημέρες</sup> 8 <sup>Ώρες</sup> 36 <sup>Λεπτά</sup> 5 <sup>Δευτερόλεπτα</sup></span> </div>
<script >
var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00")
futuredate.displaycountdown("days", formatresults)
var currentyear=new Date().getFullYear()
//dynamically get this Christmas' year value. If Christmas already passed, then year=current year+1
var thischristmasyear=(new Date().getMonth()>=11 && new Date().getDate()>25)? currentyear+1 : currentyear
var christmas=new cdtime("countdowncontainer2", "December 25, "+thischristmasyear+" 0:0:00")
christmas.displaycountdown("days", formatresults2)
</script></center>