       var spkietrailtms = [];
        var spkietms = [];
        var spkieproid=[]; 
        var spkieurl=[];
        
                            
             function spkieTakeCount() { 
            setTimeout("spkieTakeCount()", 1000); 
            for (var i = 0; i <spkietrailtms.length;i++) {
                //计数减一
                spkietrailtms[i] -= 1;
                //计算时分秒
                var days = Math.floor(spkietrailtms[i] / ( 60 * 60 * 24));
                var hours = Math.floor(spkietrailtms[i] / (60 * 60)) % 24;
                var minutes = Math.floor(spkietrailtms[i] / ( 60)) % 60;
                var seconds = Math.floor(spkietrailtms[i] ) % 60;
                if (days < 0)
                    days = 0;
                if (hours < 0)
                    hours = 0;
                if (minutes < 0)
                    minutes = 0;
                if (seconds < 0)
                    seconds = 0;
                    
                 debugger;
                  if(days==0&&hours==0&&minutes==0&&seconds==0&&spkietms[i]>60)
                 {
                         if(spkietms[i]>60)
                         {
                            spkietrailtms[i]=spkietms[i];
                            spkietms[i]=0;
                            $("#p_"+spkieproid[i]).html("距离结束时间");
                         }
                        
                 } 
                 
                 if(days==0&&hours==0&&minutes==0&&seconds==0)
                 {
                    if(action[i]='del')
                    {
                        $("#li"+spkieproid[i]).remove();
                    }
                    else(action[i]='stop')
                    {
                         $($("#days"+spkieproid[i]).parent()).html("已结束");
                         
                         $("a").each(function(n,d){
                                if(d.href.indexOf(spkieurl[i]+spkieproid[i])!=-1)
                                {
                                    d.href="javascript::";
                                } 
                        });
                   }
                 }
                 else
                 {
                     //将时分秒插入到html中
                    document.getElementById("spkiedays"+spkieproid[i]).innerHTML = days;
                    document.getElementById("spkiehour"+spkieproid[i]).innerHTML = hours;
                    document.getElementById("spkieminute"+spkieproid[i]).innerHTML = minutes;
                    document.getElementById("spkiesecond"+spkieproid[i]).innerHTML = seconds;
                 }
            }
        }
        setTimeout("spkieTakeCount()", 1000);