tlan16

cater timeout special

Jul 2nd, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.25 KB | None | 0 0
  1. <html>
  2. <head>
  3. <h3 align="left">Check our our Weekly Special, end soon in</h3>
  4. <style type="text/css">
  5. #count {
  6.     border: none;
  7.     text-align: left;
  8.     font-family: Arial;
  9.     font-size: 16px;
  10.     font-weight: normal;    /* options are normal, bold, bolder, lighter */
  11.     font-style: normal;     /* options are normal or italic */
  12.     color: red;    /* change color using the hexadecimal color codes for HTML */
  13.     background-color: transparent;     /* change the background color using the hex color codes for HTML */
  14.     }
  15. </style>
  16. </head>
  17.  
  18. <body>
  19. <div style="text-align: center;">
  20.     <div style="margin-left: auto; margin-right: auto; text-align: center; position: relative; ">
  21.         <div id="count"></div>
  22.     </div>
  23. </div>
  24.  
  25. <script>
  26.  
  27. /*
  28. Count down until any date script-
  29. By JavaScript Kit (www.javascriptkit.com)
  30. Over 200+ free scripts here!
  31. Modified by Robert M. Kuhnhenn, D.O.
  32. on 5/30/2006 to count down to a specific date AND time,
  33. and on 1/10/2010 to include time zone offset.
  34. */
  35.  
  36. /*  Change the items below to create your countdown target date and announcement once the target date and time are reached.  */
  37. var current="Sorry, our promotion is finised!";        //—>enter what you want the script to display when the target date and time are reached, limit to 20 characters
  38. var year=2013;        //—>Enter the count down target date YEAR
  39. var month=7;          //—>Enter the count down target date MONTH
  40. var day=10;           //—>Enter the count down target date DAY
  41. var hour=0;          //—>Enter the count down target date HOUR (24 hour clock)
  42. var minute=0;        //—>Enter the count down target date MINUTE
  43. var tz=+10;            //—>Offset for your timezone in hours from UTC (see http://wwp.greenwichmeantime.com/index.htm to find the timezone offset for your location)
  44.  
  45. //—>    DO NOT CHANGE THE CODE BELOW!    <—
  46. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  47.  
  48. function countdown(yr,m,d,hr,min){
  49. theyear=yr;themonth=m;theday=d;thehour=hr;theminute=min;
  50. var today=new Date();
  51. var todayy=today.getYear();
  52. if (todayy < 1000) {
  53. todayy+=1900; }
  54. var todaym=today.getMonth();
  55. var todayd=today.getDate();
  56. var todayh=today.getHours();
  57. var todaymin=today.getMinutes();
  58. var todaysec=today.getSeconds();
  59. var todaystring1=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
  60. var todaystring=Date.parse(todaystring1)+(tz*1000*60*60);
  61. var futurestring1=(montharray[m-1]+" "+d+", "+yr+" "+hr+":"+min);
  62. var futurestring=Date.parse(futurestring1)-(today.getTimezoneOffset()*(1000*60));
  63. var dd=futurestring-todaystring;
  64. var dday=Math.floor(dd/(60*60*1000*24)*1);
  65. var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
  66. var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
  67. var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
  68. if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=0){
  69. document.getElementById('count').innerHTML=current;
  70. return;
  71. }
  72. else {
  73. document.getElementById('count').innerHTML=+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds";
  74. setTimeout("countdown(theyear,themonth,theday,thehour,theminute)",1000);
  75. }
  76. }
  77.  
  78. countdown(year,month,day,hour,minute);
  79.  
  80. </script>
  81. </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment