var flag = false;
function DrawImage(ImgD)
{
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0)
   {
    flag=true;
    if(image.width/image.height>= 132/96){
     if(image.width>132){  
     ImgD.width=132;
     ImgD.height=(image.height*96)/image.width;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     }
    else{
     if(image.height>96){  
     ImgD.height=96;
     ImgD.width=(image.width*96)/image.height;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     }
     ImgD.alt="图片新闻";
    }
} 

function openWin(theURL,winName,features)
{
  window.open(theURL,winName,features);
}

var timerID=null
function showtime(seed){
	if (seed>=0){ 
		seed++;  
	        mod=seed%3600;  
	        hours=(seed-mod)/3600  
	        seconds=mod%60 
	        minutes=(seed-3600*hours-seconds)/60; 
	        var timeValue=""+((hours < 10)?"0":"")+hours  
	        timeValue+=((minutes < 10)?":0":":")+minutes  
	        timeValue+=((seconds < 10)?":0":":")+seconds 
	        document.clock.face.value=timeValue;  
	        var cmd="showtime("+seed+")";
	        timeID=window.setTimeout(cmd,1000);  
	}
}

today=new Date();
function initArray(){
	this.length=initArray.arguments.length
	for(var i=0;i<this.length;i++)
	this[i+1]=initArray.arguments[i]
}

var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
document.write(
     "<font color=#CC3300 style='font-size:9pt;'> ",
     today.getYear(),"年",
     today.getMonth()+1,"月",
     today.getDate(),"日   ",
     d[today.getDay()+1],
     "</font>"
); 
