//渐变代码
function  trains(id,text){document.all[id].innerHTML=' '+text}
function  trainpic(id,text){document.all[id].innerHTML='<img  src="'+text+'.gif">'}
function  high(which2){
theobject=which2;theobject.filters.alpha.opacity=0
highlighting=setInterval("highlightit(theobject)",50)}
function  low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=100}
function  highlightit(cur2){
if  (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=15
else  if(window.highting)
clearInterval(highlighting)}

//图片等比例缩图
var picwidth=120
var picheight=91
flag=false
function DrawImage(ImgD)
{ 
   var image=new Image(); 
   image.src=ImgD.src; 
   image.alt=ImgD.alt;
   if(image.width>0 && image.height>0){ 
      flag=true; 
      if(image.width/image.height>= picwidth/picheight){ 
         if(image.width>picwidth){ 
            ImgD.width=picwidth; 
            ImgD.height=(image.height*picwidth)/image.width; 
         }else{ 
            ImgD.width=image.width; 
            ImgD.height=image.height; 
         } 
           //ImgD.alt=image.alt+"\n[尺寸] "+image.width+"x"+image.height+" 像素"; 
      }else{ 
         if(image.height>picheight){ 
           ImgD.height=picheight; 
           ImgD.width=(image.width*picheight)/image.height; 
         }else{ 
           ImgD.width=image.width; 
           ImgD.height=image.height; 
         }
		// var lens=image.length;//取长度
        // var extname=strs.substring(lens-4,lens);//取指定位置的子字符串
		//if(extname==".jpg")
        // {
        //  ImgD.alt=image.alt+"\n[尺寸] "+image.width+"x"+image.height+" 像素"; 
        // }
      } 
   } 
} 


//===========================点击展开关闭效果====================================

function openShutManager(oSourceObj,oTargetObj,shutAble,oOpenTip,oShutTip){

var sourceObj = typeof oSourceObj == "string" ? document.getElementById(oSourceObj) : oSourceObj;

var targetObj = typeof oTargetObj == "string" ? document.getElementById(oTargetObj) : oTargetObj;

var openTip = oOpenTip || "";

var shutTip = oShutTip || "";

if(targetObj.style.display!="none"){

   if(shutAble) return;

   targetObj.style.display="none";

   if(openTip && shutTip){

    sourceObj.innerHTML = shutTip; 

   }

} else {

   targetObj.style.display="block";

   if(openTip && shutTip){

    sourceObj.innerHTML = openTip; 

   }

}

}


