function checkSearch(formObj){
	if(formObj.query.value==""){
		alert("请输入查询关键字");
		formObj.query.focus();
		return false;
	}	
	return true;
}

function fResizeImg(w, h, id){ 
        var img=''; 
		var obj; 
        if(id==undefined)obj=document.images; 
        else obj=document.getElementById(id).getElementsByTagName('img'); 
         
        for(var i=0; i<obj.length; i++){ 
            img=obj[i]; 
            if(img.width>w&&(img.height<img.width)){ 
                img.height=img.height-(img.height/(img.width/(img.width-w))) 
                img.width=w; 
            }else if(img.height>h&&(img.height>img.width)){ 
                img.width=img.width-(img.width/(img.height/(img.height-h))) 
                img.height=h; 
            } 
             
            img.onclick=function(){ 
                try{ imgPopup.close();} catch(e){} 
                imgPopup=open('#', 'imgurl', 'left='+(screen.availWidth-500)/2+ 
                ', top='+(screen.availHeight-500)/2) 
                imgPopup.document.write('<script>document.onclick=function(){ close();} /* 单击关闭窗口 */ <\/script>');                  
                imgPopup.document.write('<img src="'+this.src+'"/>'+ 
                    '<script>'+ 
                        'var w, h;'+ 
                        'var img=document.images[0];'+ 
                        'if(navigator.appName=="Opera"){w=img.width+10; h=img.height+40} else {w=img.width+10; h=img.height+25};'+ 
                        'self.resizeTo(w, h);'+ 
                        'self.moveTo((screen.availWidth-img.width)/2,(screen.availHeight-img.height)/2)'+ 
                    '<\/script>'+ 
                    '<style>body{margin:0; padding:0;} .hd{visibility:hidden;}<\/style>'); 
                imgPopup.document.write('<p class="hd">ok</p>'); 
                imgPopup.document.close(); 
                imgPopup.focus(); 
            } 
        } 
} 