﻿
var flag=false; 
function DrawImage(ImgD){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
flag=true; 
if(image.width/image.height>= 105/80){ 
if(image.width>105){
ImgD.width=105; 
ImgD.height=(image.height*105)/image.width; 
}else{ 
ImgD.width=image.width;
ImgD.height=image.height; 
} 
ImgD.alt="点击右边图片链接,查看详细内容..."; 
} 
else{ 
if(image.height>80){
ImgD.height=80; 
ImgD.width=(image.width*80)/image.height; 
}else{ 
ImgD.width=image.width;
ImgD.height=image.height; 
} 
ImgD.alt="点击右边图片链接,查看详细内容..."; 
} 
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll")
e.checked = form.chkAll.checked;
}
}

function opencat(cat,img){
if(cat.style.display=="none"){
cat.style.display="";
img.src="/img/class2.gif";
}	else {
cat.style.display="none"; 
img.src="/img/class1.gif";
}
}



