  function beat_time(){
      my_time = new Date();
      offset = (my_time.getTimezoneOffset() + 60) * 60 * 1000; 
      m_sec = my_time.getTime();
      bmt = new Date(m_sec + offset);
      
      bmt_year   = converter("year", bmt.getYear());
      bmt_month  = converter("month",bmt.getMonth()+1, 2);
      bmt_day    = converter("day", bmt.getDate(), 2);
      bmt_hour   = (bmt.getHours()) * 1000 * 60 * 60 ;
      bmt_minute = (bmt.getMinutes()) * 1000 * 60;
      bmt_second = (bmt.getSeconds()) * 1000;
      
      // divide the basic unit by 100 to get sub beats
      bmt_unit = 60*60*24 / 100;
      bmt_time = Math.floor((bmt_hour + bmt_minute + bmt_second) / bmt_unit) / 100;
      bmt_time = converter("bmt", bmt_time, 3); 
    
      // keep the original unit intact
      bmt_unit2 = 60*60*24;
      bmt_time2 = Math.floor((bmt_hour + bmt_minute + bmt_second) / bmt_unit2);
      bmt_time2 = converter("bmt", bmt_time2, 3);     


      // calculate the sub beats
      sub_beat = Math.round((1-(Math.ceil(bmt_time)-bmt_time))*100);

      // check for various cases that don't work correctly
      if (sub_beat == 100) sub_beat = "0";
      if (sub_beat < 10) sub_beat = "0"+sub_beat;

      // display total
      my_beat2  = "@" + bmt_time2 + "." + sub_beat;

      try{
      	document.getElementById("it_time_span").title="现在网络时间:"+my_beat2;
      }catch(e){}
      try{
      	var els=document.getElementsByName("orz_xlent");
      	for(var i=0;i<els.length;i++){
      		els[i].innerHTML="现在网络时间:"+my_beat2;
      	}
      }catch(e){}
      setTimeout("beat_time()", bmt_unit);
  }
  function converter(action, in_data, in_l){
      if (action != "year"){
        in_data = in_data.toString();
        dl = ( in_data.toString() ).length;
      }
 
      if (action == "year"){
        if (in_data < 97)
          out_data = 2000 + in_data; 
        else 
          out_data = 1900 + in_data;
      }
      
      else {
         zero = new String();
         for (i=0; i < (in_l - dl); i++){
           zero += "0";
         }
         out_data = zero + in_data;
      }
      return out_data.toString();
  }
