// don't rely on that node.scrollIntoView works just because the function is there// it doesnt work in Konqueror or Opera even though the function is there and probably// not safari either// dont like browser sniffs implementations but sometimes you have to use itif(dojo.isMozilla){
node.scrollIntoView(false);
}else{// #6146: IE scrollIntoView is broken// It's not enough just to scroll the menu node into view if// node.scrollIntoView hides part of the parent's scrollbar,// so just manage the parent scrollbar ourselvesvar parent = node.parentNode;
var parentBottom = parent.scrollTop + dojo.marginBox(parent).h; //PORT was getBorderBoxvar nodeBottom = node.offsetTop + dojo.marginBox(node).h;
if(parentBottom < nodeBottom){
parent.scrollTop += (nodeBottom - parentBottom);
}elseif(parent.scrollTop> node.offsetTop){
parent.scrollTop -= (parent.scrollTop - node.offsetTop);
}}