﻿window.onload=function() {
    SetCurTime();
    setInterval("SetCurTime()", 1000);
    }
    
   function SetCurTime() {
    var ctrl = document.getElementById("CurTime");
    var d = new Date();
    ctrl.innerHTML = d.getFullYear()+"-"+lpadding(d.getMonth()+1)+"-"+lpadding(d.getDate())+"&nbsp;"+lpadding(d.getHours())+":"+lpadding(d.getMinutes())+":"+lpadding(d.getSeconds());
    }
    
    function lpadding(value) {
      if(value < 10) return "0" + value;
     else return value;
     }  
    
 // 显示幻灯片
function ShowSlide(width, height, pics, links, texts, txtheight, bgcolor) {
  var focus_width = width;
  var focus_height = height;
  var text_height = txtheight ? txtheight : 20;
  var swf_height = focus_height + text_height; 
  var color = bgcolor ? bgcolor : "#DADADA";
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + focus_width + '" height="' + swf_height + '">'); 
  document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="Images/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="' + color + '">'); 
  document.write('<param name="menu" value="false"><param name=wmode value="opaque">'); 
  document.write('<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">'); 
  document.write('<embed src="Images/pixviewer.swf" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="' + color + '" quality="high" width="'+ focus_width + '" height="' + swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>'); 
  document.write('</object>'); 
}

