You will need to make sure that the code snippet you provided is placed and executed after the WebImageViewer's location in the page. You cannot place atalaInitClientScript calls in the header because the corresponding Atalasoft .js libraries have not been referenced yet. You will basically need to structure it like this:
<body>
<form ...>
<WebImageViewer ... />
<snippet here>
</form>
</body>
David Cilley
My AJAX Imaging BlogAtalasoft Development Team