Hi!

Im making a little picture presentation and i have currently this working code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pilt</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
#picdiv {
text-align: center;
}
</style>
<SCRIPT type="text/javascript">

var num=1
img1 = new Image ()
img1.src = "pic/pic1.jpg"
img2 = new Image ()
img2.src = "pic/pic2.jpg"
img3 = new Image ()
img3.src = "pic/pic3.jpg"
img4 = new Image ()
img4.src = "pic/pic4.jpg"
function slideshowForward()
{
num=num+1
if (num==5)
{num=1}
document.mypic.src=eval("img"+num+".src")
}

function slideshowBack()
{
num=num-1
if (num==0)
{num=4}
document.mypic.src=eval("img"+num+".src")
}
</SCRIPT>
</head>
<body>
<div id="picdiv">
<IMG SRC="pic/pic1.jpg" alt="" NAME="mypic" BORDER=0 align="middle" >

<br />
<A HREF="JavaScript:slideshowBack()">Last</a> | <A HREF="JavaScript:slideshowForward()">Next</a>
</div>
</body>
</html>

how do i alter my code to make "Last" link unclickable when im on pic1 and "Next" link unclickable when im on pic4?

Im probably just on the verge of getting it done but ive run to dead end in my mind apparently

With best wishes,
J.