﻿// JScript 文件

//图片按比例缩放 
function changeImg(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.height=image.height; 
         } 
         ImgD.alt=image.width+"×"+image.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; 
         } 
         ImgD.alt=image.width+"×"+image.height; 
         } 
     } 
} 


function addFlash(flashURL,flashWIDTH,flashHEIGHT) 
{    
    document.writeln('<OBJECT  WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+'>');   
    document.writeln('<PARAM NAME=movie VALUE="'+flashURL+'">');   
    document.writeln('<PARAM NAME=wmode VALUE=transparent>');   
    document.writeln('<PARAM NAME=loop VALUE=true>');   
    document.writeln('<PARAM NAME=quality VALUE=high>');   
    document.writeln('<EMBED src="'+flashURL+'" loop=true wmode=opaque quality=high swLiveC WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');   
    document.writeln('</OBJECT>'); 
} 



function pshow(tid)
{   
 
    $(".L_item[t*='"+tid+"']").toggle();
       
     
}
