﻿// JavaScript Document
function $(obj){return document.getElementById(obj)}
function Tab(Xname,Cname,Lenght,j)
{
for(i=1;i<Lenght;i++){eval("$('"+Xname+i+"').className='n2'");}eval("$('"+Xname+j+"').className='n1'");
for(i=1;i<Lenght;i++){eval("$('"+Cname+i+"').style.display='none'");eval("$('"+Cname+j+"').style.display='block'");}}

//样式表控制幻灯片效果
document.writeln("<style type=\"text\/css\">");
document.writeln("<!--");
document.writeln("#au{filter:progid:DXImageTransform.Microsoft.Fade(duration=0.5,overlap=1.0);-moz-opacity: 0.4;}");
document.writeln("-->");
document.writeln("<\/style>");


 function DrawImage(ImgD,iwidth,iheight) { 
     var image=new Image(); 
     image.src=ImgD.src; 
     if(image.width>0 && image.height>0){ 
        if(image.width/image.height>= iwidth/iheight){ 
           if(image.width>iwidth){ 
               ImgD.width=iwidth; 
               ImgD.height=(image.height*iwidth)/image.width; 
           }
           else
           { 
                  ImgD.width=image.width; 
                   
           } 
               ImgD.alt=ImgD.width+"×"+ImgD.height; 
        } 
        else{ 
                if(image.height>iheight){ 
                       ImgD.height=iheight; 
                       ImgD.width=(image.width*iheight)/image.height; 
                }else{ 
                        ImgD.width=image.width; 
                        ImgD.height=image.height; 
                     } 
            } 
    } 
}


