if(typeof(jQuery)=="undefined"){window.document.write(" <script src='script/jquery-1.4.2.min.js' type='text/javascript'></script>")};

 
        var tms = [];
        var proid=[];
        var start=[];
        var title=[];
        var context=[];
        var url=[];
        var action=[];
        var isOut=false;
        function takeCount() {
             
            setTimeout("takeCount()", 1000);
            
          
            for (var i = 0; i<tms.length; i++) {
                //计数减一
                tms[i] -= 1;
                //计算时分秒
                var days = Math.floor(tms[i] / ( 60 * 60 * 24));
                var hours = Math.floor(tms[i] / (60 * 60)) % 24;
                var minutes = Math.floor(tms[i] / ( 60)) % 60;
                var seconds = Math.floor(tms[i] ) % 60;
                
                if (days    < 0) days = 0;
                if (hours   < 0) hours = 0;
                if (minutes < 0) minutes = 0;
                if (seconds < 0) seconds = 0;
                     
                 
                 if(days==0&&hours==0&&minutes==0&&seconds==0)
                 { 
                  
                  
                    $($("#"+title[i])).html(context[i]);
                   
                     $("a").each(function(n,d){
                            debugger;
                            if(d.href.indexOf("OrderEdit.aspx?proid="+proid[i])!=-1&&url!="")
                            {
                                d.href="javascript::";
                                d.target="";
                            }
                     });
                     
                     if(action[i]=="referrer"&&isOut==false)
                     { 
                        isOut=true;
                         window.location.href=window.location.href;
                     }
                     
                 }
                 else
                 {
                
                     //将时分秒插入到html中
                    document.getElementById("days"+proid[i]).innerHTML = days;
                    document.getElementById("hour"+proid[i]).innerHTML = hours;
                    document.getElementById("minute"+proid[i]).innerHTML = minutes;
                    document.getElementById("second"+proid[i]).innerHTML = seconds;
                 }      
            }
        }
        setTimeout("takeCount()", 1000);
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
     
     
    