<script language="javascript">
function GetDivYCoord() {
var intY = document.getElementById("main").scrollTop;
document.Show.yCoordHolder.value = intY;
// -->

<!-- The following shows the scrollbar position in pixels as you scroll up and down: --!>

<form action='test6.php?atd=1' method='post' name='Show'>
<input type='text' name='yCoordHolder' style='width:50px' value=''></form>

<!-- What I need is to be able to display the following: --!>

<script language="javascript">document.write(intY)</script>

<!-- This is the code that triggers dynamic scrollbar positionin pixels: --!>

<div id="main" style="height:260px; scroll:auto; scroll-y:auto; scroll-x:hidden" onscroll="GetDivYCoord()">