// JavaScript Document
/*
自动变图片长高
<img src="images/smallshoeswen_2094.jpg" width="150" height="150" onload="javascript:DrawImage(this,150,160);">
*/
function DrawImage(ImgD,FitWidth,FitHeight){
var image=new Image();    
image.src=ImgD.src;    
if(image.width>0 && image.height>0){       
   if(image.width/image.height>= FitWidth/FitHeight){            
    if(image.width>FitWidth){               
     ImgD.width=FitWidth;                
     ImgD.height=(image.height*FitWidth)/image.width;            
    }else{                
     ImgD.width=image.width;               
     ImgD.height=image.height;           
    }
   }else{            
    if(image.height>FitHeight){                
     ImgD.height=FitHeight;                
     ImgD.width=(image.width*FitHeight)/image.height;           
    }else{                
     ImgD.width=image.width;                
     ImgD.height=image.height;            
    }
   }
}
}

/*
搜索验证
*/
function ChksearchForm(){
	if ((document.searchForm.keyword.value=="") ||(document.searchForm.keyword.value=="请输入关键字")){
		alert("请输入关键字搜索！");
		document.searchForm.keyword.focus();
		return false;
	}
	return true;
}
/*
分级菜单
*/
function menu(oblog){
if(oblog.style.display=='block'){
	oblog.style.display='none';
	}else{
	oblog.style.display='block';
	}
}
