index.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>countdown till Create for Millions</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  7. <script language="javascript" type="text/javascript" src="basic.js"></script>
  8. <link rel="stylesheet" href="basic.css" type="text/css" />
  9. <meta name="Generator" content="Nokia WDE 3.2.0" />
  10. </head>
  11. <body onload="javascript:init();" bgcolor="#005db8">
  12. <p align="center">
  13. <script>
  14. var before="Nokia's Create for Millions"
  15. var current="<br><br>Today is the last day to submit your apps for Nokia Create for Millions"
  16. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
  17. function countdown(yr,m,d){
  18. var today=new Date()
  19. var todayy=today.getYear()
  20. if (todayy < 1000)
  21. todayy+=1900
  22. var todaym=today.getMonth()
  23. var todayd=today.getDate()
  24. var todaystring=montharray[todaym]+" "+todayd+", "+todayy
  25. var futurestring=montharray[m-1]+" "+d+", "+yr
  26. var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)
  27. var dstring=difference.toString()
  28. if (difference==0)
  29. document.write(current)
  30. else if (difference>0){
  31. document.write('<img src="only.gif"><br>')
  32. for (i=0;i<=dstring.length-1;i++)
  33. document.write('<img src="n'+dstring.charAt(i)+'.gif">')
  34. document.write('<br><img src="deadlline.gif"')
  35. }
  36. }
  37. //enter the count down date here yyyy/mm/dd
  38. countdown(2011,09,20)
  39. </script>
  40. </p>
  41. </body>
  42. </html>