+
+function abortLog() {
+ matitaLayout.hide("south");
+}
+
+// a more beautiful procedure to scroll the script to the beginning of unlocked
+// only when needed, and showing it at about one third of the height of the
+// scrollable pane
+function smartScroll() {
+ var element = $("#unlocked");
+ var container = element.parent().parent();
+ var containerTop = container.scrollTop();
+ var containerBottom = containerTop + container.height();
+ var elemTop = element.get(0).offsetTop;
+ if (elemTop < containerTop || elemTop > containerBottom) {
+ container.scrollTop(elemTop - container.height()/4);
+ }
+}