<!--
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;
     }

     }
   }
} 

//显示产品分类图标
function opencat(cat,img){
	if(cat.style.display=="none"){
	cat.style.display="";
	img.src="../../template/en/images/class2.gif";
	}	else {
	cat.style.display="none"; 
	img.src="../../template/en/images/class1.gif";
	}
}

function showcat(cat,img) {
  cat.style.display="";
  img.src="../../template/en/images/class2.gif";
}


//禁止图片右键  
//document.onmousedown
document.onmousedown=function(e) {
    if (!e) e=window.event;
    if (e.button==2) {
        var obj=e.srcElement?e.srcElement:e.target;
		if (obj.tagName=="IMG"){
            alert("Sorry, the picture is only for view!");
		    return false;
		}
		else{
			alert("Welcome to visit our website!");
			return false;
		}
    }
}

//-->

