For this example, we modify Example 11 to provide an external function that computes the desired size of the HAniS window whenever the user re-sizes the browser window.
In this example, as you will see, the HAniS "window" is configured to be to the right of a "navigation" panel, and vertically placed between a "header" and a "footer".
Once this computation is done, it then calls HAniS.setWindowSize() to tell HAniS to resize its display.
The "setwin" function is defined separately so that HAniS can also call it after HAniS initializes (see the "setup" call below).
This script is defined in the <head> element as follows:
In addition, the HAniS.setup() function call adds the optional 3rd parameter that is a callback to the setwin() method, defined above. This causes the initial window to be sized appropriately. The <body> element looks like this
<body style="overflow:hidden;" onload="HAniS.setup('hanist11t.txt','handiv', setwin)">