<!--
function FP_openNewWindow(w,h,nav,loc,sts,menu,scroll,resize,name,url) {//v1.0
 var windowProperties=''; if(nav==false) windowProperties+='toolbar=no,'; else
  windowProperties+='toolbar=yes,'; if(loc==false) windowProperties+='location=no,'; 
 else windowProperties+='location=yes,'; if(sts==false) windowProperties+='status=no,';
 else windowProperties+='status=yes,'; if(menu==false) windowProperties+='menubar=no,';
 else windowProperties+='menubar=yes,'; if(scroll==false) windowProperties+='scrollbars=no,';
 else windowProperties+='scrollbars=yes,'; if(resize==false) windowProperties+='resizable=no,';
 else windowProperties+='resizable=yes,'; if(w!="") windowProperties+='width='+w+',';
 if(h!="") windowProperties+='height='+h; if(windowProperties!="") { 
  if( windowProperties.charAt(windowProperties.length-1)==',') 
   windowProperties=windowProperties.substring(0,windowProperties.length-1); } 
 window.open(url,name,windowProperties);
}

function OpWin(UrlStr){
FP_openNewWindow('', '', false, false, false, false, true, true, 'Flash', /*href*/''+UrlStr)
}


//图片按比例缩放
var flag=false;
function DrawImg(Img,iwidth,iheight){
//参数(图片,允许的宽度,允许的高度)
var image=new Image();
image.src=Img.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= iwidth/iheight){
if(image.width>iwidth){ 
Img.width=iwidth;
Img.height=(image.height*iwidth)/image.width;
   }
else{
Img.width=image.width; 
Img.height=image.height;
    }

   }
else{
if(image.height>iheight){ 
Img.height=iheight;
Img.width=(image.width*iheight)/image.height; 
}else{
Img.width=image.width; 
Img.height=image.height;
     }

     }
   }
} 

//禁止图片右键  
var clickmessage="Sorry, the picture is only for view!"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.layers)
associateimages()

//-->

