function resizeimg(imgd,iwidth,iheight) { var image=new image(); image.src=imgd.src; if(image.width>0 && image.height>0){ if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ imgd.width=iwidth; imgd.height=(image.height*iwidth)/image.width; }else{ imgd.width=image.width; imgd.height=image.height; } imgd.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ imgd.height=iheight; imgd.width=(image.width*iheight)/image.height; }else{ imgd.width=image.width; imgd.height=image.height; } imgd.alt=image.width+"×"+image.height; }      //imgd.style.cursor= "pointer"; //改变鼠标指针 } } //导航菜单下拉 function nav(a){ var hoverclass='current';//选中的样式 $(a+" li").hover(function(){ $(this).children("ul").slidedown(100); $(this).children("a").attr({"class":hoverclass}); },function(){ $(this).children("ul").slideup(100); $(this).children("a").attr({"class":""}); }); } function initmenu() { //$('#menu ul').hide(); //$('#menu ul:first').show(); $('#menu li a').click( function() { var checkelement = $(this).next(); if((checkelement.is('ul')) && (checkelement.is(':visible'))) { return false; } if((checkelement.is('ul')) && (!checkelement.is(':visible'))) { $('#menu ul:visible').slideup('normal'); checkelement.slidedown('normal'); return false; } } ); } $(document).ready(function() {initmenu();}); //#if(${currnode.autoid}==${items1.autoid} || ${currnode.parentid}==${items1.autoid}) #else style="display:none;"#end