//自动缩略图
var flag=false; 
function DrawImage(ImgD,ImgWidth){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= 1){ 
   if(image.width>ImgWidth){
    ImgD.width=ImgWidth; 
    ImgD.height=(image.height*ImgWidth)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt= "点击查看"+image.width+"×"+image.height+"原始图片..."; 
  } 
  else{ 
   if(image.height>ImgWidth){
    ImgD.height=ImgWidth; 
    ImgD.width=(image.width*ImgWidth)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt= "点击查看"+image.width+"×"+image.height+"原始图片..."; 
  } 
 }
}
//检测用户名密码是否为空
function checklogin() {
	if (document.Loginform.UserName.value=="") {
		alert("请输入用户名!");
		Loginform.UserName.focus();
		return false;
	}
	if (document.Loginform.Password.value=="") {
		alert("请输入密码!");
		Loginform.Password.focus();
		return false;
	}
	return true;
}


