<html>
<head>
<meta http-equiv="content-type" content="text/html;chars-
et=iso-8859-1">
<title>Sliding Menu</title>
<meta name="Author" content="Jason Cranford Teague">
<meta name="keywords" content="Jason Cranford Teague">
<script src="findDOMFrame.js"></script>
<script language="JavaScript"><!--
var scrolling = 0; // Controls whether the layer is s-
crollin or not
var yT = 5; // Pixel position the top of the scrollin-
g layer should be set to
var lT = 5; // Initial position for the top of the la-
yer
var yI = 5; // Increment that the scrolling layer sho-
uld move at
var yH = 0;
var domStyle; // Stores the generic DOM for the scrol-
ling layer to access style properties
var dom; // Stores the generic DOM for the scrolling -
layer
if (document.images){
imag = new Array();
imag[0] = "up_off.gif";
imag[1] = "up_on.gif";
imag[2] = "down_off.gif";
imag[3] = "down_on.gif";
imag[4] = "top_off.gif";
imag[5] = "top_on.gif";
imag[6] = "bottom_off.gif";
imag[7] = "bottom_on.gif";
im = new Array();
for (var i = 0; i < imag.length; i++)
{
im[i] = new Image();
im[i].src = imag[i];
}
}
function startScroll(objectID,frameName,direction) {
domStyle = findDOMFrame(objectID,frameName,1);
dom = findDOMFrame(objectID,frameName,0);
scrolling = 1;
yT = domStyle.top;
if (document.getElementById) {
pxLoc = yT.indexOf('px');
if (pxLoc >= 1) yT = yT.substring(0,pxLoc);
}
if (window.innerHeight != null)
yH = window.innerHeight - 25;
else
yH = document.body.clientHeight - 25;
if (dom.offsetHeight != null)
yH = yH - dom.offsetHeight;
else
yH = yH - dom.clip.height;
scroll(direction);
}
function scroll(direction) {
if (scrolling == 1) {
if ((direction == 1) && (yT <= lT)) {
yT = (yT/1) + yI;
if (yT > lT) yT = lT;
domStyle.top = yT; }
else {
if ((direction == 0) && (yT >= yH)) {
yT -= yI;
if (yT < yH) yT = yH;
domStyle.top = yT; }
}
if (document.getElementById) {
yT = domStyle.top;
pxLoc = yT.indexOf('px');
if (pxLoc >= 1) yT = yT.substring(0,pxLoc);
}
code2run = 'scroll('+ direction + ')';
setTimeout(code2run,0);
}
return false;
}
function stopScroll() {
scrolling = 0;
return false;
}
function URB(objectID,frameName) {
domStyle = findDOMFrame(objectID,frameName,1);
dom = findDOMFrame(objectID,frameName,0);
if (window.innerHeight != null)
yH = window.innerHeight - 25;
else
yH = document.body.clientHeight - 25;
if (dom.offsetHeight != null)
yH = yH - dom.offsetHeight;
else
yH = yH - dom.clip.height;
domStyle.top = yH;
}
function URT(objectID,frameName) {
if (isDHTML){
domStyle = findDOMFrame(objectID,frameName,1);
domStyle.top = lT;
}
}
function toggle(imgName,num){
if (document.images && imgName){
imgName.src = im[num].src;
}
return false;
}
// -->
</script>
<style media="screen" type="text/css"><!--
body {
background: white url(bg_scroll.gif) repeat-y 33px 30px;
margin-left: 3px
}
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width=-
"25" height="100%">
<tr>
<td align="center" valign="top"><a href="#" onmouseo-
ver="window.status='Up'; return true;" onmousedow-
n="toggle(up,1); startScroll('scrollArea','conten-
t',1); return false;" onmouseup="stopScroll(); to-
ggle(up,0);"><img height="25" width="25" src="up_-
off.gif" border="0" vspace="5" name="up"></a> <a -
href="#" onmouseover="window.status='Return To To-
p'; return true;" onmousedown="toggle(top,5); URT-
('scrollArea','content');return false;" onmouseup-
="toggle(top,4);"><img height="25" width="25" src-
="top_off.gif" border="0" vspace="5" name="top"> -
</a></td>
</tr>
<tr>
<td align="center" valign="bottom"><a href="#" onmou-
seover="window.status='Go To Bottom'; return true-
;" onmousedown=" toggle(bottom,7); URB('scrollAre-
a','content'); return false;" onmouseup="toggle(b-
ottom,6);"><img height="25" width="25" src="botto-
m_off.gif" border="0" vspace="5" name="bottom"> <-
/a><a href="#" onmouseover="window.status='Down';-
return true;" onmousedown="toggle(down,3); start-
Scroll('scrollArea','content',0); return false;" -
onmouseup="stopScroll(); toggle(down,2);"><img h-
eight="25" width="25" src="down_off.gif" border="-
0" vspace="5" name="down"></a></td>
</tr>
</table>
</body>
</html>