Visitantes

Pesquisar este blog

quinta-feira, 26 de julho de 2012

Regressiva para o V EnGITEC

Segue o código para a contagem regressiva para o V Engitec.

 [code]

 <script type="text/javascript">document.write("<div id='pageinval34' style='text-align:center; font-family:arial, helvetica, sans-serif; font-size:20px; width:400px; color:#000000;font-weight:normal;background-color:#FFFFFF; padding:7px; margin:0;overflow:visible;border:1px solid #071F4F;'></div>");function countdown_load20(){var the_event="Faltam ";var on_event="Começou o V EnGITEC";var yr=2012;var mo=08;var da=20;var hr=10;var min=0;var sec=0;var month='';var month=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var bottom_event="Para o V EnGitec";var now_d=new Date();var now_year=now_d.getYear();if (now_year < 1000)now_year+=1900;var now_month=now_d.getMonth();var now_day=now_d.getDate();var now_hour=now_d.getHours();var now_min=now_d.getMinutes();var now_sec=now_d.getSeconds();var now_val=month[now_month]+" "+now_day+", "+now_year+" "+now_hour+":"+now_min+":"+now_sec;event_val=month[mo-1]+" "+da+", "+yr+" "+hr+":"+min+":"+sec;difference=Date.parse(event_val)-Date.parse(now_val);differenceday=Math.floor(difference/(60*60*1000*24)*1);differencehour=Math.floor((difference%(60*60*1000*24))/(60*60*1000)*1);differencemin=Math.floor(((difference%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);differencesec=Math.floor((((difference%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);if(document.getElementById('pageinval34')){if(differenceday<=0&&differencehour<=0&&differencemin<=0&&differencesec<=1&&now_day==da){document.getElementById('pageinval34').innerHTML=on_event;}else if (differenceday<=-1){document.getElementById('pageinval34').innerHTML="Event : "+on_event+" : passed";}else {document.getElementById('pageinval34').innerHTML=the_event+"<br />"+differenceday+" days "+differencehour+" hours "+differencemin+" minutes "+differencesec+" seconds <br />"+bottom_event;} }setTimeout("countdown_load20()",1000);}countdown_load20();</script>

 [/code]