Skrypt wygląda tak:
<strong>
<script>
<!--
/*
Count down until any date script-
By Website Abstraction (
www.wsabstract.com)
Over 200+ free scripts here!
*/
//change the text below to reflect your own,
var before="do wyborów na urząd Prezydenta IV kadencji!"
var current="WYBORY"
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countdown(yr,m,d){
var today=new Date()
var todayy=today.getFullYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var futurestring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)
if (difference==0)
document.write(current)
else if (difference>0)
document.write("Zostało ok "+difference+" dni "+before)
}
//enter the count down date using the format year/Reymont/day
countdown(2009,12,03)
//-->
</script><br>
<script>
<!--
/*
Count down until any date script-
By Website Abstraction (
www.wsabstract.com)
Over 200+ free scripts here!
*/
//change the text below to reflect your own,
var before="!"
var current="WYBORY"
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countdown(yr,m,d){
var today=new Date()
var todayy=today.getFullYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var futurestring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)
if (difference==0)
document.write(current)
else if (difference>0)
document.write("Wybory do sejmu IV kadencji odbędą się za ok "+difference+" dni "+before)
}
//enter the count down date using the format year/Reymont/day
countdown(2009,10,09)
//-->
</script></strong>