lab="Аукцiон завершено" var findate=0 var mydate=new Date(2009, 0, 6, 07, 34, 47) var dayarray=new Array("недiля","понедiлок","вiвторок","середа","четвер","п'ятниця","субота") var montharray=new Array("сiчня","лютого","березня","квiтня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня") function getthedate(){ mydate.setTime(mydate.getTime()+1000) if (findate < 0) findate=findate+1 var year=mydate.getYear() if (year < 1000) year+=1900 var day=mydate.getDay() var month=mydate.getMonth() var daym=mydate.getDate() if (daym<10) daym="0"+daym var hours=mydate.getHours() var minutes=mydate.getMinutes() var seconds=mydate.getSeconds() var dn="AM" if (hours>=12) dn="PM" if (hours>12){ hours=hours } if (hours==0) hours=12 if (minutes<=9) minutes="0"+minutes if (seconds<=9) seconds="0"+seconds //change font size here //////////////////////////////////////////////////////// //mydatedown.setTime(mydatedown.getTime()-1000) //mydate //var todayy=mydate.getYear() //if (todayy < 1000) //todayy+=1900 //var todaym=mydate.getMonth() //var todayd=mydate.getDate() //var todayh=mydate.getHours() //var todaymin=mydate.getMinutes() //var todaysec=mydate.getSeconds() //var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec //futurestring=":Test:" //futurestring=montharray[mo-1]+" "+da+", "+yr+" "+ //montharray[mo-1]+" "+da+", "+yr dd=-findate //Date.parse(futurestring)-Date.parse(todaystring) dday=Math.floor(dd/(60*60*24)*1) dhour=Math.floor((dd%(60*60*24))/(60*60)*1) dmin=Math.floor(((dd%(60*60*24))%(60*60))/(60)*1) dsec=Math.floor((((dd%(60*60*24))%(60*60))%(60))/1) if (findate < 0) futurestring=lab+"
"+dday+" днiв "+dhour+":"+dmin+":"+dsec+"" else futurestring=lab+"
" //futurestring=dd //////////////////////////////////////////////////////// var cdate="Сьогодні "+dayarray[day]+", "+daym+" "+montharray[month]+", "+year+"
"+hours+":"+minutes+":"+seconds+" "+dn +"
" if (document.all) document.all.clock.innerHTML=cdate else if (document.getElementById) document.getElementById("clock").innerHTML=cdate else document.write(cdate) if (document.all) { if (document.all.clockdown) document.all.clockdown.innerHTML=futurestring } else if (document.getElementById) { if (document.getElementById("clockdown")) document.getElementById("clockdown").innerHTML=futurestring } else document.write(futurestring) } if (!document.all&&!document.getElementById) getthedate() function goforit(){ if (document.all||document.getElementById) { setInterval("getthedate()",1000) getthedate() } }