I assume that the layer will be obscured top and bottom by some part of your interface. In this case it is a simple piece of JavaScript that you need to make the layer scroll, remembering off course the directions (can cause confusion when they hover over a down arrow and the layer scrolls up!).
Obviously you will have two images for the up and down scroll buttons. I'll assume for the purpose of illustration they are called up.jpg and down.jpg - your images should therefore be tagged something like:
Code:
<img src="up.jpg" onMouseOver="timerID=setTimeout('scroll_up()',50)" onMouseOut="clearTimeout(timerID)">
<img src="down.jpg" onMouseOver="timerID=setTimeout('scroll_down()',50)" onMouseOut="clearTimeout(timerID)">
The timer function ensures that whilst the mouse is over the image the relevant scroll function is repeatedly called - you can set the delay between calls by altering the 50 to whatever you feel produces the smoothest effect, remembering that this is a millisecond counter, so 1000 = 1 second.
You will also need the layer itself, so for this we will assume:
Code:
<div id="main" style="position: absolute; left: 300px; top: 100px; width: 400px; height: 400px; z-index: 3; visibility: visible;">Your Content Here</div>
Of course you now need JavaScript functions to control the scrolling:
Code:
<script language="JavaScript>
function scroll_up() {
d = document.all['main'];
t = d.style.top;
t = t - 5; // this would be the pixel scroll per move
// you will need some kind of error check here to make sure that the top of the layer
// does not go outside your set parameters - for this example I have taken that to be 0
if (t <= 0) { t = 0 }
d.style.top = t;
}
function scroll_down() {
d = document.all['main'];
t = d.style.top;
t = t + 5; // this would be the pixel scroll per move
// you will need some kind of error check here to make sure that the top of the layer
// does not go outside your set parameters - for this example this is 300
if (t >= 300) { t = 300 }
d.style.top = t;
}
</script>
That should work for you. I will admit that I haven't tested it and have written that on the fly at 2.30 in the morning, but it should work. If it doesn't, give me a shout and I'll sort it for you.