Hi
I have some rollover images in my page. I load them into some variables so that they can change quickly. Here is a part of the code:
[QUOTE]
function down_arrow_in()
{
if(ypos<=ifrh)document.down_arrow.src=img1.src;
scrolling_down = true;
}
function down_arrow_out()
{
if(ypos<=ifrh)document.down_arrow.src=img2.src;
scrolling_down = false;
}
function up_arrow_in()
{
if(ypos>=0)document.up_arrow.src=img3.src
scrolling_up = true;
}
function up_arrow_out()
{
if(ypos>=0)document.up_arrow.src=img4.src;
scrolling_up = false;
}
<body onLoad=”start()” background=”fortunes bg.gif” style=”background-repeat:no-repeat; “>
<script language=”javascript” type=”text/javascript”>
var img1=new Image();
img1.src=”down_arrow_down.gif”;
var img2=new Image();
img2.src=”down_arrow_up.gif”;
var img3=new Image();
img3.src=”up_arrow_down.gif”;
var img4=new Image();
img4.src=”up_arrow_up.gif”;
You can see all the code at [URL=http://nic-nac-project.de/~razpat/#]http://nic-nac-project.de/~razpat