<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">// JavaScript Document
//缩略图
//图片处理函数. 
//ImgD 图片对象ID
//width_s 最大宽
//height_s 最大高
function DrawImage(ImgD,width_s,height_s){
	var image=new Image();
	image.src=ImgD.src;
	if(image.width&gt;0 &amp;&amp; image.height&gt;0){
		flag=true;
		if(image.width/image.height&gt;=width_s/height_s){
			if(image.width&gt;width_s){
				ImgD.width=width_s;
				ImgD.height=(image.height*width_s)/image.width;
			}else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
		}
		else{
			if(image.height&gt;height_s){
				ImgD.height=height_s;
				ImgD.width=(image.width*height_s)/image.height;
			}else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
		}
	}
}

function SelectCategory(dom, value){
	$(dom).parent().find('a', this).removeClass('c_E70010');
	$(dom).addClass('c_E70010');
	$("[name='selectID']").val(value);
}
//验证型号搜索表单
function checkForm(str){
	if (str.lenght &lt; 4 || str == '请输入IC型号'){
		alert("请填写3位以上的关键词！"); return false;
	}
	return true;
}





</pre></body></html>