It is more efficient to calculate this iterator directly than to write an equivalent program that increments the iterator one by one until it reaches the middleelement.
Shows a tooltip, but it is actually a dijit.Tooltip with some position customization; it always anchors at the middle when users hover over a charting element with the mouse.
You might want to include the Google search control in a span element, right in the middle of the rest of your app's content, rather than off to the side in a div.