﻿function DrawImage(MyPic,W,H){
  var flag=false;
  var image=new Image();
  image.src=MyPic.src;
  if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= W/H){
      if(image.width>W){
        MyPic.width=W;
        MyPic.height=(image.height*W)/image.width;
      }
	  else{
        MyPic.width=image.width;
        MyPic.height=image.height;
      }
    }
    else{
      if(image.height>H){
        MyPic.height=H;
        MyPic.width=(image.width*H)/image.height;
      }
	  else{
        MyPic.width=image.width;
        MyPic.height=image.height;
      }
    }
  }
}

//滑动门
function fsecBoard(n) 
{ 
    for(i=1;i<4;i++) 
    { 
        eval("document.getElementById('fl0"+i+"').className='f102'"); 
        eval("document.getElementById('fbx0"+i+"').style.display='none'"); 
    } 
    eval("document.getElementById('fl0"+n+"').className='f101'"); 
    eval("document.getElementById('fbx0"+n+"').style.display='block'"); 
} 

//flash
function activeswf(ur,w,h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+ur+'">');
document.write('<param name="quality" value="high"> ');
document.write('<param name="wmode" value="transparent"> ');
document.write('<param name="menu" value="false"> ');
document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">');
document.write('</embed>');
document.write('</object>');
}

<!-- 
function bookmarkit() 
{ 
window.external.addFavorite('http://www.666power.com/','亮斯特开关电源') 
} 
//--> 

